{"id":87726,"date":"2026-07-30T20:00:50","date_gmt":"2026-07-30T12:00:50","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/87726.html"},"modified":"2026-07-30T20:00:50","modified_gmt":"2026-07-30T12:00:50","slug":"bluez%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%ae%e5%85%a8%e6%8c%87%e5%8d%97%ef%bc%9alinux%e6%a1%8c%e9%9d%a2%e5%8e%9f%e7%94%9f%e7%bc%96%e8%af%91-%e5%b5%8c%e5%85%a5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/87726.html","title":{"rendered":"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218"},"content":{"rendered":"<p>\u7f51\u4e0a\u5927\u90e8\u5206BlueZ\u6559\u7a0b\u505c\u7559\u5728apt install bluez\u7684\u5c42\u9762&#xff0c;\u771f\u6b63\u9700\u8981\u5728\u5d4c\u5165\u5f0f\u5e73\u53f0\u843d\u5730\u3001\u505aProfile\u5b9a\u5236\u3001\u5b9a\u4f4d\u534f\u8bae\u6808\u95ee\u9898\u7684\u5de5\u7a0b\u5e08&#xff0c;\u7ed5\u4e0d\u5f00\u6e90\u7801\u7f16\u8bd1\u8fd9\u4e00\u5173\u3002\u672c\u6587\u5c06\u5b8c\u6574\u7f16\u8bd1\u4f53\u7cfb\u3001\u4ea4\u53c9\u7f16\u8bd1\u4f9d\u8d56\u5c42\u7ea7\u5904\u7406\u3001\u6700\u5c0f\u7cfb\u7edf\u88c1\u526a\u3001\u5168\u9636\u6bb5\u6392\u9519\u65b9\u6cd5\u8bba\u4e00\u6b21\u6027\u8bb2\u900f&#xff0c;\u76ee\u6807\u662f\u76f4\u63a5\u843d\u5730\u89e3\u51b3\u5de5\u4f5c\u4e2d\u7684\u7f16\u8bd1\u3001\u79fb\u690d\u3001\u88c1\u526a\u95ee\u9898\u3002<\/p>\n<hr \/>\n<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E4%B8%80%E3%80%81BlueZ%E7%BC%96%E8%AF%91%E4%BD%93%E7%B3%BB%E5%85%A8%E6%99%AF%E8%AE%A4%E7%9F%A5-toc\" style=\"margin-left:0px\">\u4e00\u3001BlueZ\u7f16\u8bd1\u4f53\u7cfb\u5168\u666f\u8ba4\u77e5<\/p>\n<p id=\"1.1%20%E4%B8%BA%E4%BB%80%E4%B9%88%E5%BF%85%E9%A1%BB%E4%BB%8E%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91BlueZ-toc\" style=\"margin-left:40px\">1.1 \u4e3a\u4ec0\u4e48\u5fc5\u987b\u4ece\u6e90\u7801\u7f16\u8bd1BlueZ<\/p>\n<p id=\"1.2%20BlueZ%E6%BA%90%E7%A0%81%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E4%B8%8E%E7%BC%96%E8%AF%91%E4%BA%A7%E7%89%A9%E5%AF%B9%E5%BA%94%E5%85%B3%E7%B3%BB-toc\" style=\"margin-left:40px\">1.2 BlueZ\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u4e0e\u7f16\u8bd1\u4ea7\u7269\u5bf9\u5e94\u5173\u7cfb<\/p>\n<p id=\"1.3%20%E4%B8%A4%E5%A4%A7%E7%BC%96%E8%AF%91%E5%9C%BA%E6%99%AF%E5%85%A8%E6%99%AF%E5%AF%B9%E6%AF%94-toc\" style=\"margin-left:40px\">1.3 \u4e24\u5927\u7f16\u8bd1\u573a\u666f\u5168\u666f\u5bf9\u6bd4<\/p>\n<p id=\"1.4%20%E7%BC%96%E8%AF%91%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86%EF%BC%9AAutotools%E6%9E%84%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AF%A6%E8%A7%A3-toc\" style=\"margin-left:40px\">1.4 \u7f16\u8bd1\u524d\u7f6e\u77e5\u8bc6&#xff1a;Autotools\u6784\u5efa\u6d41\u7a0b\u8be6\u89e3<\/p>\n<p id=\"%E4%BA%8C%E3%80%81Linux%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83%E5%8E%9F%E7%94%9F%E7%BC%96%E8%AF%91%E5%85%A8%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:0px\">\u4e8c\u3001Linux\u684c\u9762\u73af\u5883\u539f\u751f\u7f16\u8bd1\u5168\u6d41\u7a0b<\/p>\n<p id=\"2.1%20%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87-toc\" style=\"margin-left:40px\">2.1 \u7f16\u8bd1\u73af\u5883\u51c6\u5907<\/p>\n<p id=\"2.2%20%E6%BA%90%E7%A0%81%E8%8E%B7%E5%8F%96%E4%B8%8E%E7%89%88%E6%9C%AC%E9%80%89%E6%8B%A9-toc\" style=\"margin-left:40px\">2.2 \u6e90\u7801\u83b7\u53d6\u4e0e\u7248\u672c\u9009\u62e9<\/p>\n<p id=\"2.3%20%E7%AC%AC%E4%B8%80%E6%AD%A5%EF%BC%9Abootstrap%E7%94%9F%E6%88%90configure%E8%84%9A%E6%9C%AC-toc\" style=\"margin-left:40px\">2.3 \u7b2c\u4e00\u6b65&#xff1a;bootstrap\u751f\u6210configure\u811a\u672c<\/p>\n<p id=\"2.4%20%E7%AC%AC%E4%BA%8C%E6%AD%A5%EF%BC%9Aconfigure%E5%8F%82%E6%95%B0%E8%AF%A6%E8%A7%A3%E4%B8%8E%E5%8A%9F%E8%83%BD%E5%AE%9A%E5%88%B6-toc\" style=\"margin-left:40px\">2.4 \u7b2c\u4e8c\u6b65&#xff1a;configure\u53c2\u6570\u8be6\u89e3\u4e0e\u529f\u80fd\u5b9a\u5236<\/p>\n<p id=\"2.5%20%E7%AC%AC%E4%B8%89%E6%AD%A5%EF%BC%9Amake%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85-toc\" style=\"margin-left:40px\">2.5 \u7b2c\u4e09\u6b65&#xff1a;make\u7f16\u8bd1\u4e0e\u5b89\u88c5<\/p>\n<p id=\"2.6%20%E7%BC%96%E8%AF%91%E7%BB%93%E6%9E%9C%E9%AA%8C%E8%AF%81-toc\" style=\"margin-left:40px\">2.6 \u7f16\u8bd1\u7ed3\u679c\u9a8c\u8bc1<\/p>\n<p id=\"2.7%20%E5%9F%BA%E7%A1%80%E6%8A%A5%E9%94%99%E6%B1%87%E6%80%BB-toc\" style=\"margin-left:40px\">2.7 \u57fa\u7840\u62a5\u9519\u6c47\u603b<\/p>\n<p id=\"%E4%B8%89%E3%80%81%E5%B5%8C%E5%85%A5%E5%BC%8FARM%E5%B9%B3%E5%8F%B0%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E5%85%A8%E6%B5%81%E7%A8%8B-toc\" style=\"margin-left:0px\">\u4e09\u3001\u5d4c\u5165\u5f0fARM\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u5168\u6d41\u7a0b<\/p>\n<p id=\"3.1%20%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E6%A0%B8%E5%BF%83%E5%8E%9F%E7%90%86%E4%B8%8E%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87-toc\" style=\"margin-left:40px\">3.1 \u4ea4\u53c9\u7f16\u8bd1\u6838\u5fc3\u539f\u7406\u4e0e\u524d\u7f6e\u51c6\u5907<\/p>\n<p id=\"3.2%20%E4%BE%9D%E8%B5%96%E5%BA%93%E5%B1%82%E7%BA%A7%E6%8B%86%E8%A7%A3%E4%B8%8E%E9%80%90%E5%BA%93%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E5%AE%9E%E6%88%98-toc\" style=\"margin-left:40px\">3.2 \u4f9d\u8d56\u5e93\u5c42\u7ea7\u62c6\u89e3\u4e0e\u9010\u5e93\u4ea4\u53c9\u7f16\u8bd1\u5b9e\u6218<\/p>\n<p id=\"3.3%20BlueZ%E4%B8%BB%E7%A8%8B%E5%BA%8F%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E9%85%8D%E7%BD%AE%E4%B8%8E%E6%89%A7%E8%A1%8C-toc\" style=\"margin-left:40px\">3.3 BlueZ\u4e3b\u7a0b\u5e8f\u4ea4\u53c9\u7f16\u8bd1\u914d\u7f6e\u4e0e\u6267\u884c<\/p>\n<p id=\"3.4%20%E7%BC%96%E8%AF%91%E4%BA%A7%E7%89%A9%E6%95%B4%E7%90%86%E4%B8%8E%E6%9D%BF%E7%AB%AF%E9%83%A8%E7%BD%B2-toc\" style=\"margin-left:40px\">3.4 \u7f16\u8bd1\u4ea7\u7269\u6574\u7406\u4e0e\u677f\u7aef\u90e8\u7f72<\/p>\n<p id=\"3.5%20%E6%9D%BF%E7%AB%AF%E8%BF%90%E8%A1%8C%E9%AA%8C%E8%AF%81%E4%B8%8E%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5%E6%8E%92%E6%9F%A5-toc\" style=\"margin-left:40px\">3.5 \u677f\u7aef\u8fd0\u884c\u9a8c\u8bc1\u4e0e\u542f\u52a8\u5931\u8d25\u6392\u67e5<\/p>\n<p id=\"%E5%9B%9B%E3%80%81%20BlueZ%E5%8A%9F%E8%83%BD%E5%AE%9A%E5%88%B6%E8%A3%81%E5%89%AA%E4%B8%8E%E9%AB%98%E7%BA%A7%E7%BC%96%E8%AF%91%E6%8A%80%E5%B7%A7-toc\" style=\"margin-left:0px\">\u56db\u3001 BlueZ\u529f\u80fd\u5b9a\u5236\u88c1\u526a\u4e0e\u9ad8\u7ea7\u7f16\u8bd1\u6280\u5de7<\/p>\n<p id=\"4.1%20%E6%9C%80%E5%B0%8F%E7%B3%BB%E7%BB%9F%E8%A3%81%E5%89%AA%EF%BC%9A%E8%B5%84%E6%BA%90%E5%8F%97%E9%99%90%E8%AE%BE%E5%A4%87%E7%9A%84%E7%BC%96%E8%AF%91%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:40px\">4.1 \u6700\u5c0f\u7cfb\u7edf\u88c1\u526a&#xff1a;\u8d44\u6e90\u53d7\u9650\u8bbe\u5907\u7684\u7f16\u8bd1\u65b9\u6848<\/p>\n<p id=\"4.2%20%E9%9D%99%E6%80%81%E7%BC%96%E8%AF%91%E4%B8%8E%E5%8A%A8%E6%80%81%E7%BC%96%E8%AF%91%E9%80%89%E5%9E%8B-toc\" style=\"margin-left:40px\">4.2 \u9759\u6001\u7f16\u8bd1\u4e0e\u52a8\u6001\u7f16\u8bd1\u9009\u578b<\/p>\n<p id=\"4.3%20%E6%BA%90%E7%A0%81%E7%BA%A7%E8%B0%83%E8%AF%95%E7%BC%96%E8%AF%91%E9%85%8D%E7%BD%AE-toc\" style=\"margin-left:40px\">4.3 \u6e90\u7801\u7ea7\u8c03\u8bd5\u7f16\u8bd1\u914d\u7f6e<\/p>\n<p id=\"4.4%20%E5%A2%9E%E9%87%8F%E7%BC%96%E8%AF%91%E4%B8%8E%E8%A1%A5%E4%B8%81%E9%9B%86%E6%88%90-toc\" style=\"margin-left:40px\">4.4 \u589e\u91cf\u7f16\u8bd1\u4e0e\u8865\u4e01\u96c6\u6210<\/p>\n<p id=\"4.5%20%E5%A4%9A%E7%89%88%E6%9C%AC%E5%85%B1%E5%AD%98%E6%96%B9%E6%A1%88-toc\" style=\"margin-left:40px\">4.5 \u591a\u7248\u672c\u5171\u5b58\u65b9\u6848<\/p>\n<p id=\"%E4%BA%94%E3%80%81%E5%85%A8%E6%B5%81%E7%A8%8B%E7%BC%96%E8%AF%91%E6%8A%A5%E9%94%99%E6%8E%92%E9%94%99%E6%89%8B%E5%86%8C-toc\" style=\"margin-left:0px\">\u4e94\u3001\u5168\u6d41\u7a0b\u7f16\u8bd1\u62a5\u9519\u6392\u9519\u624b\u518c<\/p>\n<p id=\"5.1%20configure%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5-toc\" style=\"margin-left:40px\">5.1 configure\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/p>\n<p id=\"5.2%20make%E7%BC%96%E8%AF%91%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5-toc\" style=\"margin-left:40px\">5.2 make\u7f16\u8bd1\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/p>\n<p id=\"5.3%20%E8%BF%90%E8%A1%8C%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5-toc\" style=\"margin-left:40px\">5.3 \u8fd0\u884c\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/p>\n<p id=\"5.4%20%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E4%B8%93%E5%B1%9E%E6%8E%92%E9%94%99%E6%B8%85%E5%8D%95-toc\" style=\"margin-left:40px\">5.4 \u4ea4\u53c9\u7f16\u8bd1\u4e13\u5c5e\u6392\u9519\u6e05\u5355<\/p>\n<p id=\"%E5%85%AD%E3%80%81%20%E6%80%BB%E7%BB%93%E4%B8%8E%E5%AD%A6%E4%B9%A0%E8%B7%AF%E7%BA%BF-toc\" style=\"margin-left:0px\">\u516d\u3001 \u603b\u7ed3\u4e0e\u5b66\u4e60\u8def\u7ebf<\/p>\n<p id=\"6.1%20%E5%85%A8%E6%96%87%E6%A0%B8%E5%BF%83%E7%9F%A5%E8%AF%86%E7%82%B9%E5%A4%8D%E7%9B%98-toc\" style=\"margin-left:40px\">6.1 \u5168\u6587\u6838\u5fc3\u77e5\u8bc6\u70b9\u590d\u76d8<\/p>\n<p id=\"6.2%20BlueZ%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6%E5%AD%A6%E4%B9%A0%E8%B7%AF%E7%BA%BF-toc\" style=\"margin-left:40px\">6.2 BlueZ\u5f00\u53d1\u8fdb\u9636\u5b66\u4e60\u8def\u7ebf<\/p>\n<p id=\"6.3%20%E5%90%8E%E7%BB%AD%E5%AE%9E%E6%88%98%E6%96%B9%E5%90%91%E6%8E%A8%E8%8D%90-toc\" style=\"margin-left:40px\">6.3 \u540e\u7eed\u5b9e\u6218\u65b9\u5411\u63a8\u8350<\/p>\n<hr \/>\n<h2 id=\"%E4%B8%80%E3%80%81BlueZ%E7%BC%96%E8%AF%91%E4%BD%93%E7%B3%BB%E5%85%A8%E6%99%AF%E8%AE%A4%E7%9F%A5\">\u4e00\u3001BlueZ\u7f16\u8bd1\u4f53\u7cfb\u5168\u666f\u8ba4\u77e5<\/h2>\n<h3 id=\"1.1%20%E4%B8%BA%E4%BB%80%E4%B9%88%E5%BF%85%E9%A1%BB%E4%BB%8E%E6%BA%90%E7%A0%81%E7%BC%96%E8%AF%91BlueZ\">1.1 \u4e3a\u4ec0\u4e48\u5fc5\u987b\u4ece\u6e90\u7801\u7f16\u8bd1BlueZ<\/h3>\n<p>\u5f88\u591a\u5de5\u7a0b\u5e08\u7b2c\u4e00\u6b21\u63a5\u89e6BlueZ&#xff0c;\u662f\u4ece\u53d1\u884c\u7248\u81ea\u5e26\u7684bluez\u5305\u5f00\u59cb\u7684\u3002apt install bluez\u88c5\u5b8c&#xff0c;bluetoothctl\u80fd\u626b\u63cf\u3001\u80fd\u914d\u5bf9&#xff0c;\u770b\u4f3c\u591f\u7528\u4e86\u3002\u4f46\u4e00\u65e6\u8fdb\u5165\u771f\u5b9e\u4e1a\u52a1\u573a\u666f&#xff0c;\u53d1\u884c\u7248BlueZ\u7684\u4e09\u5927\u75db\u70b9\u7acb\u523b\u66b4\u9732&#xff1a;<\/p>\n<p>\u75db\u70b9\u4e00&#xff1a;\u7248\u672c\u4e25\u91cd\u6ede\u540e\u3002\u4ee5Ubuntu 22.04 LTS\u4e3a\u4f8b&#xff0c;\u5b98\u65b9\u4ed3\u5e93\u9ed8\u8ba4BlueZ\u7248\u672c\u505c\u7559\u57285.64\u5de6\u53f3&#xff0c;\u800cLE Audio&#xff08;BAP\/BASS\/TMAP&#xff09;\u3001Mesh\u7ec4\u7f51\u3001CSIP\u7b49\u5173\u952e\u7279\u6027\u662f\u57285.65&#043;\u9010\u6b65\u5b8c\u5584\u7684\u3002\u60f3\u7528LE Audio&#xff0c;\u7b49\u53d1\u884c\u7248\u5347\u7ea7\u6839\u672c\u4e0d\u73b0\u5b9e\u3002<\/p>\n<p>\u75db\u70b9\u4e8c&#xff1a;\u529f\u80fd\u9ed8\u8ba4\u88c1\u526a\u4e0d\u5168\u3002\u53d1\u884c\u7248\u6253\u5305\u65f6\u4e3a\u4e86\u901a\u7528\u6027&#xff0c;\u4f1a\u9ed8\u8ba4\u5f00\u542f\u5927\u91cf\u6a21\u5757&#xff0c;\u4f46\u540c\u65f6\u4e5f\u4f1a\u56e0\u4e3a\u4f9d\u8d56\u95ee\u9898\u5173\u95ed\u90e8\u5206\u9ad8\u7ea7\u529f\u80fd\u3002\u4f8b\u5982Mesh\u9ed8\u8ba4\u4e0d\u5f00\u542f\u3001BTP Client\u9ed8\u8ba4\u4e0d\u7f16\u8bd1\u3001experimental\u5de5\u5177\u9ed8\u8ba4\u4e0d\u5b89\u88c5\u3002\u4f60\u62ff\u5230\u7684\u662f\u4e00\u4e2a&#034;\u591f\u7528\u4f46\u5b9a\u5236\u4e0d\u4e86&#034;\u7684\u7248\u672c\u3002<\/p>\n<p>\u75db\u70b9\u4e09&#xff1a;\u65e0\u6cd5\u4fee\u6539\u6e90\u7801\u505a\u4e8c\u6b21\u5f00\u53d1\u3002\u8fd9\u662f\u6700\u81f4\u547d\u7684\u3002\u5f53\u4f60\u9700\u8981&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5b9a\u5236\u4e00\u4e2aGATT Service&#xff0c;\u8ba9BlueZ\u66b4\u9732\u81ea\u5b9a\u4e49UUID<\/p>\n<\/li>\n<li>\n<p>\u4fee\u6539HFP-HF\u7684Codec\u534f\u5546\u903b\u8f91&#xff0c;\u9002\u914d\u81ea\u7814\u8f66\u8f7d\u82af\u7247<\/p>\n<\/li>\n<li>\n<p>\u5728A2DP Sink\u4e2d\u63d2\u5165\u81ea\u5df1\u7684DSP\u5904\u7406<\/p>\n<\/li>\n<li>\n<p>\u8c03\u8bd5\u4e00\u4e2a\u5076\u53d1\u7684btmon\u6293\u5305\u770b\u4e0d\u61c2\u7684HCI\u5f02\u5e38<\/p>\n<\/li>\n<\/ul>\n<p>\u2014\u2014\u4ee5\u4e0a\u4efb\u4f55\u4e00\u4e2a\u573a\u666f&#xff0c;\u53d1\u884c\u7248\u4e8c\u8fdb\u5236\u90fd\u65e0\u80fd\u4e3a\u529b&#xff0c;\u4f60\u5fc5\u987b\u80fd\u6539\u6e90\u7801\u3001\u80fd\u7f16\u8bd1\u3001\u80fd\u628a\u7f16\u8bd1\u4ea7\u7269\u90e8\u7f72\u5230\u76ee\u6807\u8bbe\u5907\u4e0a\u8dd1\u8d77\u6765\u3002<\/p>\n<h3 id=\"1.2%20BlueZ%E6%BA%90%E7%A0%81%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E4%B8%8E%E7%BC%96%E8%AF%91%E4%BA%A7%E7%89%A9%E5%AF%B9%E5%BA%94%E5%85%B3%E7%B3%BB\">1.2 BlueZ\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u4e0e\u7f16\u8bd1\u4ea7\u7269\u5bf9\u5e94\u5173\u7cfb<\/h3>\n<p>BlueZ\u6e90\u7801\u91c7\u7528\u6a21\u5757\u5316\u76ee\u5f55\u7ec4\u7ec7&#xff0c;\u7406\u89e3\u6bcf\u4e2a\u76ee\u5f55\u7684\u804c\u8d23\u662f\u9605\u8bfb\u6e90\u7801\u3001\u5b9a\u4f4d\u95ee\u9898\u7684\u524d\u63d0\u3002\u4ee5\u4e0b\u57fa\u4e8eBlueZ 5.87\u7248\u672c\u7684\u6e90\u7801\u7ed3\u6784&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u76ee\u5f55<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6838\u5fc3\u804c\u8d23<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f16\u8bd1\u4ea7\u7269<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>src\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u534f\u8bae\u6808\u6838\u5fc3&#xff1a;\u9002\u914d\u5668\u7ba1\u7406\u3001\u8bbe\u5907\u7ba1\u7406\u3001GATT\u6570\u636e\u5e93\u3001SDP\u670d\u52a1\u3001\u4e3b\u7a0b\u5e8fbluetoothd\u5165\u53e3<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothd\u540e\u53f0\u5b88\u62a4\u8fdb\u7a0b\u3001bluetooth.service<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>lib\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u516c\u5171API\u5e93&#xff1a;HCI\u3001L2CAP\u3001SDP\u3001RFCOMM\u3001BNEP\u7b49\u534f\u8bae\u7684C\u63a5\u53e3<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libbluetooth.so\u52a8\u6001\u5e93\u3001bluez.pc<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>profiles\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5404\u7c7b\u84dd\u7259Profile\u5b9e\u73b0&#xff1a;audio&#xff08;A2DP\/AVRCP\/HFP\/BAP\/LE Audio&#xff09;\u3001input&#xff08;HID\/HoG&#xff09;\u3001network&#xff08;PAN\/BNEP&#xff09;\u3001battery\u3001deviceinfo\u7b49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f16\u8bd1\u8fdbbluetoothd\u7684\u63d2\u4ef6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>plugins\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6269\u5c55\u63d2\u4ef6&#xff1a;autopair\u3001hostname\u3001policy\u3001sixaxis\u3001admin\u3001neard<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f16\u8bd1\u8fdbbluetoothd\u7684.so\u63d2\u4ef6<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>mesh\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mesh\u7ec4\u7f51\u534f\u8bae\u6808&#xff1a;\u8282\u70b9\u7ba1\u7406\u3001\u914d\u7f51\u3001\u6a21\u578b\u3001\u5bc6\u94a5\u7ba1\u7406<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetooth-meshd\u5b88\u62a4\u8fdb\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>obexd\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u534f\u8bae\u5b88\u62a4\u8fdb\u7a0b&#xff1a;OPP\/FTP\/PBAP\/MAP\/BIP\u6587\u4ef6\u4f20\u8f93<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>obexd\u5b88\u62a4\u8fdb\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>client\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u547d\u4ee4\u884c\u5ba2\u6237\u7aef&#xff1a;bluetoothctl\u4e3b\u4f53\u903b\u8f91\u3001\u5404\u5b50\u547d\u4ee4\u6a21\u5757<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothctl\u5de5\u5177<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>monitor\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u534f\u8bae\u6293\u5305\u5206\u6790\u5de5\u5177&#xff1a;btmon\u4e3b\u4f53&#xff0c;\u89e3\u6790HCI\/L2CAP\/ATT\/AVDTP\u7b49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>btmon\u5de5\u5177<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>tools\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5de5\u5177\u96c6&#xff1a;hcitool\u3001btmgmt\u3001btattach\u3001hex2hcd\u3001meshctl\u3001\u5404\u7c7btester<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4e00\u7cfb\u5217\u8c03\u8bd5\u4e0e\u5382\u5546\u5de5\u5177<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>attrib\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u65e9\u671fGATT\/ATT\u5b9e\u73b0&#xff08;\u90e8\u5206\u529f\u80fd\u5df2\u88absrc\/shared\u66ff\u4ee3&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>gatttool\u7b49\u8001\u5de5\u5177&#xff08;\u9700&#8211;enable-deprecated&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>btio\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>GLib IO\u62bd\u8c61\u5c42\u5c01\u88c5&#xff0c;\u4f9bProfile\u4f7f\u7528<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5185\u90e8\u9759\u6001\u5e93<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>gdbus\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>GLib DBus\u5c01\u88c5&#xff0c;\u7b80\u5316DBus\u63a5\u53e3\u5f00\u53d1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5185\u90e8\u9759\u6001\u5e93<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>gobex\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u534f\u8bae\u5e95\u5c42\u5b9e\u73b0&#xff0c;\u4f9bobexd\u4f7f\u7528<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5185\u90e8\u9759\u6001\u5e93<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>emulator\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u84dd\u7259\u63a7\u5236\u5668\u865a\u62df\u5316&#xff0c;\u7528\u4e8e\u5355\u5143\u6d4b\u8bd5<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6d4b\u8bd5\u7528<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>peripheral\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u72ec\u7acbLE\u5916\u8bbe\u793a\u4f8b&#xff08;\u4e0d\u4f9d\u8d56bluetoothd&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u72ec\u7acb\u793a\u4f8b\u7a0b\u5e8f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>unit\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5355\u5143\u6d4b\u8bd5<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6d4b\u8bd5\u7a0b\u5e8f&#xff08;\u9700&#8211;enable-testing&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>test\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Python\u6d4b\u8bd5\u811a\u672c\u4e0e\u793a\u4f8b<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u811a\u672c\u6587\u4ef6&#xff08;\u9700&#8211;enable-test&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>doc\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>reStructuredText\u6587\u6863\u4e0eAPI\u8bf4\u660e<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>man\u624b\u518c&#xff08;\u9700&#8211;enable-manpages&#xff09;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1171\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120046-6a6b3cee1f3ec.png\" width=\"636\" \/><\/p>\n<h3 id=\"1.3%20%E4%B8%A4%E5%A4%A7%E7%BC%96%E8%AF%91%E5%9C%BA%E6%99%AF%E5%85%A8%E6%99%AF%E5%AF%B9%E6%AF%94\">1.3 \u4e24\u5927\u7f16\u8bd1\u573a\u666f\u5168\u666f\u5bf9\u6bd4<\/h3>\n<p>\u6e90\u7801\u7f16\u8bd1BlueZ\u6709\u4e24\u5927\u5178\u578b\u573a\u666f&#xff0c;\u4e8c\u8005\u7684\u96be\u5ea6\u3001\u6d41\u7a0b\u3001\u4f9d\u8d56\u5904\u7406\u65b9\u5f0f\u5dee\u5f02\u5de8\u5927&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5bf9\u6bd4\u7ef4\u5ea6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u684c\u9762Linux\u539f\u751f\u7f16\u8bd1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7528\u9014<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6e90\u7801\u9605\u8bfb\u3001\u8c03\u8bd5\u3001Profile\u4e8c\u6b21\u5f00\u53d1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b9e\u9645\u90e8\u7f72\u5230\u5d4c\u5165\u5f0f\u8bbe\u5907<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f16\u8bd1\u73af\u5883<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>x86_64\u684c\u9762Linux\u53d1\u884c\u7248<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>x86_64\u4e3b\u673a &#043; ARM\u4ea4\u53c9\u5de5\u5177\u94fe<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u76ee\u6807\u67b6\u6784<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4e0e\u4e3b\u673a\u4e00\u81f4&#xff08;x86_64&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>ARM&#xff08;aarch64\/armv7\u7b49&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f9d\u8d56\u5904\u7406<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u76f4\u63a5apt install\u73b0\u6210\u5f00\u53d1\u5305<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6bcf\u4e2a\u4f9d\u8d56\u5e93\u90fd\u8981\u5148\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u90e8\u7f72\u65b9\u5f0f<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u76f4\u63a5make install\u5230\u672c\u673a<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6253\u5305\u540escp\/nfs\u63a8\u9001\u5230\u5f00\u53d1\u677f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8c03\u8bd5\u4fbf\u5229\u6027<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u9ad8&#xff0c;gdb\u76f4\u8fde<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f4e&#xff0c;\u9700gdbserver\u6216btmon\u6293\u5305<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b66\u4e60\u96be\u5ea6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u2605\u2605&#xff08;\u57fa\u7840&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u2605\u2605\u2605\u2605\u2605&#xff08;\u6838\u5fc3\u4ed8\u8d39\u5185\u5bb9&#xff09;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5b66\u4e60\u8def\u5f84\u5efa\u8bae&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u84dd\u7259\u5e95\u5c42\u7814\u53d1\u3001Profile\u4e8c\u6b21\u5f00\u53d1&#xff1a;\u5148\u638c\u63e1\u684c\u9762\u539f\u751f\u7f16\u8bd1&#xff0c;\u5efa\u7acb\u5b8c\u6574\u8ba4\u77e5<\/p>\n<\/li>\n<li>\n<p>\u5d4c\u5165\u5f0f\u843d\u5730\u3001\u8bbe\u5907\u79fb\u690d&#xff1a;\u5fc5\u987b\u5403\u900f\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"1.4%20%E7%BC%96%E8%AF%91%E5%89%8D%E7%BD%AE%E7%9F%A5%E8%AF%86%EF%BC%9AAutotools%E6%9E%84%E5%BB%BA%E6%B5%81%E7%A8%8B%E8%AF%A6%E8%A7%A3\">1.4 \u7f16\u8bd1\u524d\u7f6e\u77e5\u8bc6&#xff1a;Autotools\u6784\u5efa\u6d41\u7a0b\u8be6\u89e3<\/h3>\n<p>BlueZ\u4f7f\u7528\u7ecf\u5178\u7684Autotools\u6784\u5efa\u7cfb\u7edf&#xff0c;\u5b8c\u6574\u6d41\u7a0b\u4e3a\u56db\u6b65&#xff1a;<\/p>\n<p>.\/bootstrap     # \u7b2c\u4e00\u6b65&#xff1a;\u751f\u6210configure\u811a\u672c<br \/>\n.\/configure     # \u7b2c\u4e8c\u6b65&#xff1a;\u68c0\u6d4b\u73af\u5883\u3001\u751f\u6210Makefile<br \/>\nmake            # \u7b2c\u4e09\u6b65&#xff1a;\u7f16\u8bd1\u6e90\u7801<br \/>\nmake install    # \u7b2c\u56db\u6b65&#xff1a;\u5b89\u88c5\u5230\u6307\u5b9a\u8def\u5f84 <\/p>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u8df3\u8fc7bootstrap\u76f4\u63a5make&#xff1f;\u56e0\u4e3a\u4eceGit\u4ed3\u5e93\u514b\u9686\u7684\u6e90\u7801\u4e0d\u5305\u542bconfigure\u811a\u672c\u2014\u2014configure\u662f\u7531configure.ac\u901a\u8fc7autoconf\u751f\u6210\u7684&#xff0c;\u800cMakefile.in\u662f\u7531Makefile.am\u901a\u8fc7automake\u751f\u6210\u7684\u3002bootstrap\u811a\u672c\u7684\u672c\u8d28\u5c31\u662f\u628a\u8fd9\u4e9b\u751f\u6210\u52a8\u4f5c\u4e32\u8d77\u6765&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"163\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120046-6a6b3cee98dfd.png\" width=\"483\" \/><\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f5c\u7528<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>aclocal<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u751f\u6210aclocal.m4&#xff0c;\u6536\u96c6\u7b2c\u4e09\u65b9\u5b8f\u5b9a\u4e49<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>autoheader<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u751f\u6210config.h.in\u6a21\u677f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libtoolize<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f15\u5165libtool\u811a\u672c&#xff0c;\u5904\u7406\u52a8\u6001\u5e93\u7f16\u8bd1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>automake<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7531Makefile.am\u751f\u6210Makefile.in<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>autoconf<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7531configure.ac\u751f\u6210\u6700\u7ec8\u7684configure\u811a\u672c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e24\u4e2a\u6838\u5fc3\u6982\u5ff5\u5fc5\u987b\u8bb2\u6e05&#xff1a;<\/p>\n<p>pkg-config&#xff1a;\u7f16\u8bd1\u671f\u4f9d\u8d56\u67e5\u627e\u5de5\u5177\u3002\u5f53configure\u68c0\u6d4bglib-2.0\u65f6&#xff0c;\u672c\u8d28\u662f\u8c03\u7528pkg-config &#8211;cflags &#8211;libs glib-2.0&#xff0c;\u4ece.pc\u6587\u4ef6\u4e2d\u8bfb\u53d6\u5934\u6587\u4ef6\u8def\u5f84\u548c\u94fe\u63a5\u5e93\u8def\u5f84\u3002\u4ea4\u53c9\u7f16\u8bd1\u65f6\u8fd9\u662f\u6700\u5927\u7684\u5751\u2014\u2014\u540e\u9762\u4f1a\u8be6\u7ec6\u8bb2\u3002<\/p>\n<p>sysroot&#xff1a;\u4ea4\u53c9\u7f16\u8bd1\u65f6\u7684\u865a\u62df\u6839\u6587\u4ef6\u7cfb\u7edf\u3002\u6240\u6709\u76ee\u6807\u5e73\u53f0\u4f9d\u8d56\u5e93\u7684\u5934\u6587\u4ef6\u3001\u52a8\u6001\u5e93\u90fd\u653e\u5728sysroot\u4e0b&#xff0c;\u7f16\u8bd1\u5668\u901a\u8fc7&#8211;sysroot&#061;\u53c2\u6570\u628a\u5b83\u4eec\u5f53\u4f5c&#034;\u76ee\u6807\u7cfb\u7edf\u7684\/&#034;\u6765\u67e5\u627e\u3002\u89c4\u8303sysroot\u5e03\u5c40\u662f\u4ea4\u53c9\u7f16\u8bd1\u6210\u529f\u7684\u5173\u952e\u3002<\/p>\n<h2 id=\"%E4%BA%8C%E3%80%81Linux%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83%E5%8E%9F%E7%94%9F%E7%BC%96%E8%AF%91%E5%85%A8%E6%B5%81%E7%A8%8B\">\u4e8c\u3001Linux\u684c\u9762\u73af\u5883\u539f\u751f\u7f16\u8bd1\u5168\u6d41\u7a0b<\/h2>\n<h3 id=\"2.1%20%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87\">2.1 \u7f16\u8bd1\u73af\u5883\u51c6\u5907<\/h3>\n<p>2.1.1 \u5206\u53d1\u884c\u7248\u5b89\u88c5\u4f9d\u8d56<\/p>\n<p>Debian\u7cfb&#xff08;Ubuntu\/Debian&#xff09;&#xff1a;<\/p>\n<p>sudo apt update<br \/>\nsudo apt install -y \\\\<br \/>\n    build-essential autoconf automake libtool pkg-config \\\\<br \/>\n    libdbus-1-dev libglib2.0-dev libudev-dev \\\\<br \/>\n    libical-dev libreadline-dev libasound2-dev \\\\<br \/>\n    udev-systemd-dev systemd \\\\<br \/>\n    flex bison \\\\<br \/>\n    python3-docutils <\/p>\n<p>RedHat\u7cfb&#xff08;Fedora\/CentOS\/RHEL&#xff09;&#xff1a;<\/p>\n<p>sudo dnf install -y \\\\<br \/>\n    gcc make autoconf automake libtool pkgconfig \\\\<br \/>\n    dbus-devel glib2-devel systemd-devel \\\\<br \/>\n    libical-devel readline-devel alsa-lib-devel \\\\<br \/>\n    flex bison \\\\<br \/>\n    python3-docutils <\/p>\n<p>2.1.2 \u4f9d\u8d56\u5206\u5c42\u8bb2\u89e3<\/p>\n<p>\u57fa\u7840\u7f16\u8bd1\u5de5\u5177\u94fe&#xff1a;<\/p>\n<ul>\n<li>\n<p>gcc\/make&#xff1a;C\u7f16\u8bd1\u5668\u4e0e\u6784\u5efa\u5de5\u5177<\/p>\n<\/li>\n<li>\n<p>autoconf\/automake\/libtool&#xff1a;Autotools\u4e09\u4ef6\u5957&#xff0c;bootstrap\u9636\u6bb5\u5fc5\u9700<\/p>\n<\/li>\n<li>\n<p>pkg-config&#xff1a;\u4f9d\u8d56\u67e5\u627e\u5de5\u5177&#xff0c;configure\u9636\u6bb5\u5fc5\u9700<\/p>\n<\/li>\n<\/ul>\n<p>\u6838\u5fc3\u5f3a\u5236\u4f9d\u8d56&#xff08;\u7f3a\u4e00\u4e0d\u53ef&#xff09;&#xff1a;<\/p>\n<ul>\n<li>\n<p>libdbus-1-dev&#xff1a;BlueZ\u6240\u6709\u8fdb\u7a0b\u95f4\u901a\u4fe1\u8d70DBus&#xff0c;\u662f\u7edd\u5bf9\u6838\u5fc3<\/p>\n<\/li>\n<li>\n<p>libglib2.0-dev&#xff1a;BlueZ\u7684\u4e8b\u4ef6\u5faa\u73af\u3001\u6570\u636e\u7ed3\u6784\u3001IO\u62bd\u8c61\u5168\u9760GLib<\/p>\n<\/li>\n<li>\n<p>libudev-dev&#xff1a;\u8bbe\u5907\u70ed\u63d2\u62d4\u7ba1\u7406&#xff0c;configure.ac\u4e2d\u8981\u6c42libudev &gt;&#061; 196<\/p>\n<\/li>\n<\/ul>\n<p>\u53ef\u9009\u529f\u80fd\u4f9d\u8d56&#xff1a;<\/p>\n<ul>\n<li>\n<p>libical-dev&#xff1a;OBEX\u534f\u8bae\u7684vCalendar\/vCard\u5904\u7406&#xff0c;\u4e0d\u5f00OBEX\u53ef\u4e0d\u88c5<\/p>\n<\/li>\n<li>\n<p>libreadline-dev&#xff1a;bluetoothctl\u547d\u4ee4\u884c\u4ea4\u4e92\u4f9d\u8d56&#xff0c;\u4e0d\u5f00client\u53ef\u4e0d\u88c5<\/p>\n<\/li>\n<li>\n<p>libasound2-dev&#xff1a;MIDI\u529f\u80fd\u4f9d\u8d56ALSA&#xff0c;\u4e0d\u5f00midi\u53ef\u4e0d\u88c5<\/p>\n<\/li>\n<li>\n<p>json-c&#xff08;\u9700\u5355\u72ec\u88c5libjson-c-dev&#xff09;&#xff1a;Mesh\u7ec4\u7f51\u4f9d\u8d56<\/p>\n<\/li>\n<li>\n<p>ell&#xff08;Embedded Linux Library&#xff09;&#xff1a;Mesh\/BTP Client\u4f9d\u8d56<\/p>\n<\/li>\n<\/ul>\n<p>\u8c03\u8bd5\u8f85\u52a9\u5de5\u5177&#xff1a;<\/p>\n<ul>\n<li>\n<p>bluez-hcidump&#xff1a;\u65e7\u7248\u6293\u5305\u5de5\u5177&#xff08;\u5df2\u88abbtmon\u66ff\u4ee3&#xff09;<\/p>\n<\/li>\n<li>\n<p>wireshark&#xff1a;\u7f51\u7edc\u534f\u8bae\u5206\u6790&#xff0c;\u652f\u6301btsnoop\u683c\u5f0f<\/p>\n<\/li>\n<li>\n<p>dbus-utils&#xff1a;\u63d0\u4f9bdbus-send\u3001dbus-monitor&#xff0c;\u8c03\u8bd5DBus\u63a5\u53e3\u5fc5\u5907<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"2.2%20%E6%BA%90%E7%A0%81%E8%8E%B7%E5%8F%96%E4%B8%8E%E7%89%88%E6%9C%AC%E9%80%89%E6%8B%A9\">2.2 \u6e90\u7801\u83b7\u53d6\u4e0e\u7248\u672c\u9009\u62e9<\/h3>\n<p># \u5b98\u65b9Git\u4ed3\u5e93<br \/>\ngit clone git:\/\/git.kernel.org\/pub\/scm\/bluetooth\/bluez.git<br \/>\ncd bluez<\/p>\n<p># \u56fd\u5185\u955c\u50cf\u52a0\u901f&#xff08;\u63a8\u8350&#xff09;<br \/>\ngit clone https:\/\/mirrors.tuna.tsinghua.edu.cn\/git\/bluez.git<\/p>\n<p># \u5207\u6362\u5230\u7a33\u5b9a\u7248\u6807\u7b7e<br \/>\ngit checkout 5.87 <\/p>\n<p>\u7248\u672c\u9009\u62e9\u539f\u5219&#xff1a;<\/p>\n<ul>\n<li>\n<p>5.87&#043;&#xff1a;LE Audio&#xff08;BAP\/BASS\/TMAP\/GMAP&#xff09;\u5b8c\u6574\u652f\u6301<\/p>\n<\/li>\n<li>\n<p>5.78&#043;&#xff1a;Mesh\u534f\u8bae\u6808\u7a33\u5b9a&#xff0c;\u63a8\u8350\u751f\u4ea7\u4f7f\u7528<\/p>\n<\/li>\n<li>\n<p>5.64&#043;&#xff1a;\u57fa\u672c\u8986\u76d6\u7ecf\u5178\u84dd\u7259\u5168\u529f\u80fd<\/p>\n<\/li>\n<li>\n<p>\u957f\u671f\u652f\u6301\u63a8\u8350&#xff1a;\u8ddf\u968fkernel.org\u7684LTS BlueZ\u5206\u652f<\/p>\n<\/li>\n<\/ul>\n<p>\u79bb\u7ebf\u6e90\u7801\u5305&#xff1a;\u8bbf\u95eehttps:\/\/www.kernel.org\/pub\/linux\/bluetooth\/\u4e0b\u8f7d.tar.xz\u5305&#xff0c;\u9002\u5408\u65e0\u7f51\u7edc\u73af\u5883\u3002\u79bb\u7ebf\u5305\u89e3\u538b\u540e\u4e0d\u9700\u8981\u6267\u884cbootstrap&#xff0c;\u56e0\u4e3a\u5df2\u7ecf\u5305\u542bconfigure\u811a\u672c\u3002<\/p>\n<h3 id=\"2.3%20%E7%AC%AC%E4%B8%80%E6%AD%A5%EF%BC%9Abootstrap%E7%94%9F%E6%88%90configure%E8%84%9A%E6%9C%AC\">2.3 \u7b2c\u4e00\u6b65&#xff1a;bootstrap\u751f\u6210configure\u811a\u672c<\/h3>\n<p>cd bluez<br \/>\n.\/bootstrap <\/p>\n<p>\u9884\u671f\u8f93\u51fa\u672b\u5c3e\u4f1a\u6709autoconf\u6267\u884c\u7684\u65e0\u62a5\u9519\u4fe1\u606f\u3002\u5b8c\u6210\u540e\u6839\u76ee\u5f55\u4f1a\u51fa\u73b0configure\u53ef\u6267\u884c\u811a\u672c\u3002<\/p>\n<p>\u9ad8\u9891\u62a5\u9519\u4e0e\u89e3\u51b3&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u62a5\u9519<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u539f\u56e0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u89e3\u51b3\u65b9\u6848<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>aclocal: not found<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u672a\u88c5automake<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>apt install automake<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>autoconf: command not found<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u672a\u88c5autoconf<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>apt install autoconf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libtoolize: command not found<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u672a\u88c5libtool<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>apt install libtool<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>configure.ac:15: error: required file &#039;.\/ltmain.sh&#039; not found<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libtoolize\u5931\u8d25<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u91cd\u65b0\u6267\u884clibtoolize &#8211;automake &#8211;copy &#8211;force\u540e\u518dbootstrap<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"2.4%20%E7%AC%AC%E4%BA%8C%E6%AD%A5%EF%BC%9Aconfigure%E5%8F%82%E6%95%B0%E8%AF%A6%E8%A7%A3%E4%B8%8E%E5%8A%9F%E8%83%BD%E5%AE%9A%E5%88%B6\">2.4 \u7b2c\u4e8c\u6b65&#xff1a;configure\u53c2\u6570\u8be6\u89e3\u4e0e\u529f\u80fd\u5b9a\u5236<\/h3>\n<p>2.4.1 \u6838\u5fc3\u8def\u5f84\u53c2\u6570<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u53c2\u6570<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u542b\u4e49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u63a8\u8350\u53d6\u503c<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;prefix&#061;DIR<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b89\u88c5\u6839\u8def\u5f84<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/local&#xff08;\u4e0d\u6c61\u67d3\u7cfb\u7edf&#xff09;\u6216\/usr&#xff08;\u8986\u76d6\u7cfb\u7edf\u7248\u672c&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;sysconfdir&#061;DIR<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6e\u6587\u4ef6\u76ee\u5f55<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/etc<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;localstatedir&#061;DIR<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u53ef\u53d8\u72b6\u6001\u6570\u636e\u76ee\u5f55<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/var<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>BlueZ\u6e90\u7801\u4e2dconfigure.ac\u7b2c13\u884c\u660e\u786e\u9ed8\u8ba4&#8211;prefix&#061;\/usr\/local\u3002<\/p>\n<p>2.4.2 \u529f\u80fd\u5f00\u5173\u53c2\u6570<\/p>\n<p>\u57fa\u4e8econfigure.ac\u5b9e\u9645\u5b9a\u4e49&#xff0c;\u6574\u7406\u5e38\u7528\u5f00\u5173&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u53c2\u6570<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u529f\u80fd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u9ed8\u8ba4<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-mesh<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mesh\u7ec4\u7f51\u534f\u8bae\u6808<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-btpclient<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>BTP\u6d4b\u8bd5\u5ba2\u6237\u7aef<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-midi<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>MIDI\u652f\u6301&#xff08;\u4f9d\u8d56ALSA&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-testing<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f16\u8bd1\u6d4b\u8bd5\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-experimental<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b9e\u9a8c\u6027\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-deprecated<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5e9f\u5f03\u5de5\u5177&#xff08;gatttool\u7b49&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-library<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b89\u88c5libbluetooth.so<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-backtrace<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5d29\u6e83\u56de\u6eaf\u652f\u6301<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-debug<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8c03\u8bd5\u4fe1\u606f<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-sixaxis<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u516d\u8f74\u624b\u67c4\u63d2\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-hid2hci<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HID\u8f6cHCI\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-logger<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HCI\u65e5\u5fd7\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-admin<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Admin\u7b56\u7565\u63d2\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-external-plugins<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5916\u90e8\u63d2\u4ef6\u652f\u6301<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5173\u95ed<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-a2dp<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>A2DP\u97f3\u9891Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-avrcp<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>AVRCP\u63a7\u5236Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-hfp<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HFP\u514d\u63d0Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-bap<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>BAP LE Audio<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-network<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f51\u7edcProfile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-hid<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HID Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-hog<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HoG Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-obex<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u6587\u4ef6\u4f20\u8f93<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-tools<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5de5\u5177\u96c6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-monitor<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>btmon\u6293\u5305\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-client<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothctl<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-udev<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>udev\u8bbe\u5907\u7ba1\u7406<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-systemd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>systemd\u96c6\u6210<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-cups<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>CUPS\u6253\u5370\u652f\u6301<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-datafiles<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6e\u6587\u4ef6\u5b89\u88c5<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-manpages<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>man\u624b\u518c\u7f16\u8bd1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5f00\u542f<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>2.4.3 \u901a\u7528\u63a8\u8350\u914d\u7f6e\u547d\u4ee4<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;prefix&#061;\/usr \\\\<br \/>\n    &#8211;sysconfdir&#061;\/etc \\\\<br \/>\n    &#8211;localstatedir&#061;\/var \\\\<br \/>\n    &#8211;enable-library \\\\<br \/>\n    &#8211;enable-mesh \\\\<br \/>\n    &#8211;enable-testing \\\\<br \/>\n    &#8211;enable-experimental \\\\<br \/>\n    &#8211;enable-deprecated \\\\<br \/>\n    &#8211;enable-manpages \\\\<br \/>\n    &#8211;enable-backtrace \\\\<br \/>\n    &#8211;enable-hid2hci \\\\<br \/>\n    &#8211;enable-logger \\\\<br \/>\n    &#8211;enable-admin \\\\<br \/>\n    &#8211;disable-cups <\/p>\n<p>\u53c2\u6570\u89e3\u91ca&#xff1a;<\/p>\n<ul>\n<li>\n<p>&#8211;prefix&#061;\/usr&#xff1a;\u76f4\u63a5\u8986\u76d6\u7cfb\u7edfBlueZ&#xff0c;\u65b9\u4fbf\u8c03\u8bd5<\/p>\n<\/li>\n<li>\n<p>&#8211;sysconfdir&#061;\/etc&#xff1a;\u914d\u7f6e\u6587\u4ef6\u653e\/etc\/bluetooth\/<\/p>\n<\/li>\n<li>\n<p>&#8211;localstatedir&#061;\/var&#xff1a;\u72b6\u6001\u6570\u636e\u653e\/var\/lib\/bluetooth\/<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-library&#xff1a;\u5b89\u88c5libbluetooth.so&#xff0c;\u4f9b\u5916\u90e8\u7a0b\u5e8f\u94fe\u63a5<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-mesh&#xff1a;\u5f00\u542fMesh&#xff0c;\u505aMesh\u5f00\u53d1\u5fc5\u5907<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-testing&#xff1a;\u7f16\u8bd1tester\u5de5\u5177&#xff0c;\u5355\u5143\u6d4b\u8bd5\u7528<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-experimental&#xff1a;\u5b9e\u9a8c\u6027\u5de5\u5177&#xff0c;\u5982btmgmt\u90e8\u5206\u9ad8\u7ea7\u547d\u4ee4<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-deprecated&#xff1a;\u4fdd\u7559gatttool&#xff0c;\u8001\u9879\u76ee\u8fc1\u79fb\u671f\u5e38\u7528<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-manpages&#xff1a;\u751f\u6210man\u624b\u518c<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-backtrace&#xff1a;bluetoothd\u5d29\u6e83\u65f6\u6253\u5370\u8c03\u7528\u6808<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-hid2hci&#xff1a;HID\u8f6cHCI\u5de5\u5177&#xff0c;\u5904\u7406\u84dd\u7259\u63a7\u5236\u5668\u6a21\u5f0f\u5207\u6362<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-logger&#xff1a;HCI\u65e5\u5fd7\u5b88\u62a4\u670d\u52a1<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-admin&#xff1a;Admin\u7b56\u7565\u63d2\u4ef6&#xff0c;\u8fd0\u884c\u65f6\u7b56\u7565\u63a7\u5236<\/p>\n<\/li>\n<li>\n<p>&#8211;disable-cups&#xff1a;\u7981\u7528CUPS\u6253\u5370\u652f\u6301&#xff0c;\u684c\u9762\u8c03\u8bd5\u901a\u5e38\u7528\u4e0d\u5230<\/p>\n<\/li>\n<\/ul>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2326\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120046-6a6b3ceeac88e.png\" width=\"892\" \/><\/p>\n<h3 id=\"2.5%20%E7%AC%AC%E4%B8%89%E6%AD%A5%EF%BC%9Amake%E7%BC%96%E8%AF%91%E4%B8%8E%E5%AE%89%E8%A3%85\">2.5 \u7b2c\u4e09\u6b65&#xff1a;make\u7f16\u8bd1\u4e0e\u5b89\u88c5<\/h3>\n<p># \u5e76\u884c\u7f16\u8bd1&#xff0c;\u5145\u5206\u5229\u7528\u591a\u6838<br \/>\nmake -j$(nproc)<\/p>\n<p># \u5b89\u88c5&#xff08;\u9700\u8981root\u6743\u9650&#xff09;<br \/>\nsudo make install <\/p>\n<p>-j$(nproc)\u4e2dnproc\u8fd4\u56deCPU\u903b\u8f91\u6838\u6570&#xff0c;\u5e76\u884c\u7f16\u8bd1\u53ef\u663e\u8457\u7f29\u77ed\u65f6\u95f4&#xff08;5.87\u5168\u529f\u80fd\u7f16\u8bd1\u7ea63-5\u5206\u949f&#xff09;\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2207\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120047-6a6b3cefdf68f.png\" width=\"560\" \/><\/p>\n<p>\u5b89\u88c5\u4ea7\u7269\u5206\u5e03&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4ea7\u7269\u7c7b\u578b<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b89\u88c5\u8def\u5f84<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8bf4\u660e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u540e\u53f0\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/libexec\/bluetooth\/bluetoothd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4e3b\u5b88\u62a4\u8fdb\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mesh\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/libexec\/bluetooth\/bluetooth-meshd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mesh\u5b88\u62a4\u8fdb\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/libexec\/bluetooth\/obexd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u5b88\u62a4\u8fdb\u7a0b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u547d\u4ee4\u884c\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/bin\/bluetoothctl\u3001\/usr\/bin\/btmgmt\u3001\/usr\/bin\/btmon\u7b49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5404\u7c7bCLI\u5de5\u5177<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u52a8\u6001\u5e93<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/lib\/x86_64-linux-gnu\/libbluetooth.so*<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u516c\u5171API\u5e93<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/etc\/bluetooth\/main.conf\u3001\/etc\/bluetooth\/input.conf\u7b49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5404\u6a21\u5757\u914d\u7f6e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>DBus\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/share\/dbus-1\/system-services\/org.bluez.service<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7cfb\u7edf\u603b\u7ebf\u670d\u52a1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>systemd\u670d\u52a1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/lib\/systemd\/system\/bluetooth.service<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>systemd\u5355\u5143<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>udev\u89c4\u5219<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/lib\/udev\/rules.d\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8bbe\u5907\u70ed\u63d2\u62d4\u89c4\u5219<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>man\u624b\u518c<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\/usr\/share\/man\/man8\/<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u547d\u4ee4\u624b\u518c<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1280\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120048-6a6b3cf085d07.png\" width=\"1201\" \/><\/p>\n<p>\u907f\u514d\u4e0e\u7cfb\u7edf\u81ea\u5e26\u7248\u672c\u51b2\u7a81&#xff1a;<\/p>\n<p># \u505c\u7528\u7cfb\u7edf\u81ea\u5e26\u7684bluetoothd<br \/>\nsudo systemctl stop bluetooth<br \/>\nsudo systemctl disable bluetooth<\/p>\n<p># \u542f\u7528\u65b0\u7f16\u8bd1\u7684\u7248\u672c<br \/>\nsudo systemctl daemon-reload<br \/>\nsudo systemctl enable bluetooth<br \/>\nsudo systemctl start bluetooth <\/p>\n<h3 id=\"2.6%20%E7%BC%96%E8%AF%91%E7%BB%93%E6%9E%9C%E9%AA%8C%E8%AF%81\">2.6 \u7f16\u8bd1\u7ed3\u679c\u9a8c\u8bc1<\/h3>\n<p># \u7248\u672c\u9a8c\u8bc1<br \/>\nbluetoothctl &#8211;version<br \/>\n# \u9884\u671f\u8f93\u51fa: 5.87<\/p>\n<p>bluetoothd &#8211;version<br \/>\n# \u9884\u671f\u8f93\u51fa: 5.87<\/p>\n<p># \u529f\u80fd\u6a21\u5757\u9a8c\u8bc1&#xff08;\u901a\u8fc7DBus\u67e5\u770b\u542f\u7528\u7684\u7279\u6027&#xff09;<br \/>\nbusctl tree org.bluez | head -20<br \/>\n# \u5e94\u80fd\u770b\u5230\/org\/bluez\/hci0\u7b49\u9002\u914d\u5668\u8282\u70b9<\/p>\n<p># btmon\u6293\u5305\u80fd\u529b\u9a8c\u8bc1<br \/>\nbtmon &#8211;version<br \/>\n# \u9884\u671f\u8f93\u51fa: 5.87 <\/p>\n<h3 id=\"2.7%20%E5%9F%BA%E7%A1%80%E6%8A%A5%E9%94%99%E6%B1%87%E6%80%BB\">2.7 \u57fa\u7840\u62a5\u9519\u6c47\u603b<\/h3>\n<p>configure\u9636\u6bb5\u4f9d\u8d56\u7f3a\u5931\u901a\u7528\u6392\u67e5&#xff1a;<\/p>\n<p># \u67e5\u770b\u8be6\u7ec6\u65e5\u5fd7&#xff0c;\u5b9a\u4f4d\u7f3a\u5931\u7684\u5177\u4f53\u4f9d\u8d56<br \/>\ntail -100 config.log | grep -A5 &#034;error&#034; <\/p>\n<p>make\u9636\u6bb5\u5e38\u89c1\u9519\u8bef&#xff1a;<\/p>\n<ul>\n<li>\n<p>error: bluetooth\/bluetooth.h: No such file&#xff1a;\u5185\u6838\u5934\u6587\u4ef6\u7f3a\u5931&#xff0c;\u88c5linux-libc-dev<\/p>\n<\/li>\n<li>\n<p>error: readline\/readline.h: No such file&#xff1a;\u88c5libreadline-dev<\/p>\n<\/li>\n<li>\n<p>undefined reference to &#039;g_malloc&#039;&#xff1a;GLib\u5f00\u53d1\u5305\u672a\u6b63\u786e\u94fe\u63a5&#xff0c;\u68c0\u67e5pkg-config &#8211;libs glib-2.0<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"%E4%B8%89%E3%80%81%E5%B5%8C%E5%85%A5%E5%BC%8FARM%E5%B9%B3%E5%8F%B0%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E5%85%A8%E6%B5%81%E7%A8%8B\">\u4e09\u3001\u5d4c\u5165\u5f0fARM\u5e73\u53f0\u4ea4\u53c9\u7f16\u8bd1\u5168\u6d41\u7a0b<\/h2>\n<h3 id=\"3.1%20%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E6%A0%B8%E5%BF%83%E5%8E%9F%E7%90%86%E4%B8%8E%E5%89%8D%E7%BD%AE%E5%87%86%E5%A4%87\">3.1 \u4ea4\u53c9\u7f16\u8bd1\u6838\u5fc3\u539f\u7406\u4e0e\u524d\u7f6e\u51c6\u5907<\/h3>\n<p>3.1.1 \u4e3a\u4ec0\u4e48BlueZ\u4ea4\u53c9\u7f16\u8bd1\u96be\u5ea6\u8fdc\u9ad8\u4e8e\u666e\u901a\u7a0b\u5e8f<\/p>\n<p>\u666e\u901a\u7a0b\u5e8f\u4ea4\u53c9\u7f16\u8bd1&#xff0c;\u5f80\u5f80\u53ea\u9700\u8981&#xff1a;<\/p>\n<p>.\/configure &#8211;host&#061;arm-linux-gnueabihf<br \/>\nmake <\/p>\n<p>\u4f46BlueZ\u4e0d\u884c\u3002\u5b83\u7684\u4f9d\u8d56\u94fe\u662f\u8fd9\u6837\u7684&#xff1a;<\/p>\n<p>BlueZ\u4e3b\u7a0b\u5e8f<br \/>\n\u251c\u2500\u2500 glib-2.0 (\u4e00\u7ea7\u4f9d\u8d56)<br \/>\n\u2502   \u251c\u2500\u2500 libffi (\u4e8c\u7ea7\u4f9d\u8d56)<br \/>\n\u2502   \u251c\u2500\u2500 pcre2 (\u4e8c\u7ea7\u4f9d\u8d56)<br \/>\n\u2502   \u2514\u2500\u2500 zlib (\u4e8c\u7ea7\u4f9d\u8d56)<br \/>\n\u251c\u2500\u2500 dbus-1 (\u4e00\u7ea7\u4f9d\u8d56)<br \/>\n\u2502   \u2514\u2500\u2500 expat (\u4e8c\u7ea7\u4f9d\u8d56)<br \/>\n\u251c\u2500\u2500 libical (\u4e00\u7ea7\u4f9d\u8d56&#xff0c;OBEX\u53ef\u9009)<br \/>\n\u251c\u2500\u2500 readline (\u4e00\u7ea7\u4f9d\u8d56&#xff0c;client\u53ef\u9009)<br \/>\n\u2502   \u2514\u2500\u2500 ncurses (\u4e8c\u7ea7\u4f9d\u8d56)<br \/>\n\u251c\u2500\u2500 libudev (\u4e00\u7ea7\u4f9d\u8d56&#xff0c;\u53ef\u9009)<br \/>\n\u2502   \u2514\u2500\u2500 (\u6765\u81easystemd\u6e90\u7801)<br \/>\n\u251c\u2500\u2500 json-c (\u4e00\u7ea7\u4f9d\u8d56&#xff0c;Mesh\u53ef\u9009)<br \/>\n\u2514\u2500\u2500 ell (\u4e00\u7ea7\u4f9d\u8d56&#xff0c;Mesh\/BTP Client\u53ef\u9009) <\/p>\n<p>\u4ea4\u53c9\u7f16\u8bd1\u7b2c\u4e00\u539f\u5219&#xff1a;\u6240\u6709\u4f9d\u8d56\u5e93\u7684\u67b6\u6784\u5fc5\u987b\u548c\u76ee\u6807\u5e73\u53f0\u4e00\u81f4&#xff0c;\u4e14\u5fc5\u987b\u5148\u4e8e\u4e3b\u7a0b\u5e8f\u5b8c\u6210\u4ea4\u53c9\u7f16\u8bd1&#xff0c;\u5b89\u88c5\u5230\u7edf\u4e00\u7684sysroot\u4e2d\u3002\u4efb\u4f55\u4e00\u4e2a\u4f9d\u8d56\u7528\u9519\u4e86\u67b6\u6784&#xff08;\u6bd4\u5982\u8bef\u7528\u4e86x86_64\u7684glib&#xff09;&#xff0c;\u94fe\u63a5\u9636\u6bb5\u5c31\u4f1a\u62a5\u67b6\u6784\u4e0d\u5339\u914d\u9519\u8bef\u3002<\/p>\n<p>3.1.2 \u5de5\u5177\u94fe\u73af\u5883\u914d\u7f6e<\/p>\n<p>\u5047\u8bbe\u4f60\u7684ARM\u4ea4\u53c9\u5de5\u5177\u94fe\u524d\u7f00\u662farm-linux-gnueabihf-&#xff08;32\u4f4dARM&#xff09;\u6216aarch64-linux-gnu-&#xff08;64\u4f4dARM&#xff09;&#xff0c;\u6838\u5fc3\u73af\u5883\u53d8\u91cf&#xff1a;<\/p>\n<p>export CROSS_PREFIX&#061;arm-linux-gnueabihf<br \/>\nexport CROSS_HOME&#061;\/opt\/$CROSS_PREFIX<\/p>\n<p># \u7f16\u8bd1\u5668<br \/>\nexport CC&#061;$CROSS_PREFIX-gcc<br \/>\nexport CXX&#061;$CROSS_PREFIX-g&#043;&#043;<br \/>\nexport LD&#061;$CROSS_PREFIX-ld<br \/>\nexport AR&#061;$CROSS_PREFIX-ar<br \/>\nexport RANLIB&#061;$CROSS_PREFIX-ranlib<br \/>\nexport STRIP&#061;$CROSS_PREFIX-strip<\/p>\n<p># sysroot\u8def\u5f84<br \/>\nexport SYSROOT&#061;$CROSS_HOME\/sysroot<br \/>\nexport TARGET_PREFIX&#061;$SYSROOT\/usr<\/p>\n<p># pkg-config\u4ea4\u53c9\u7f16\u8bd1\u914d\u7f6e&#xff08;\u6700\u5173\u952e&#xff09;<br \/>\nexport PKG_CONFIG_PATH&#061;$TARGET_PREFIX\/lib\/pkgconfig:$TARGET_PREFIX\/share\/pkgconfig<br \/>\nexport PKG_CONFIG_LIBDIR&#061;$TARGET_PREFIX\/lib\/pkgconfig:$TARGET_PREFIX\/share\/pkgconfig<br \/>\nexport PKG_CONFIG_SYSROOT_DIR&#061;$SYSROOT <\/p>\n<p>\u5173\u952e\u70b9&#xff1a;<\/p>\n<ul>\n<li>\n<p>PKG_CONFIG_PATH&#xff1a;\u544a\u8bc9pkg-config\u53bb\u54ea\u627e.pc\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>PKG_CONFIG_LIBDIR&#xff1a;\u8986\u76d6\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84&#xff0c;\u907f\u514d\u627e\u5230x86_64\u7cfb\u7edf\u7684.pc\u6587\u4ef6<\/p>\n<\/li>\n<li>\n<p>PKG_CONFIG_SYSROOT_DIR&#xff1a;\u8ba9pkg-config\u5728\u8def\u5f84\u524d\u81ea\u52a8\u52a0\u4e0asysroot<\/p>\n<\/li>\n<\/ul>\n<p>3.1.3 \u7edf\u4e00\u5de5\u4f5c\u76ee\u5f55\u89c4\u5212<\/p>\n<p>mkdir -p ~\/bluez-cross\/{src,build,install}<br \/>\nexport BUILD_DIR&#061;~\/bluez-cross\/build<br \/>\nexport INSTALL_DIR&#061;~\/bluez-cross\/install<br \/>\n# INSTALL_DIR\u5c31\u662f\u6211\u4eec\u7684sysroot&#xff0c;\u6240\u6709\u4f9d\u8d56\u88c5\u5230\u8fd9\u91cc<br \/>\nexport SYSROOT&#061;$INSTALL_DIR <\/p>\n<p>\u89c4\u8303\u76ee\u5f55\u5e03\u5c40\u80fd\u907f\u514d\u540e\u671f&#034;\u88c5\u5230\u54ea\u4e86&#034;\u7684\u6df7\u4e71\u3002<\/p>\n<h3 id=\"3.2%20%E4%BE%9D%E8%B5%96%E5%BA%93%E5%B1%82%E7%BA%A7%E6%8B%86%E8%A7%A3%E4%B8%8E%E9%80%90%E5%BA%93%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E5%AE%9E%E6%88%98\">3.2 \u4f9d\u8d56\u5e93\u5c42\u7ea7\u62c6\u89e3\u4e0e\u9010\u5e93\u4ea4\u53c9\u7f16\u8bd1\u5b9e\u6218<\/h3>\n<p>3.2.1 zlib\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/zlib.net\/zlib-1.3.1.tar.xz<br \/>\ntar xf zlib-1.3.1.tar.xz &amp;&amp; cd zlib-1.3.1<\/p>\n<p># zlib\u7528configure\u4e0d\u662fautotools&#xff0c;\u9700\u6307\u5b9aCHOST<br \/>\nCHOST&#061;$CROSS_PREFIX .\/configure \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;static<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>\u8e29\u5751&#xff1a;zlib\u7684configure\u4e0d\u8bc6\u522b&#8211;host&#xff0c;\u5fc5\u987b\u7528CHOST\u73af\u5883\u53d8\u91cf\u4f20\u9012\u76ee\u6807\u5e73\u53f0\u3002<\/p>\n<p>3.2.2 libffi\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/github.com\/libffi\/libffi\/releases\/download\/v3.4.6\/libffi-3.4.6.tar.gz<br \/>\ntar xf libffi-3.4.6.tar.gz &amp;&amp; cd libffi-3.4.6<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;enable-static \\\\<br \/>\n    &#8211;disable-shared<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>3.2.3 pcre2\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/github.com\/PCRE2Project\/pcre2\/releases\/download\/pcre2-10.43\/pcre2-10.43.tar.bz2<br \/>\ntar xf pcre2-10.43.tar.bz2 &amp;&amp; cd pcre2-10.43<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;enable-static \\\\<br \/>\n    &#8211;disable-shared \\\\<br \/>\n    &#8211;disable-jit \\\\<br \/>\n    &#8211;enable-unicode<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>\u8e29\u5751&#xff1a;pcre2\u7684JIT\u5728\u67d0\u4e9bARM\u5e73\u53f0\u7f16\u8bd1\u4f1a\u5931\u8d25&#xff0c;\u4ea4\u53c9\u7f16\u8bd1\u65f6\u5efa\u8bae&#8211;disable-jit\u3002<\/p>\n<p>3.2.4 glib\u4ea4\u53c9\u7f16\u8bd1&#xff08;\u6838\u5fc3\u96be\u70b9&#xff09;<\/p>\n<p>glib\u7684\u4ea4\u53c9\u7f16\u8bd1\u662f\u6240\u6709\u4f9d\u8d56\u4e2d\u6700\u5bb9\u6613\u7ffb\u8f66\u7684&#xff0c;\u5fc5\u987b\u501f\u52a9meson\u6784\u5efa\u7cfb\u7edf&#xff1a;<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/download.gnome.org\/sources\/glib\/2.78\/glib-2.78.4.tar.xz<br \/>\ntar xf glib-2.78.4.tar.xz &amp;&amp; cd glib-2.78.4<\/p>\n<p># \u5199meson\u4ea4\u53c9\u7f16\u8bd1\u914d\u7f6e\u6587\u4ef6<br \/>\ncat &gt; meson-cross.txt &lt;&lt; EOF<br \/>\n[binaries]<br \/>\nc &#061; &#039;$CC&#039;<br \/>\ncpp &#061; &#039;$CXX&#039;<br \/>\nar &#061; &#039;$AR&#039;<br \/>\nstrip &#061; &#039;$STRIP&#039;<br \/>\npkgconfig &#061; &#039;pkg-config&#039;<\/p>\n<p>[built-in options]<br \/>\nc_args &#061; [&#039;-I$INSTALL_DIR\/usr\/include&#039;]<br \/>\nc_link_args &#061; [&#039;-L$INSTALL_DIR\/usr\/lib&#039;]<br \/>\ncpp_args &#061; [&#039;-I$INSTALL_DIR\/usr\/include&#039;]<br \/>\ncpp_link_args &#061; [&#039;-L$INSTALL_DIR\/usr\/lib&#039;]<\/p>\n<p>[host_machine]<br \/>\nsystem &#061; &#039;linux&#039;<br \/>\ncpu_family &#061; &#039;arm&#039;<br \/>\ncpu &#061; &#039;armv7&#039;<br \/>\nendian &#061; &#039;little&#039;<br \/>\nEOF<\/p>\n<p># \u5b89\u88c5meson\u548cninja&#xff08;\u5728\u4e3b\u673a\u4e0a&#xff09;<br \/>\npip3 install meson ninja<\/p>\n<p># \u914d\u7f6e<br \/>\nmeson setup _build \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;cross-file&#061;meson-cross.txt \\\\<br \/>\n    &#8211;default-library&#061;static \\\\<br \/>\n    -Dlibmount&#061;disabled \\\\<br \/>\n    -Dselinux&#061;disabled \\\\<br \/>\n    -Dsysprof&#061;disabled \\\\<br \/>\n    -Dinternal_pcre&#061;false<\/p>\n<p># \u7f16\u8bd1\u5b89\u88c5<br \/>\nninja -C _build &amp;&amp; ninja -C _build install <\/p>\n<p>\u8e29\u5751\u96c6\u9526&#xff1a;<\/p>\n<ul>\n<li>\n<p>libmount: not found&#xff1a;\u9ed8\u8ba4\u4f9d\u8d56libmount&#xff0c;\u52a0-Dlibmount&#061;disabled\u7981\u7528<\/p>\n<\/li>\n<li>\n<p>selinux: not found&#xff1a;\u5d4c\u5165\u5f0f\u901a\u5e38\u4e0d\u9700\u8981selinux&#xff0c;\u52a0-Dselinux&#061;disabled<\/p>\n<\/li>\n<li>\n<p>\u627e\u4e0d\u5230pcre2&#xff1a;\u68c0\u67e5PKG_CONFIG_PATH\u662f\u5426\u5305\u542b$INSTALL_DIR\/usr\/lib\/pkgconfig<\/p>\n<\/li>\n<\/ul>\n<p>3.2.5 expat\u4e0edbus\u4ea4\u53c9\u7f16\u8bd1<\/p>\n<p># expat&#xff08;dbus\u4f9d\u8d56&#xff09;<br \/>\ncd $BUILD_DIR<br \/>\nwget https:\/\/github.com\/libexpat\/libexpat\/releases\/download\/R_2_6_0\/expat-2.6.0.tar.xz<br \/>\ntar xf expat-2.6.0.tar.xz &amp;&amp; cd expat-2.6.0<br \/>\n.\/configure &#8211;host&#061;$CROSS_PREFIX &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;enable-static &#8211;disable-shared<br \/>\nmake -j$(nproc) &amp;&amp; make install<\/p>\n<p># dbus<br \/>\ncd $BUILD_DIR<br \/>\nwget https:\/\/dbus.freedesktop.org\/releases\/dbus\/dbus-1.14.10.tar.xz<br \/>\ntar xf dbus-1.14.10.tar.xz &amp;&amp; cd dbus-1.14.10<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;sysconfdir&#061;\/etc \\\\<br \/>\n    &#8211;localstatedir&#061;\/var \\\\<br \/>\n    &#8211;enable-static \\\\<br \/>\n    &#8211;disable-shared \\\\<br \/>\n    &#8211;disable-systemd \\\\<br \/>\n    &#8211;disable-tests \\\\<br \/>\n    &#8211;with-dbus-user&#061;messagebus \\\\<br \/>\n    CFLAGS&#061;&#034;-I$INSTALL_DIR\/usr\/include&#034; \\\\<br \/>\n    LDFLAGS&#061;&#034;-L$INSTALL_DIR\/usr\/lib&#034;<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>3.2.6 libudev\u4ea4\u53c9\u7f16\u8bd1&#xff08;\u6765\u81easystemd\u6e90\u7801&#xff09;<\/p>\n<p>libudev\u4e0d\u518d\u5355\u72ec\u53d1\u5e03&#xff0c;\u9700\u8981\u4ecesystemd\u6e90\u7801\u4e2d\u62bd\u53d6\u7f16\u8bd1&#xff1a;<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/github.com\/systemd\/systemd\/archive\/refs\/tags\/v255.tar.gz<br \/>\ntar xf v255.tar.gz &amp;&amp; cd systemd-255<\/p>\n<p># systemd\u4e5f\u7528meson<br \/>\ncat &gt; meson-cross.txt &lt;&lt; EOF<br \/>\n[binaries]<br \/>\nc &#061; &#039;$CC&#039;<br \/>\ncpp &#061; &#039;$CXX&#039;<br \/>\nar &#061; &#039;$AR&#039;<br \/>\nstrip &#061; &#039;$STRIP&#039;<br \/>\npkgconfig &#061; &#039;pkg-config&#039;<\/p>\n<p>[host_machine]<br \/>\nsystem &#061; &#039;linux&#039;<br \/>\ncpu_family &#061; &#039;arm&#039;<br \/>\ncpu &#061; &#039;armv7&#039;<br \/>\nendian &#061; &#039;little&#039;<br \/>\nEOF<\/p>\n<p>meson setup _build \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;cross-file&#061;meson-cross.txt \\\\<br \/>\n    -Drootprefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    -Dlibdir&#061;lib \\\\<br \/>\n    -Dstatic-libudev&#061;true \\\\<br \/>\n    -Dshared-libudev&#061;false \\\\<br \/>\n    -Dblkid&#061;disabled \\\\<br \/>\n    -Dgshadow&#061;false \\\\<br \/>\n    -Dseccomp&#061;disabled \\\\<br \/>\n    -Dselinux&#061;disabled \\\\<br \/>\n    -Dapparmor&#061;disabled \\\\<br \/>\n    -Dpolkit&#061;disabled \\\\<br \/>\n    -Dacl&#061;disabled \\\\<br \/>\n    -Daudit&#061;disabled \\\\<br \/>\n    -Dgcrypt&#061;disabled \\\\<br \/>\n    -Dmicrohttpd&#061;disabled \\\\<br \/>\n    -Dgnutls&#061;disabled \\\\<br \/>\n    -Dlibcurl&#061;disabled \\\\<br \/>\n    -Dlibidn2&#061;disabled \\\\<br \/>\n    -Dlibiptc&#061;disabled \\\\<br \/>\n    -Dqrencode&#061;disabled \\\\<br \/>\n    -Dlz4&#061;disabled \\\\<br \/>\n    -Dxz&#061;disabled \\\\<br \/>\n    -Dzstd&#061;disabled<\/p>\n<p># \u53ea\u7f16\u8bd1\u5e76\u5b89\u88c5libudev<br \/>\nninja -C _build libudev.so<br \/>\nninja -C _build install <\/p>\n<p>\u8e29\u5751&#xff1a;systemd\u9ed8\u8ba4\u4f1a\u7f16\u8bd1\u4e00\u5927\u5806\u670d\u52a1&#xff0c;\u7528\u5404\u79cd-Dxxx&#061;disabled\u7981\u7528&#xff0c;\u53ea\u7559libudev\u3002<\/p>\n<p>3.2.7 libical\u4ea4\u53c9\u7f16\u8bd1&#xff08;OBEX\u53ef\u9009&#xff09;<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/github.com\/libical\/libical\/releases\/download\/v3.0.17\/libical-3.0.17.tar.gz<br \/>\ntar xf libical-3.0.17.tar.gz &amp;&amp; cd libical-3.0.17<\/p>\n<p>mkdir build &amp;&amp; cd build<br \/>\ncmake .. \\\\<br \/>\n    -DCMAKE_C_COMPILER&#061;$CC \\\\<br \/>\n    -DCMAKE_INSTALL_PREFIX&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    -DCMAKE_FIND_ROOT_PATH&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM&#061;NEVER \\\\<br \/>\n    -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY&#061;ONLY \\\\<br \/>\n    -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE&#061;ONLY \\\\<br \/>\n    -DBUILD_SHARED_LIBS&#061;OFF \\\\<br \/>\n    -DWITH_CXX_BINDINGS&#061;OFF<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>3.2.8 readline\u4ea4\u53c9\u7f16\u8bd1&#xff08;client\u53ef\u9009&#xff09;<\/p>\n<p>cd $BUILD_DIR<br \/>\nwget https:\/\/ftp.gnu.org\/gnu\/readline\/readline-8.2.tar.gz<br \/>\ntar xf readline-8.2.tar.gz &amp;&amp; cd readline-8.2<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;enable-static \\\\<br \/>\n    &#8211;disable-shared \\\\<br \/>\n    &#8211;with-curses \\\\<br \/>\n    bash_cv_wcwidth_broken&#061;no<\/p>\n<p>make -j$(nproc) &amp;&amp; make install <\/p>\n<p>\u8e29\u5751&#xff1a;readline\u4f9d\u8d56ncurses&#xff0c;\u9700\u5148\u4ea4\u53c9\u7f16\u8bd1ncurses&#xff1a;<\/p>\n<p>wget https:\/\/ftp.gnu.org\/gnu\/ncurses\/ncurses-6.4.tar.gz<br \/>\ntar xf ncurses-6.4.tar.gz &amp;&amp; cd ncurses-6.4<br \/>\n.\/configure &#8211;host&#061;$CROSS_PREFIX &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;enable-static &#8211;disable-shared &#8211;without-cxx-binding<br \/>\nmake -j$(nproc) &amp;&amp; make install <\/p>\n<p>pkg-config\u4ea4\u53c9\u7f16\u8bd1\u7684\u6838\u5fc3\u5751\u2014\u2014\u4e3a\u4ec0\u4e4890%\u7684\u4eba\u5931\u8d25\u5728\u8fd9\u91cc&#xff1a;<\/p>\n<p>pkg-config\u9ed8\u8ba4\u67e5\u627e\u4e3b\u673a\u7684.pc\u6587\u4ef6&#xff0c;\u627e\u5230\u7684glib-2.0.pc\u91cc\u5199\u7684\u662f\/usr\/lib\/x86_64-linux-gnu\u8fd9\u79cdx86_64\u8def\u5f84\u3002\u5373\u4f7f\u4f60\u8bbe\u4e86PKG_CONFIG_PATH\u6307\u5411\u4ea4\u53c9\u7f16\u8bd1\u4ea7\u7269&#xff0c;pkg-config\u8fd4\u56de\u7684\u5934\u6587\u4ef6\u8def\u5f84\u4ecd\u7136\u662f\u7edd\u5bf9\u8def\u5f84&#xff0c;\u7f16\u8bd1\u5668\u4f1a\u53bb\u4e3b\u673asysroot\u627ex86_64\u5934\u6587\u4ef6\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6848&#xff1a;\u5fc5\u987b\u540c\u65f6\u8bbe\u7f6ePKG_CONFIG_LIBDIR&#xff08;\u8986\u76d6\u9ed8\u8ba4\u641c\u7d22\u8def\u5f84&#xff09;\u548cPKG_CONFIG_SYSROOT_DIR&#xff08;\u81ea\u52a8\u52a0sysroot\u524d\u7f00&#xff09;\u3002\u524d\u9762\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u5df2\u7ecf\u5305\u542b\u3002<\/p>\n<p>\u9a8c\u8bc1pkg-config\u662f\u5426\u6b63\u786e&#xff1a;<\/p>\n<p>pkg-config &#8211;cflags glib-2.0<br \/>\n# \u9884\u671f: -I\/path\/to\/sysroot\/usr\/include\/glib-2.0 -I\/path\/to\/sysroot\/usr\/lib\/glib-2.0\/include<\/p>\n<p>pkg-config &#8211;libs glib-2.0<br \/>\n# \u9884\u671f: -L\/path\/to\/sysroot\/usr\/lib -lglib-2.0 <\/p>\n<p>\u5982\u679c\u8f93\u51fa\u8fd8\u5305\u542b\/usr\/include\u8fd9\u79cd\u4e3b\u673a\u8def\u5f84&#xff0c;\u8bf4\u660ePKG_CONFIG_LIBDIR\u6ca1\u751f\u6548\u3002<\/p>\n<h3 id=\"3.3%20BlueZ%E4%B8%BB%E7%A8%8B%E5%BA%8F%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E9%85%8D%E7%BD%AE%E4%B8%8E%E6%89%A7%E8%A1%8C\">3.3 BlueZ\u4e3b\u7a0b\u5e8f\u4ea4\u53c9\u7f16\u8bd1\u914d\u7f6e\u4e0e\u6267\u884c<\/h3>\n<p>3.3.1 \u5b8c\u6574configure\u547d\u4ee4<\/p>\n<p>cd $BUILD_DIR<br \/>\ncp -r \/path\/to\/bluez-source bluez-cross<br \/>\ncd bluez-cross<\/p>\n<p>.\/bootstrap<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;$INSTALL_DIR\/usr \\\\<br \/>\n    &#8211;sysconfdir&#061;\/etc \\\\<br \/>\n    &#8211;localstatedir&#061;\/var \\\\<br \/>\n    &#8211;enable-library \\\\<br \/>\n    &#8211;disable-systemd \\\\<br \/>\n    &#8211;disable-cups \\\\<br \/>\n    &#8211;disable-obex \\\\<br \/>\n    &#8211;disable-mesh \\\\<br \/>\n    &#8211;disable-midi \\\\<br \/>\n    &#8211;disable-btpclient \\\\<br \/>\n    &#8211;disable-sixaxis \\\\<br \/>\n    &#8211;disable-hid2hci \\\\<br \/>\n    &#8211;disable-logger \\\\<br \/>\n    &#8211;disable-admin \\\\<br \/>\n    &#8211;disable-external-plugins \\\\<br \/>\n    &#8211;disable-manpages \\\\<br \/>\n    &#8211;disable-test \\\\<br \/>\n    &#8211;disable-testing \\\\<br \/>\n    &#8211;disable-experimental \\\\<br \/>\n    &#8211;disable-deprecated \\\\<br \/>\n    &#8211;disable-backtrace \\\\<br \/>\n    &#8211;enable-tools \\\\<br \/>\n    &#8211;enable-monitor \\\\<br \/>\n    &#8211;enable-client \\\\<br \/>\n    &#8211;enable-a2dp \\\\<br \/>\n    &#8211;enable-avrcp \\\\<br \/>\n    &#8211;enable-hfp \\\\<br \/>\n    &#8211;enable-bap \\\\<br \/>\n    &#8211;enable-network \\\\<br \/>\n    &#8211;enable-hid \\\\<br \/>\n    &#8211;enable-hog \\\\<br \/>\n    \\\\<br \/>\n    CFLAGS&#061;&#034;-I$INSTALL_DIR\/usr\/include -O2 -g&#034; \\\\<br \/>\n    LDFLAGS&#061;&#034;-L$INSTALL_DIR\/usr\/lib&#034; \\\\<br \/>\n    \\\\<br \/>\n    GLIB_CFLAGS&#061;&#034;$(pkg-config &#8211;cflags glib-2.0)&#034; \\\\<br \/>\n    GLIB_LIBS&#061;&#034;$(pkg-config &#8211;libs glib-2.0)&#034; \\\\<br \/>\n    DBUS_CFLAGS&#061;&#034;$(pkg-config &#8211;cflags dbus-1)&#034; \\\\<br \/>\n    DBUS_LIBS&#061;&#034;$(pkg-config &#8211;libs dbus-1)&#034; \\\\<br \/>\n    UDEV_CFLAGS&#061;&#034;$(pkg-config &#8211;cflags libudev)&#034; \\\\<br \/>\n    UDEV_LIBS&#061;&#034;$(pkg-config &#8211;libs libudev)&#034; <\/p>\n<p>\u53c2\u6570\u89e3\u91ca&#xff1a;<\/p>\n<ul>\n<li>\n<p>&#8211;host&#061;$CROSS_PREFIX&#xff1a;\u544a\u8bc9configure\u8fd9\u662f\u4ea4\u53c9\u7f16\u8bd1&#xff0c;\u76ee\u6807\u5e73\u53f0\u662fARM<\/p>\n<\/li>\n<li>\n<p>&#8211;prefix\u7b49\u8def\u5f84\u53c2\u6570&#xff1a;\u677f\u7aef\u90e8\u7f72\u7684\u5b89\u88c5\u8def\u5f84<\/p>\n<\/li>\n<li>\n<p>\u4e00\u7cfb\u5217&#8211;disable-*&#xff1a;\u5d4c\u5165\u5f0f\u88c1\u526a&#xff0c;\u7981\u7528\u975e\u5fc5\u8981\u529f\u80fd&#xff08;systemd\/cups\/obex\/mesh\u7b49&#xff09;<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-tools\/monitor\/client&#xff1a;\u4fdd\u7559\u6838\u5fc3\u5de5\u5177&#xff0c;\u90e8\u7f72\u540e\u8c03\u8bd5\u5fc5\u5907<\/p>\n<\/li>\n<li>\n<p>&#8211;enable-a2dp\/avrcp\/hfp\/bap\u7b49&#xff1a;\u6839\u636e\u4ea7\u54c1\u9700\u6c42\u4fdd\u7559\u97f3\u9891Profile<\/p>\n<\/li>\n<li>\n<p>CFLAGS\/LDFLAGS&#xff1a;\u624b\u52a8\u6307\u5b9a\u5934\u6587\u4ef6\u548c\u5e93\u641c\u7d22\u8def\u5f84<\/p>\n<\/li>\n<li>\n<p>GLIB_CFLAGS\/GLIB_LIBS\u7b49&#xff1a;\u76f4\u63a5\u8986\u76d6pkg-config\u68c0\u6d4b\u7ed3\u679c&#xff0c;\u8fd9\u662f\u4ea4\u53c9\u7f16\u8bd1\u7684\u6740\u624b\u950f\u2014\u2014\u5f53configure\u7684pkg-config\u68c0\u6d4b\u51fa\u9519\u65f6&#xff0c;\u663e\u5f0f\u4f20\u5165CFLAGS\/LIBS\u53ef\u4ee5\u7ed5\u8fc7<\/p>\n<\/li>\n<\/ul>\n<p>3.3.2 \u6267\u884c\u7f16\u8bd1<\/p>\n<p>make -j$(nproc) <\/p>\n<p>\u5e38\u89c1\u94fe\u63a5\u9519\u8bef\u6392\u67e5&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u62a5\u9519<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u539f\u56e0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u89e3\u51b3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>undefined reference to &#039;g_malloc&#039;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u94fe\u63a5\u4e86x86_64\u7684glib<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u68c0\u67e5GLIB_LIBS\u662f\u5426\u6307\u5411sysroot<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>cannot find -lffi<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libffi\u672a\u4ea4\u53c9\u7f16\u8bd1\u6216\u8def\u5f84\u4e0d\u5bf9<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u91cd\u65b0\u4ea4\u53c9\u7f16\u8bd1libffi\u5e76\u88c5\u5230sysroot<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>ld: skipping incompatible \/usr\/lib\/libudev.so<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8bef\u94fe\u63a5\u4e86x86_64\u7684libudev<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u663e\u5f0f\u4f20UDEV_LIBS<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>error: unrecognized command-line option &#039;-m64&#039;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>host\u53c2\u6570\u4e0e\u5de5\u5177\u94fe\u4e0d\u5339\u914d<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u786e\u8ba4&#8211;host\u524d\u7f00\u4e0e\u5de5\u5177\u94fe\u4e00\u81f4<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"3.4%20%E7%BC%96%E8%AF%91%E4%BA%A7%E7%89%A9%E6%95%B4%E7%90%86%E4%B8%8E%E6%9D%BF%E7%AB%AF%E9%83%A8%E7%BD%B2\">3.4 \u7f16\u8bd1\u4ea7\u7269\u6574\u7406\u4e0e\u677f\u7aef\u90e8\u7f72<\/h3>\n<p>3.4.1 \u63d0\u53d6\u6838\u5fc3\u90e8\u7f72\u6587\u4ef6<\/p>\n<p>\u4e0d\u662f\u6240\u6709\u7f16\u8bd1\u4ea7\u7269\u90fd\u8981\u90e8\u7f72\u5230\u677f\u5b50\u3002\u6700\u5c0f\u5316\u90e8\u7f72\u6e05\u5355&#xff1a;<\/p>\n<p>mkdir -p $BUILD_DIR\/board-root\/{bin,sbin,lib,etc,share}<\/p>\n<p># \u4e3b\u5b88\u62a4\u8fdb\u7a0b<br \/>\ncp src\/bluetoothd $BUILD_DIR\/board-root\/sbin\/<\/p>\n<p># \u547d\u4ee4\u884c\u5de5\u5177<br \/>\ncp client\/bluetoothctl $BUILD_DIR\/board-root\/bin\/<br \/>\ncp tools\/btmgmt $BUILD_DIR\/board-root\/bin\/<br \/>\ncp tools\/btmon $BUILD_DIR\/board-root\/bin\/<br \/>\ncp tools\/btattach $BUILD_DIR\/board-root\/bin\/<\/p>\n<p># \u52a8\u6001\u5e93&#xff08;\u5982\u679c\u7528\u52a8\u6001\u94fe\u63a5&#xff09;<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libbluetooth.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libglib-2.0.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libgio-2.0.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libgmodule-2.0.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libgobject-2.0.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libffi.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libpcre2-8.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libdbus-1.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libudev.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libreadline.so* $BUILD_DIR\/board-root\/lib\/<br \/>\ncp $INSTALL_DIR\/usr\/lib\/libncurses.so* $BUILD_DIR\/board-root\/lib\/<\/p>\n<p># \u914d\u7f6e\u6587\u4ef6<br \/>\ncp src\/main.conf $BUILD_DIR\/board-root\/etc\/bluetooth\/<\/p>\n<p># DBus\u670d\u52a1\u6587\u4ef6<br \/>\ncp src\/org.bluez.service $BUILD_DIR\/board-root\/share\/dbus-1\/system-services\/ <\/p>\n<p>3.4.2 strip\u7cbe\u7b80\u4f53\u79ef<\/p>\n<p>$STRIP $BUILD_DIR\/board-root\/sbin\/bluetoothd<br \/>\n$STRIP $BUILD_DIR\/board-root\/bin\/*<br \/>\n$STRIP $BUILD_DIR\/board-root\/lib\/*.so <\/p>\n<p>strip\u524d\u540e\u4f53\u79ef\u5bf9\u6bd4&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6587\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>strip\u524d<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>strip\u540e<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~3.2MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~1.1MB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothctl<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~1.8MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~650KB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>btmon<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~2.1MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~720KB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>libglib-2.0.so<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~1.4MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~520KB<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5d4c\u5165\u5f0f\u5b58\u50a8\u7a7a\u95f4\u7d27\u5f20\u65f6&#xff0c;strip\u662f\u5fc5\u5907\u64cd\u4f5c\u3002<\/p>\n<p>3.4.3 \u677f\u7aef\u90e8\u7f72\u76ee\u5f55\u89c4\u5212<\/p>\n<p>\u5173\u952e\u539f\u5219&#xff1a;\u4e0d\u8981\u8986\u76d6\u677f\u7aef\u7cfb\u7edf\u539f\u6709\u7684BlueZ\u6587\u4ef6&#xff0c;\u72ec\u7acb\u90e8\u7f72\u5230\u81ea\u5b9a\u4e49\u76ee\u5f55&#xff0c;\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u5207\u6362\u3002<\/p>\n<p>\u5047\u8bbe\u90e8\u7f72\u5230\/opt\/bluez&#xff1a;<\/p>\n<p># \u5728\u5f00\u53d1\u677f\u4e0a<br \/>\nmkdir -p \/opt\/bluez\/{bin,sbin,lib,etc,share,var}<\/p>\n<p># \u4ece\u4e3b\u673ascp\u8fc7\u53bb<br \/>\nscp -r board-root\/* root&#064;board-ip:\/opt\/bluez\/ <\/p>\n<p>3.4.4 \u52a8\u6001\u5e93\u8def\u5f84\u914d\u7f6e<\/p>\n<p># \u65b9\u6848\u4e00&#xff1a;\u4e34\u65f6\u751f\u6548<br \/>\nexport LD_LIBRARY_PATH&#061;\/opt\/bluez\/lib:$LD_LIBRARY_PATH<\/p>\n<p># \u65b9\u6848\u4e8c&#xff1a;\u6c38\u4e45\u751f\u6548<br \/>\necho &#034;\/opt\/bluez\/lib&#034; &gt; \/etc\/ld.so.conf.d\/bluez.conf<br \/>\nldconfig<\/p>\n<p># \u65b9\u6848\u4e09&#xff1a;\u5728\u542f\u52a8\u811a\u672c\u4e2d\u8bbe\u7f6e<br \/>\ncat &gt; \/etc\/init.d\/bluetoothd-custom &lt;&lt; &#039;EOF&#039;<br \/>\n#!\/bin\/sh<br \/>\nexport LD_LIBRARY_PATH&#061;\/opt\/bluez\/lib<br \/>\nexport DBUS_SYSTEM_BUS_ADDRESS&#061;unix:path&#061;\/var\/run\/dbus\/system_bus_socket<br \/>\ncase &#034;$1&#034; in<br \/>\n    start)<br \/>\n        \/opt\/bluez\/sbin\/bluetoothd -n &amp;<br \/>\n        ;;<br \/>\n    stop)<br \/>\n        killall bluetoothd<br \/>\n        ;;<br \/>\nesac<br \/>\nEOF<br \/>\nchmod &#043;x \/etc\/init.d\/bluetoothd-custom <\/p>\n<h3 id=\"3.5%20%E6%9D%BF%E7%AB%AF%E8%BF%90%E8%A1%8C%E9%AA%8C%E8%AF%81%E4%B8%8E%E5%90%AF%E5%8A%A8%E5%A4%B1%E8%B4%A5%E6%8E%92%E6%9F%A5\">3.5 \u677f\u7aef\u8fd0\u884c\u9a8c\u8bc1\u4e0e\u542f\u52a8\u5931\u8d25\u6392\u67e5<\/h3>\n<p>3.5.1 \u4f9d\u8d56\u5b8c\u6574\u6027\u9a8c\u8bc1<\/p>\n<p># \u7528\u4e3b\u673a\u7684ldd\u770b\u4e0d\u4e86ARM\u4e8c\u8fdb\u5236&#xff0c;\u9700\u7528\u5de5\u5177\u94fe\u7684ldd<br \/>\n$CROSS_PREFIX-ldd bluetoothd<br \/>\n# \u6216\u5728\u677f\u5b50\u4e0a\u76f4\u63a5ldd<br \/>\nldd \/opt\/bluez\/sbin\/bluetoothd <\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff08;\u5173\u952e\u5e93\u90fd\u8981\u6709\u8def\u5f84&#xff0c;\u4e0d\u80fd\u662fnot found&#xff09;&#xff1a;<\/p>\n<p>libglib-2.0.so.0 &#061;&gt; \/opt\/bluez\/lib\/libglib-2.0.so.0 (0x&#8230;)<br \/>\nlibdbus-1.so.3 &#061;&gt; \/opt\/bluez\/lib\/libdbus-1.so.3 (0x&#8230;)<br \/>\nlibudev.so.1 &#061;&gt; \/opt\/bluez\/lib\/libudev.so.1 (0x&#8230;)<br \/>\nlibc.so.6 &#061;&gt; \/lib\/libc.so.6 (0x&#8230;) <\/p>\n<p>\u5982\u679c\u51fa\u73b0not found&#xff0c;\u56de\u53bb\u8865\u5bf9\u5e94\u5e93\u7684\u90e8\u7f72\u3002<\/p>\n<p>3.5.2 bluetoothd\u542f\u52a8\u6d4b\u8bd5<\/p>\n<p># \u524d\u53f0\u8c03\u8bd5\u6a21\u5f0f\u542f\u52a8&#xff0c;\u770b\u5b8c\u6574\u65e5\u5fd7<br \/>\n\/opt\/bluez\/sbin\/bluetoothd -n -d <\/p>\n<p>\u6b63\u5e38\u542f\u52a8\u7684\u65e5\u5fd7\u7279\u5f81&#xff1a;<\/p>\n<p>bluetoothd[xxx]: Bluetooth daemon 5.87<br \/>\nbluetoothd[xxx]: Starting SDP server<br \/>\nbluetoothd[xxx]: Bluetooth management interface 0.x initialized <\/p>\n<p>3.5.3 \u4e09\u5927\u9ad8\u9891\u542f\u52a8\u5931\u8d25\u6392\u67e5<\/p>\n<p>\u6545\u969c\u4e00&#xff1a;DBus\u670d\u52a1\u672a\u542f\u52a8<\/p>\n<p>bluetoothd[xxx]: D-Bus setup failed: Failed to connect to socket \/var\/run\/dbus\/system_bus_socket <\/p>\n<p>\u89e3\u51b3&#xff1a;\u5148\u542f\u52a8dbus-daemon<\/p>\n<p>dbus-daemon &#8211;system &#8211;fork <\/p>\n<p>\u6545\u969c\u4e8c&#xff1a;\u6743\u9650\u914d\u7f6e\u9519\u8bef<\/p>\n<p>bluetoothd[xxx]: Failed to access management interface <\/p>\n<p>\u89e3\u51b3&#xff1a;\u68c0\u67e5DBus\u7b56\u7565\u914d\u7f6e\/etc\/dbus-1\/system.d\/bluetooth.conf&#xff0c;\u786e\u4fddbluetoothd\u6709\u6743\u9650\u5360\u7528org.bluez\u540d\u3002<\/p>\n<p>\u6545\u969c\u4e09&#xff1a;\u84dd\u7259\u9002\u914d\u5668\u9a71\u52a8\u5f02\u5e38<\/p>\n<p>bluetoothd[xxx]: Adapter initialization failed<br \/>\nbluetoothd[xxx]: Failed to open HCI user channel <\/p>\n<p>\u6392\u67e5\u6d41\u7a0b&#xff1a;<\/p>\n<p># 1. \u68c0\u67e5hci\u8bbe\u5907\u662f\u5426\u5b58\u5728<br \/>\nhciconfig -a<br \/>\n# 2. \u68c0\u67e5\u8bbe\u5907\u8282\u70b9<br \/>\nls -la \/dev\/hci*<br \/>\n# 3. \u68c0\u67e5\u9a71\u52a8\u52a0\u8f7d<br \/>\ndmesg | grep -i bluetooth<br \/>\n# 4. \u91cd\u7f6e\u9002\u914d\u5668<br \/>\nhciconfig hci0 reset <\/p>\n<h2 id=\"%E5%9B%9B%E3%80%81%20BlueZ%E5%8A%9F%E8%83%BD%E5%AE%9A%E5%88%B6%E8%A3%81%E5%89%AA%E4%B8%8E%E9%AB%98%E7%BA%A7%E7%BC%96%E8%AF%91%E6%8A%80%E5%B7%A7\">\u56db\u3001 BlueZ\u529f\u80fd\u5b9a\u5236\u88c1\u526a\u4e0e\u9ad8\u7ea7\u7f16\u8bd1\u6280\u5de7<\/h2>\n<h3 id=\"4.1%20%E6%9C%80%E5%B0%8F%E7%B3%BB%E7%BB%9F%E8%A3%81%E5%89%AA%EF%BC%9A%E8%B5%84%E6%BA%90%E5%8F%97%E9%99%90%E8%AE%BE%E5%A4%87%E7%9A%84%E7%BC%96%E8%AF%91%E6%96%B9%E6%A1%88\">4.1 \u6700\u5c0f\u7cfb\u7edf\u88c1\u526a&#xff1a;\u8d44\u6e90\u53d7\u9650\u8bbe\u5907\u7684\u7f16\u8bd1\u65b9\u6848<\/h3>\n<p>\u5bf9\u4e8e\u5b58\u50a8\u53ea\u67098MB\u3001\u5185\u5b58\u53ea\u670932MB\u7684\u8d44\u6e90\u53d7\u9650\u8bbe\u5907&#xff0c;\u5168\u529f\u80fdBlueZ&#xff08;\u7f16\u8bd1\u540e\u7ea63-4MB&#xff09;\u4f9d\u7136\u504f\u5927\u3002\u6700\u5c0f\u7cfb\u7edf\u88c1\u526a\u65b9\u6848\u5982\u4e0b&#xff1a;<\/p>\n<p>4.1.1 \u5fc5\u987b\u4fdd\u7559\u7684\u6838\u5fc3\u6a21\u5757<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6a21\u5757<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u539f\u56e0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>src\/&#xff08;HCI\/L2CAP\/ATT\/GATT\/GAP\u6838\u5fc3&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u84dd\u7259\u534f\u8bae\u6808\u57fa\u7840&#xff0c;\u4e0d\u53ef\u88c1\u526a<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>lib\/&#xff08;\u516c\u5171API\u5e93&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u5fc5\u9700<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;enable-tools&#xff08;btmgmt\/btattach&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8bbe\u5907\u521d\u59cb\u5316\u4e0e\u8c03\u8bd5\u5fc5\u9700<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>4.1.2 \u53ef\u5b89\u5168\u88c1\u526a\u7684\u975e\u5fc5\u8981\u6a21\u5757<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u88c1\u526a\u9879<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8282\u7701\u4f53\u79ef<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6e\u53c2\u6570<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6240\u6709\u97f3\u9891Profile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~800KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-a2dp &#8211;disable-avrcp &#8211;disable-hfp &#8211;disable-bap &#8211;disable-bass &#8211;disable-mcp &#8211;disable-ccp &#8211;disable-vcp &#8211;disable-micp &#8211;disable-csip &#8211;disable-tmap &#8211;disable-gmap &#8211;disable-asha<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>OBEX\u6587\u4ef6\u4f20\u8f93<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~300KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-obex<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Mesh\u7ec4\u7f51<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~500KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-mesh&#xff08;\u9ed8\u8ba4\u5373\u5173&#xff09;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f51\u7edcProfile<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~200KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-network<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>HID\/HoG<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~150KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-hid &#8211;disable-hog<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>btmon\u6293\u5305\u5de5\u5177<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~700KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-monitor<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothctl<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~600KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-client<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>systemd\u96c6\u6210<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~50KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-systemd<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>udev\u652f\u6301<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~80KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-udev<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>CUPS\u6253\u5370<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~100KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-cups<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6587\u6863\u4e0e\u914d\u7f6e\u6587\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>~30KB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>&#8211;disable-datafiles &#8211;disable-manpages<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>4.1.3 \u6781\u81f4\u88c1\u526aconfigure\u6a21\u677f<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;\/opt\/bluez \\\\<br \/>\n    &#8211;sysconfdir&#061;\/etc \\\\<br \/>\n    &#8211;localstatedir&#061;\/var \\\\<br \/>\n    \\\\<br \/>\n    &#8211;enable-library \\\\<br \/>\n    &#8211;enable-tools \\\\<br \/>\n    \\\\<br \/>\n    &#8211;disable-systemd \\\\<br \/>\n    &#8211;disable-udev \\\\<br \/>\n    &#8211;disable-cups \\\\<br \/>\n    &#8211;disable-obex \\\\<br \/>\n    &#8211;disable-mesh \\\\<br \/>\n    &#8211;disable-midi \\\\<br \/>\n    &#8211;disable-btpclient \\\\<br \/>\n    &#8211;disable-sixaxis \\\\<br \/>\n    &#8211;disable-hid2hci \\\\<br \/>\n    &#8211;disable-logger \\\\<br \/>\n    &#8211;disable-admin \\\\<br \/>\n    &#8211;disable-external-plugins \\\\<br \/>\n    &#8211;disable-manpages \\\\<br \/>\n    &#8211;disable-test \\\\<br \/>\n    &#8211;disable-testing \\\\<br \/>\n    &#8211;disable-experimental \\\\<br \/>\n    &#8211;disable-deprecated \\\\<br \/>\n    &#8211;disable-backtrace \\\\<br \/>\n    &#8211;disable-datafiles \\\\<br \/>\n    \\\\<br \/>\n    &#8211;disable-a2dp \\\\<br \/>\n    &#8211;disable-avrcp \\\\<br \/>\n    &#8211;disable-hfp \\\\<br \/>\n    &#8211;disable-bap \\\\<br \/>\n    &#8211;disable-bass \\\\<br \/>\n    &#8211;disable-mcp \\\\<br \/>\n    &#8211;disable-ccp \\\\<br \/>\n    &#8211;disable-vcp \\\\<br \/>\n    &#8211;disable-micp \\\\<br \/>\n    &#8211;disable-csip \\\\<br \/>\n    &#8211;disable-tmap \\\\<br \/>\n    &#8211;disable-gmap \\\\<br \/>\n    &#8211;disable-asha \\\\<br \/>\n    &#8211;disable-network \\\\<br \/>\n    &#8211;disable-hid \\\\<br \/>\n    &#8211;disable-hog \\\\<br \/>\n    &#8211;disable-monitor \\\\<br \/>\n    &#8211;disable-client \\\\<br \/>\n    \\\\<br \/>\n    CFLAGS&#061;&#034;-Os -ffunction-sections -fdata-sections&#034; \\\\<br \/>\n    LDFLAGS&#061;&#034;-Wl,&#8211;gc-sections -s&#034; <\/p>\n<p>\u4f53\u79ef\u5bf9\u6bd4&#xff1a;<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6e<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>bluetoothd\u4f53\u79ef<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u603b\u90e8\u7f72\u4f53\u79ef<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5168\u529f\u80fd<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>3.2MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>8.5MB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5e38\u89c4\u88c1\u526a&#xff08;\u7981mesh\/obex\/cups\/systemd&#xff09;<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>2.1MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>5.2MB<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6781\u81f4\u88c1\u526a<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>0.9MB<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>1.8MB<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>4.1.4 \u88c1\u526a\u6ce8\u610f\u4e8b\u9879<\/p>\n<ul>\n<li>\n<p>A2DP\u4f9d\u8d56AVRCP&#xff1a;\u5355\u72ec&#8211;disable-a2dp\u4fdd\u7559avrcp\u4f1a\u7f16\u8bd1\u5931\u8d25&#xff0c;\u9700\u540c\u65f6\u7981\u7528<\/p>\n<\/li>\n<li>\n<p>client\u4f9d\u8d56readline&#xff1a;\u5982\u679c\u7981\u7528client&#xff0c;\u53ef\u4ee5\u540c\u65f6\u8df3\u8fc7readline\u4ea4\u53c9\u7f16\u8bd1&#xff0c;\u7701\u4e8b<\/p>\n<\/li>\n<li>\n<p>BAP\u4f9d\u8d56BASS\/MCP\/CCP\/VCP\/MICP\/CSIP\/TMAP\/GMAP&#xff1a;LE Audio\u5168\u5957\u76f8\u4e92\u4f9d\u8d56&#xff0c;\u8981\u4e48\u5168\u5f00\u8981\u4e48\u5168\u5173<\/p>\n<\/li>\n<li>\n<p>mesh\u4f9d\u8d56json-c\u548cell&#xff1a;\u7981\u7528mesh\u540e\u8fd9\u4e24\u4e2a\u4f9d\u8d56\u53ef\u8df3\u8fc7<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"4.2%20%E9%9D%99%E6%80%81%E7%BC%96%E8%AF%91%E4%B8%8E%E5%8A%A8%E6%80%81%E7%BC%96%E8%AF%91%E9%80%89%E5%9E%8B\">4.2 \u9759\u6001\u7f16\u8bd1\u4e0e\u52a8\u6001\u7f16\u8bd1\u9009\u578b<\/h3>\n<p>4.2.1 \u4f18\u7f3a\u70b9\u5bf9\u6bd4<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u65b9\u5f0f<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f18\u70b9<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7f3a\u70b9<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u9002\u7528\u573a\u666f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u52a8\u6001\u7f16\u8bd1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f53\u79ef\u5c0f&#xff0c;\u5e93\u53ef\u5171\u4eab<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f9d\u8d56\u5e93\u90e8\u7f72\u590d\u6742<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u591a\u7a0b\u5e8f\u5171\u4eab\u5e93\u7684\u8bbe\u5907<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u9759\u6001\u7f16\u8bd1<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u90e8\u7f72\u7b80\u5355&#xff0c;\u5355\u6587\u4ef6<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4f53\u79ef\u5927&#xff0c;glib\u9759\u6001\u5316\u5751\u591a<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5355\u4e00\u84dd\u7259\u529f\u80fd\u8bbe\u5907<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>4.2.2 \u9759\u6001\u7f16\u8bd1bluetoothd<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8211;host&#061;$CROSS_PREFIX \\\\<br \/>\n    &#8211;prefix&#061;\/opt\/bluez \\\\<br \/>\n    &#8211;enable-static \\\\<br \/>\n    &#8211;disable-shared \\\\<br \/>\n    &#8230;\u5176\u4ed6\u88c1\u526a\u53c2\u6570&#8230;<br \/>\n    \\\\<br \/>\n    LDFLAGS&#061;&#034;-static -L$INSTALL_DIR\/usr\/lib&#034; \\\\<br \/>\n    CFLAGS&#061;&#034;-I$INSTALL_DIR\/usr\/include -Os&#034; <\/p>\n<p>glib\u9759\u6001\u94fe\u63a5\u7684\u6838\u5fc3\u5751&#xff1a;<\/p>\n<ul>\n<li>\n<p>glib\u9ed8\u8ba4\u7f16\u8bd1\u4e3a\u52a8\u6001\u5e93&#xff0c;\u9700\u91cd\u65b0\u4ea4\u53c9\u7f16\u8bd1\u65f6\u52a0&#8211;default-library&#061;static<\/p>\n<\/li>\n<li>\n<p>libmount\u3001selinux\u7b49\u53ef\u9009\u4f9d\u8d56\u5fc5\u987b\u663e\u5f0fdisable&#xff0c;\u5426\u5219\u9759\u6001\u94fe\u63a5\u65f6\u4f1a\u7f3a\u7b26\u53f7<\/p>\n<\/li>\n<li>\n<p>\u9759\u6001glib\u53ef\u80fd\u627e\u4e0d\u5230charset.alias&#xff0c;\u9700\u624b\u52a8\u6307\u5b9a&#xff1a;-Dcharset_alias&#061;disabled<\/p>\n<\/li>\n<\/ul>\n<p>\u4f53\u79ef\u81a8\u80c0\u63a7\u5236&#xff1a;<\/p>\n<p># \u7528&#8211;gc-sections\u5220\u9664\u672a\u5f15\u7528\u4ee3\u7801<br \/>\nCFLAGS&#061;&#034;-Os -ffunction-sections -fdata-sections&#034;<br \/>\nLDFLAGS&#061;&#034;-static -Wl,&#8211;gc-sections -s&#034; <\/p>\n<h3 id=\"4.3%20%E6%BA%90%E7%A0%81%E7%BA%A7%E8%B0%83%E8%AF%95%E7%BC%96%E8%AF%91%E9%85%8D%E7%BD%AE\">4.3 \u6e90\u7801\u7ea7\u8c03\u8bd5\u7f16\u8bd1\u914d\u7f6e<\/h3>\n<p>4.3.1 \u6dfb\u52a0\u8c03\u8bd5\u7b26\u53f7<\/p>\n<p>.\/configure \\\\<br \/>\n    &#8230;\u5176\u4ed6\u53c2\u6570&#8230; \\\\<br \/>\n    &#8211;enable-debug \\\\<br \/>\n    CFLAGS&#061;&#034;-g -O0 -DDEBUG&#034; \\\\<br \/>\n    &#8211;disable-strip <\/p>\n<p>&#8211;enable-debug\u4f1a\u5f00\u542fBlueZ\u81ea\u8eab\u7684\u8c03\u8bd5\u65e5\u5fd7\u5b8f&#xff0c;-g -O0\u4fdd\u7559\u5b8c\u6574\u8c03\u8bd5\u4fe1\u606f\u5e76\u7981\u7528\u4f18\u5316&#xff08;\u907f\u514d\u53d8\u91cf\u88ab\u4f18\u5316\u6389&#xff09;\u3002<\/p>\n<p>4.3.2 gdb\u8c03\u8bd5bluetoothd<\/p>\n<p># \u677f\u7aef\u542f\u52a8gdbserver<br \/>\ngdbserver :9999 \/opt\/bluez\/sbin\/bluetoothd -n -d<\/p>\n<p># \u4e3b\u673a\u7aef\u8fde\u63a5<br \/>\n$CROSS_PREFIX-gdb bluetoothd<br \/>\n(gdb) target remote board-ip:9999<br \/>\n(gdb) b adapter_init<br \/>\n(gdb) continue <\/p>\n<p>\u8ffd\u8e2aHCI\u4e8b\u4ef6\u5904\u7406\u6d41\u7a0b\u7684\u5e38\u7528\u65ad\u70b9&#xff1a;<\/p>\n<p>b adapter.c:adapter_service_restart         # \u670d\u52a1\u91cd\u542f<br \/>\nb device.c:device_connect_le                # LE\u8fde\u63a5<br \/>\nb src\/shared\/att.c:att_handle_pdu           # ATT PDU\u5904\u7406<br \/>\nb src\/shared\/gatt-client.c:gatt_client_notify  # GATT\u901a\u77e5 <\/p>\n<p>4.3.3 btmon\u6293\u5305\u4e0e\u6e90\u7801\u8054\u8c03<\/p>\n<p># \u677f\u7aef\u5b9e\u65f6\u6293\u5305<br \/>\nbtmon -d hci0<\/p>\n<p># \u540c\u65f6\u4e3b\u673a\u7aefgdb\u8ddf\u8e2a<br \/>\n# \u901a\u8fc7btmon\u663e\u793a\u7684HCI\u4e8b\u4ef6\u65f6\u95f4\u6233&#xff0c;\u5bf9\u5e94\u5230gdb\u65ad\u70b9\u89e6\u53d1\u65f6\u673a<br \/>\n# \u5feb\u901f\u5b9a\u4f4d\u662f\u54ea\u4e2a\u534f\u8bae\u5c42\u5904\u7406\u51fa\u95ee\u9898 <\/p>\n<h3 id=\"4.4%20%E5%A2%9E%E9%87%8F%E7%BC%96%E8%AF%91%E4%B8%8E%E8%A1%A5%E4%B8%81%E9%9B%86%E6%88%90\">4.4 \u589e\u91cf\u7f16\u8bd1\u4e0e\u8865\u4e01\u96c6\u6210<\/h3>\n<p>4.4.1 \u589e\u91cf\u7f16\u8bd1<\/p>\n<p>\u4fee\u6539src\/device.c\u540e&#xff0c;\u65e0\u9700\u5168\u91cf\u7f16\u8bd1&#xff1a;<\/p>\n<p># \u53ea\u91cd\u65b0\u7f16\u8bd1device.o\u5e76\u94fe\u63a5bluetoothd<br \/>\nmake src\/bluetoothd<\/p>\n<p># \u6216\u66f4\u7ec6\u7c92\u5ea6<br \/>\ncd src &amp;&amp; make device.o &amp;&amp; make bluetoothd <\/p>\n<p>4.4.2 \u81ea\u5b9a\u4e49Patch\u96c6\u6210<\/p>\n<p># \u5236\u4f5cpatch<br \/>\ndiff -uNp src\/device.c.orig src\/device.c &gt; my-custom.patch<\/p>\n<p># \u96c6\u6210\u5230\u7f16\u8bd1\u6d41\u7a0b<br \/>\ncat &gt;&gt; Makefile.am &lt;&lt; &#039;EOF&#039;<\/p>\n<p>apply-patch:<br \/>\n    patch -p1 &lt; patches\/my-custom.patch<br \/>\nEOF <\/p>\n<h3 id=\"4.5%20%E5%A4%9A%E7%89%88%E6%9C%AC%E5%85%B1%E5%AD%98%E6%96%B9%E6%A1%88\">4.5 \u591a\u7248\u672c\u5171\u5b58\u65b9\u6848<\/h3>\n<p># \u7f16\u8bd1\u65f6\u4e0d\u8986\u76d6\u7cfb\u7edf\u7248\u672c<br \/>\n.\/configure &#8211;prefix&#061;\/opt\/bluez-5.87-custom &#8230;<br \/>\nmake &amp;&amp; make install<\/p>\n<p># \u901a\u8fc7PATH\u5207\u6362\u7248\u672c<br \/>\nexport PATH&#061;\/opt\/bluez-5.87-custom\/bin:$PATH<br \/>\nexport LD_LIBRARY_PATH&#061;\/opt\/bluez-5.87-custom\/lib:$LD_LIBRARY_PATH<\/p>\n<p># \u9a8c\u8bc1<br \/>\nwhich bluetoothd<br \/>\nbluetoothd &#8211;version <\/p>\n<h2 id=\"%E4%BA%94%E3%80%81%E5%85%A8%E6%B5%81%E7%A8%8B%E7%BC%96%E8%AF%91%E6%8A%A5%E9%94%99%E6%8E%92%E9%94%99%E6%89%8B%E5%86%8C\">\u4e94\u3001\u5168\u6d41\u7a0b\u7f16\u8bd1\u62a5\u9519\u6392\u9519\u624b\u518c<\/h2>\n<h3 id=\"5.1%20configure%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5\">5.1 configure\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/h3>\n<p>5.1.1 \u901a\u7528\u6392\u9519\u6d41\u7a0b<\/p>\n<p># \u7b2c\u4e00\u6b65&#xff1a;\u67e5\u770bconfig.log\u8be6\u7ec6\u65e5\u5fd7<br \/>\ngrep -A10 &#034;error:&#034; config.log | tail -50<\/p>\n<p># \u7b2c\u4e8c\u6b65&#xff1a;\u5b9a\u4f4d\u662f\u54ea\u4e2a\u4f9d\u8d56\u68c0\u6d4b\u5931\u8d25<br \/>\ngrep -B5 &#034;failed&#034; config.log <\/p>\n<p>5.1.2 \u4f9d\u8d56\u5e93not found\u7684\u4e09\u7c7b\u539f\u56e0<\/p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u539f\u56e0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u8868\u73b0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u89e3\u51b3<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5e93\u672a\u5b89\u88c5<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>package &#039;xxx&#039; not found<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5b89\u88c5\u5bf9\u5e94\u5f00\u53d1\u5305<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>pkg-config\u672a\u914d\u7f6e<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u627e\u5230\u7684\u662f\u9519\u8bef\u67b6\u6784\u7684\u5e93<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u914d\u7f6ePKG_CONFIG_PATH\u548cPKG_CONFIG_LIBDIR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7248\u672c\u4e0d\u6ee1\u8db3<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Requested &#039;xxx &gt;&#061; 1.2.3&#039; but version of xxx is 1.0.0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u5347\u7ea7\u4f9d\u8d56\u6216\u624b\u52a8\u6307\u5b9aCFLAGS\/LIBS<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>5.1.3 pkg-config\u8def\u5f84\u9519\u8bef\u6392\u67e5<\/p>\n<p># \u67e5\u770bpkg-config\u5b9e\u9645\u641c\u7d22\u8def\u5f84<br \/>\npkg-config &#8211;variable&#061;pc_path pkg-config<\/p>\n<p># \u67e5\u770b\u5177\u4f53\u5e93\u7684pc\u6587\u4ef6\u8def\u5f84<br \/>\npkg-config &#8211;debug glib-2.0 2&gt;&amp;1 | grep &#034;Reading&#034;<\/p>\n<p># \u5f3a\u5236\u91cd\u65b0\u751f\u6210pc\u6587\u4ef6\u7f13\u5b58<br \/>\nhash -r <\/p>\n<p>5.1.4 \u4f9d\u8d56\u7248\u672c\u4e0d\u6ee1\u8db3<\/p>\n<p># \u65b9\u6848\u4e00&#xff1a;\u5347\u7ea7\u4f9d\u8d56<br \/>\n# \u65b9\u6848\u4e8c&#xff1a;\u624b\u52a8\u6307\u5b9a\u7248\u672c\u8f83\u4f4e\u7684\u4f9d\u8d56&#xff08;\u4e0d\u63a8\u8350&#xff0c;\u53ef\u80fd\u5f15\u53d1bug&#xff09;<br \/>\nPKG_CHECK_MODULES([GLIB], [glib-2.0], [], [])<\/p>\n<p># \u65b9\u6848\u4e09&#xff1a;\u7ed5\u8fc7\u68c0\u6d4b&#xff0c;\u76f4\u63a5\u4f20CFLAGS\/LIBS<br \/>\n.\/configure GLIB_CFLAGS&#061;&#034;&#8230;&#034; GLIB_LIBS&#061;&#034;&#8230;&#034; &#8230; <\/p>\n<h3 id=\"5.2%20make%E7%BC%96%E8%AF%91%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5\">5.2 make\u7f16\u8bd1\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/h3>\n<p>5.2.1 \u5934\u6587\u4ef6\u627e\u4e0d\u5230<\/p>\n<p># \u62a5\u9519\u793a\u4f8b<br \/>\n# error: glib.h: No such file or directory<\/p>\n<p># \u6392\u67e5\u6b65\u9aa4<br \/>\n# 1. \u68c0\u67e5pkg-config\u8f93\u51fa<br \/>\npkg-config &#8211;cflags glib-2.0<br \/>\n# 2. \u68c0\u67e5CFLAGS\u662f\u5426\u6b63\u786e\u4f20\u5165<br \/>\nmake V&#061;1 | grep glib<br \/>\n# 3. \u624b\u52a8\u9a8c\u8bc1\u5934\u6587\u4ef6\u5b58\u5728<br \/>\nls $(pkg-config &#8211;cflags-only-I glib-2.0 | sed &#039;s\/-I\/\/g&#039;)\/glib.h <\/p>\n<p>5.2.2 \u94fe\u63a5\u9519\u8befundefined reference<\/p>\n<p># \u62a5\u9519\u793a\u4f8b<br \/>\n# undefined reference to &#039;g_object_new&#039;<\/p>\n<p># \u5e38\u89c1\u539f\u56e0<br \/>\n# 1. GLIB_LIBS\u6f0f\u6389\u4e86-gobject<br \/>\n# 2. \u94fe\u63a5\u987a\u5e8f\u9519\u8bef&#xff08;\u88ab\u4f9d\u8d56\u5e93\u5fc5\u987b\u5728\u4f9d\u8d56\u5b83\u7684\u5e93\u4e4b\u524d&#xff09;<br \/>\n# 3. \u9759\u6001\u94fe\u63a5\u65f6\u4f9d\u8d56\u5e93\u672a\u5b8c\u6574\u4f20\u5165<\/p>\n<p># \u6392\u67e5<br \/>\nmake V&#061;1 2&gt;&amp;1 | grep &#034;gcc&#034;<br \/>\n# \u68c0\u67e5\u5b8c\u6574\u7684\u94fe\u63a5\u547d\u4ee4&#xff0c;\u786e\u8ba4\u6240\u6709\u5e93\u90fd\u4f20\u5165\u4e86 <\/p>\n<p>5.2.3 \u4ea4\u53c9\u7f16\u8bd1\u4e13\u5c5e\u62a5\u9519<\/p>\n<p># \u62a5\u9519\u793a\u4f8b<br \/>\n# ld: skipping incompatible \/usr\/lib\/libxxx.so when searching for -lxxx<\/p>\n<p># \u539f\u56e0&#xff1a;\u94fe\u63a5\u5668\u627e\u5230\u4e86x86_64\u7684\u5e93<br \/>\n# \u89e3\u51b3&#xff1a;\u663e\u5f0f\u6307\u5b9asysroot<br \/>\nLDFLAGS&#061;&#034;-L$INSTALL_DIR\/usr\/lib &#8211;sysroot&#061;$SYSROOT&#034; <\/p>\n<h3 id=\"5.3%20%E8%BF%90%E8%A1%8C%E9%98%B6%E6%AE%B5%E9%AB%98%E9%A2%91%E6%8A%A5%E9%94%99%E6%8E%92%E6%9F%A5\">5.3 \u8fd0\u884c\u9636\u6bb5\u9ad8\u9891\u62a5\u9519\u6392\u67e5<\/h3>\n<p>5.3.1 bluetoothd\u542f\u52a8\u5931\u8d25\u6392\u67e5\u6e05\u5355<\/p>\n<p># 1. \u4f9d\u8d56\u5e93\u662f\u5426\u5b8c\u6574<br \/>\nldd \/opt\/bluez\/sbin\/bluetoothd | grep &#034;not found&#034;<\/p>\n<p># 2. DBus\u662f\u5426\u8fd0\u884c<br \/>\nps | grep dbus-daemon<\/p>\n<p># 3. hci\u8bbe\u5907\u662f\u5426\u5b58\u5728<br \/>\nhciconfig -a<\/p>\n<p># 4. \u6743\u9650\u662f\u5426\u6b63\u786e<br \/>\nls -la \/dev\/hci0<br \/>\nid bluetooth 2&gt;\/dev\/null || echo &#034;no bluetooth user&#034;<\/p>\n<p># 5. \u914d\u7f6e\u6587\u4ef6\u8bed\u6cd5\u662f\u5426\u6b63\u786e<br \/>\n\/opt\/bluez\/sbin\/bluetoothd -n -d 2&gt;&amp;1 | head -50 <\/p>\n<p>5.3.2 DBus\u6743\u9650\u62d2\u7edd<\/p>\n<p>\u75c7\u72b6&#xff1a;<\/p>\n<p>org.freedesktop.DBus.Error.AccessDenied: Connection &#034;:1.x&#034; is not allowed to own the service &#034;org.bluez&#034; <\/p>\n<p>\u4e24\u79cd\u89e3\u51b3\u65b9\u6848&#xff1a;<\/p>\n<p>\u65b9\u6848\u4e00&#xff1a;\u4fee\u6539DBus\u7b56\u7565\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>&lt;!&#8211; \/etc\/dbus-1\/system.d\/bluetooth.conf &#8211;&gt;<br \/>\n&lt;!DOCTYPE busconfig PUBLIC<br \/>\n    &#034;-\/\/freedesktop\/\/DTD D-BUS Bus Configuration 1.0\/\/EN&#034;<br \/>\n    &#034;http:\/\/www.freedesktop.org\/standards\/dbus\/1.0\/busconfig.dtd&#034;&gt;<br \/>\n&lt;busconfig&gt;<br \/>\n  &lt;policy user&#061;&#034;root&#034;&gt;<br \/>\n    &lt;allow own&#061;&#034;org.bluez&#034;\/&gt;<br \/>\n    &lt;allow send_destination&#061;&#034;org.bluez&#034;\/&gt;<br \/>\n    &lt;allow send_interface&#061;&#034;org.bluez.Agent&#034;\/&gt;<br \/>\n  &lt;\/policy&gt;<br \/>\n&lt;\/busconfig&gt; <\/p>\n<p>\u65b9\u6848\u4e8c&#xff1a;\u4ee5\u6b63\u786e\u7528\u6237\u542f\u52a8<\/p>\n<p># bluetoothd\u901a\u5e38\u9700\u8981root\u6216messagebus\u7528\u6237<br \/>\nsu &#8211; root -c &#034;\/opt\/bluez\/sbin\/bluetoothd&#034; <\/p>\n<p>5.3.3 \u84dd\u7259\u9002\u914d\u5668\u65e0\u6cd5\u8bc6\u522b\u7684\u5206\u5c42\u6392\u67e5<\/p>\n<p>\u5e94\u7528\u5c42&#xff1a;bluetoothctl\u80fd\u5426\u770b\u5230\u9002\u914d\u5668<br \/>\n    \u2193 \u5426<br \/>\nDBus\u5c42&#xff1a;busctl tree org.bluez \u6709\u65e0hci0\u8282\u70b9<br \/>\n    \u2193 \u5426<br \/>\nbluetoothd\u5c42&#xff1a;\u65e5\u5fd7\u6709\u65e0&#034;Adapter initialization failed&#034;<br \/>\n    \u2193 \u662f<br \/>\n\u5185\u6838\u5c42&#xff1a;hciconfig\u80fd\u5426\u770b\u5230hci0<br \/>\n    \u2193 \u5426<br \/>\n\u9a71\u52a8\u5c42&#xff1a;dmesg | grep -i bluetooth \u6709\u65e0USB\/UART\u8bc6\u522b<br \/>\n    \u2193 \u5426<br \/>\n\u786c\u4ef6\u5c42&#xff1a;lsusb&#xff08;USB\u6a21\u5757&#xff09;\u6216stty&#xff08;UART\u6a21\u5757&#xff09;\u80fd\u5426\u770b\u5230\u8bbe\u5907 <\/p>\n<p>\u6bcf\u4e00\u5c42\u6392\u67e5\u7684\u5177\u4f53\u547d\u4ee4&#xff1a;<\/p>\n<p># \u5e94\u7528\u5c42<br \/>\nbluetoothctl<br \/>\n&gt; show<\/p>\n<p># DBus\u5c42<br \/>\nbusctl tree org.bluez<br \/>\nbusctl introspect org.bluez \/org\/bluez\/hci0<\/p>\n<p># bluetoothd\u5c42<br \/>\n\/opt\/bluez\/sbin\/bluetoothd -n -d 2&gt;&amp;1 | grep -i &#034;adapter\\\\|init&#034;<\/p>\n<p># \u5185\u6838\u5c42<br \/>\nhciconfig -a<br \/>\ncat \/sys\/class\/bluetooth\/hci0\/uevent<\/p>\n<p># \u9a71\u52a8\u5c42<br \/>\ndmesg | grep -iE &#034;bluetooth|hci|btusb|hci_uart&#034;<br \/>\nlsmod | grep -i bluetooth<\/p>\n<p># \u786c\u4ef6\u5c42<br \/>\nlsusb<br \/>\n# \u6216UART\u6a21\u5757<br \/>\ncat \/proc\/tty\/driver\/serial <\/p>\n<h3 id=\"5.4%20%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91%E4%B8%93%E5%B1%9E%E6%8E%92%E9%94%99%E6%B8%85%E5%8D%95\">5.4 \u4ea4\u53c9\u7f16\u8bd1\u4e13\u5c5e\u6392\u9519\u6e05\u5355<\/h3>\n<p>5.4.1 \u5de5\u5177\u94fe\u8def\u5f84\u9519\u8bef<\/p>\n<p># \u62a5\u9519&#xff1a;arm-linux-gnueabihf-gcc: command not found<br \/>\n# \u6392\u67e5&#xff1a;<br \/>\nwhich $CC<br \/>\necho $PATH<br \/>\n# \u89e3\u51b3&#xff1a;source\u5de5\u5177\u94fe\u7684environment-setup\u811a\u672c<br \/>\nsource \/opt\/environment-setup-armv7vehf-neon <\/p>\n<p>5.4.2 host\u53c2\u6570\u4e0d\u5339\u914d<\/p>\n<p># \u62a5\u9519&#xff1a;configure: error: cannot run C compiled programs<br \/>\n# \u539f\u56e0&#xff1a;&#8211;host\u53c2\u6570\u5199\u9519&#xff0c;\u6216\u5de5\u5177\u94fe\u524d\u7f00\u4e0e&#8211;host\u4e0d\u4e00\u81f4<br \/>\n# \u6b63\u786e\u5bf9\u5e94\u5173\u7cfb&#xff1a;<br \/>\n# arm-linux-gnueabihf-gcc  \u2192  &#8211;host&#061;arm-linux-gnueabihf<br \/>\n# aarch64-linux-gnu-gcc    \u2192  &#8211;host&#061;aarch64-linux-gnu <\/p>\n<p>5.4.3 \u4f9d\u8d56\u5e93\u67b6\u6784\u4e0d\u4e00\u81f4<\/p>\n<p># \u9a8c\u8bc1\u5e93\u67b6\u6784<br \/>\nfile $INSTALL_DIR\/usr\/lib\/libglib-2.0.so<br \/>\n# \u9884\u671f&#xff1a;ELF 32-bit LSB shared object, ARM, EABI5<br \/>\n# \u5982\u679c\u51fa\u73b0x86-64&#xff0c;\u8bf4\u660e\u4ea4\u53c9\u7f16\u8bd1\u5931\u8d25<\/p>\n<p># \u9a8c\u8bc1\u5e93\u7b26\u53f7<br \/>\n$CROSS_PREFIX-nm -D $INSTALL_DIR\/usr\/lib\/libglib-2.0.so | head <\/p>\n<p>5.4.4 \u7cfb\u7edf\u8c03\u7528\u5e73\u53f0\u5dee\u5f02<\/p>\n<p>\u67d0\u4e9bglibc\u7248\u672c\u5dee\u5f02\u4f1a\u5bfc\u81f4\u7f16\u8bd1\u5931\u8d25&#xff1a;<\/p>\n<p># \u62a5\u9519&#xff1a;implicit declaration of function &#039;explicit_bzero&#039;<br \/>\n# \u539f\u56e0&#xff1a;\u76ee\u6807glibc\u7248\u672c\u592a\u8001&#xff0c;\u6ca1\u6709\u8be5\u51fd\u6570<br \/>\n# \u89e3\u51b3&#xff1a;configure.ac\u4e2d\u5df2\u6709fallback&#xff0c;\u786e\u8ba4config.h\u4e2dHAVE_EXPLICIT_BZERO\u7684\u5b9a\u4e49<br \/>\n# \u6216\u624b\u52a8\u8865&#xff1a;<br \/>\necho &#034;void explicit_bzero(void *s, size_t n){memset(s,0,n);__asm__ volatile(&#034;&#034; ::: &#034;memory&#034;);}&#034; &gt;&gt; src\/compat.c <\/p>\n<h2 id=\"%E5%85%AD%E3%80%81%20%E6%80%BB%E7%BB%93%E4%B8%8E%E5%AD%A6%E4%B9%A0%E8%B7%AF%E7%BA%BF\">\u516d\u3001 \u603b\u7ed3\u4e0e\u5b66\u4e60\u8def\u7ebf<\/h2>\n<h3 id=\"6.1%20%E5%85%A8%E6%96%87%E6%A0%B8%E5%BF%83%E7%9F%A5%E8%AF%86%E7%82%B9%E5%A4%8D%E7%9B%98\">6.1 \u5168\u6587\u6838\u5fc3\u77e5\u8bc6\u70b9\u590d\u76d8<\/h3>\n<table>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7ae0\u8282<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6838\u5fc3\u77e5\u8bc6\u70b9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7b2c\u4e00\u7ae0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>Autotools\u6784\u5efa\u6d41\u7a0b\u3001\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u3001\u4e24\u5927\u7f16\u8bd1\u573a\u666f\u5dee\u5f02<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7b2c\u4e8c\u7ae0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u684c\u9762\u539f\u751f\u7f16\u8bd1\u7684\u6807\u51c6\u6d41\u7a0b\u3001configure\u53c2\u6570\u4f53\u7cfb\u3001\u4ea7\u7269\u5206\u5e03<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7b2c\u4e09\u7ae0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u4ea4\u53c9\u7f16\u8bd1\u4f9d\u8d56\u5c42\u7ea7\u3001\u9010\u5e93\u7f16\u8bd1\u987a\u5e8f\u3001pkg-config\u914d\u7f6e\u3001\u677f\u7aef\u90e8\u7f72<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7b2c\u56db\u7ae0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u6781\u81f4\u88c1\u526a\u65b9\u6848\u3001\u9759\u6001\u7f16\u8bd1\u3001\u6e90\u7801\u8c03\u8bd5\u3001\u589e\u91cf\u7f16\u8bd1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\">\n<p>\u7b2c\u4e94\u7ae0<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\">\n<p>configure\/make\/\u8fd0\u884c\u4e09\u9636\u6bb5\u6392\u9519\u65b9\u6cd5\u8bba\u3001\u4ea4\u53c9\u7f16\u8bd1\u4e13\u5c5e\u95ee\u9898<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7f16\u8bd1\u5168\u6d41\u7a0b\u5173\u952e\u8282\u70b9&#xff1a;<\/p>\n<li>\n<p>\u73af\u5883\u4e0e\u5de5\u5177\u94fe\u51c6\u5907 \u2192 2. \u4f9d\u8d56\u5e93\u9010\u5c42\u4ea4\u53c9\u7f16\u8bd1 \u2192 3. BlueZ\u4e3b\u7a0b\u5e8fconfigure \u2192 4. make\u7f16\u8bd1 \u2192 5. \u4ea7\u7269strip \u2192 6. \u677f\u7aef\u90e8\u7f72 \u2192 7. \u4f9d\u8d56\u5b8c\u6574\u6027\u9a8c\u8bc1 \u2192 8. \u542f\u52a8\u6d4b\u8bd5 \u2192 9. \u529f\u80fd\u9a8c\u8bc1<\/p>\n<\/li>\n<h3 id=\"6.2%20BlueZ%E5%BC%80%E5%8F%91%E8%BF%9B%E9%98%B6%E5%AD%A6%E4%B9%A0%E8%B7%AF%E7%BA%BF\">6.2 BlueZ\u5f00\u53d1\u8fdb\u9636\u5b66\u4e60\u8def\u7ebf<\/h3>\n<p>\u7f16\u8bd1\u80fd\u529b&#xff08;\u672c\u6587&#xff09;<br \/>\n    \u2193<br \/>\nGATT\u670d\u52a1\u4e8c\u6b21\u5f00\u53d1&#xff08;\u81ea\u5b9a\u4e49Service\/Characteristic&#xff09;<br \/>\n    \u2193<br \/>\nProfile\u6e90\u7801\u9605\u8bfb\u4e0e\u5b9a\u5236&#xff08;A2DP\/HFP\/BAP\u7b49&#xff09;<br \/>\n    \u2193<br \/>\nMesh\u7ec4\u7f51\u534f\u8bae\u5f00\u53d1<br \/>\n    \u2193<br \/>\nHCI\u5c42\u8c03\u8bd5\u4e0e\u534f\u8bae\u6808\u95ee\u9898\u5b9a\u4f4d<br \/>\n    \u2193<br \/>\n\u5185\u6838\u9a71\u52a8\u5c42\u9002\u914d&#xff08;hci_uart\/hci_usb\/\u63a7\u5236\u5668\u56fa\u4ef6&#xff09; <\/p>\n<h3 id=\"6.3%20%E5%90%8E%E7%BB%AD%E5%AE%9E%E6%88%98%E6%96%B9%E5%90%91%E6%8E%A8%E8%8D%90\">6.3 \u540e\u7eed\u5b9e\u6218\u65b9\u5411\u63a8\u8350<\/h3>\n<li>\n<p>GATT\u670d\u52a1\u4e8c\u6b21\u5f00\u53d1\u5b9e\u6218&#xff1a;\u4ecesrc\/shared\/gatt-server.c\u5165\u624b&#xff0c;\u7406\u89e3GATT\u6570\u636e\u5e93\u6784\u5efa&#xff0c;\u5b9e\u73b0\u81ea\u5b9a\u4e49\u84dd\u7259\u670d\u52a1<\/p>\n<\/li>\n<li>\n<p>\u84dd\u7259\u97f3\u9891Profile\u6e90\u7801\u89e3\u6790&#xff1a;\u6df1\u5165profiles\/audio\/&#xff0c;\u7406\u89e3A2DP Codec\u534f\u5546\u3001AVRCP\u63a7\u5236\u3001LE Audio BAP\u5168\u94fe\u8def<\/p>\n<\/li>\n<li>\n<p>Mesh\u7ec4\u7f51\u534f\u8bae\u5f00\u53d1\u6307\u5357&#xff1a;\u57fa\u4e8emesh\/\u76ee\u5f55&#xff0c;\u638c\u63e1\u8282\u70b9\u914d\u7f51\u3001\u6a21\u578b\u5f00\u53d1\u3001\u7f51\u7edc\u7ba1\u7406<\/p>\n<\/li>\n<li>\n<p>HCI\u5c42\u6293\u5305\u8c03\u8bd5\u6280\u5de7&#xff1a;\u7cbe\u901abtmon\u7684\u5404\u7c7b\u8fc7\u6ee4\u53c2\u6570&#xff0c;\u7ed3\u5408wireshark\u6df1\u5ea6\u5206\u6790\u534f\u8bae\u4ea4\u4e92<\/p>\n<\/li>\n<hr \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u5927\u90e8\u5206BlueZ\u6559\u7a0b\u505c\u7559\u5728apt install bluez\u7684\u5c42\u9762&#xff0c;\u771f\u6b63\u9700\u8981\u5728\u5d4c\u5165\u5f0f\u5e73\u53f0\u843d\u5730\u3001\u505aProfile\u5b9a\u5236\u3001\u5b9a\u4f4d\u534f\u8bae\u6808\u95ee\u9898\u7684\u5de5\u7a0b\u5e08&#xff0c;\u7ed5\u4e0d\u5f00\u6e90\u7801\u7f16\u8bd1\u8fd9\u4e00\u5173\u3002\u672c\u6587\u5c06\u5b8c\u6574\u7f16\u8bd1\u4f53\u7cfb\u3001\u4ea4\u53c9\u7f16\u8bd1\u4f9d\u8d56\u5c42\u7ea7\u5904\u7406\u3001\u6700\u5c0f\u7cfb\u7edf\u88c1\u526a\u3001\u5168\u9636\u6bb5\u6392\u9519\u65b9\u6cd5\u8bba\u4e00\u6b21\u6027\u8bb2\u900f&#xff0c;\u76ee\u6807\u662f\u76f4\u63a5\u843d\u5730\u89e3\u51b3\u5de5\u4f5c\u4e2d\u7684\u7f16\u8bd1\u3001\u79fb\u690d\u3001\u88c1\u526a\u95ee\u9898\u3002 \u76ee\u5f55<br \/>\n\u4e00\u3001BlueZ\u7f16\u8bd1\u4f53\u7cfb\u5168\u666f\u8ba4\u77e5<br \/>\n1.1 \u4e3a\u4ec0\u4e48\u5fc5\u987b\u4ece\u6e90\u7801\u7f16\u8bd1BlueZ<br \/>\n1.2 BlueZ\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u4e0e\u7f16\u8bd1\u4ea7\u7269\u5bf9\u5e94\u5173\u7cfb<br \/>\n1<\/p>\n","protected":false},"author":2,"featured_media":87721,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[9936,9937,751,58,1631],"topic":[],"class_list":["post-87726","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-bluez","tag-9937","tag-arm","tag-linux","tag-1631"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/87726.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7f51\u4e0a\u5927\u90e8\u5206BlueZ\u6559\u7a0b\u505c\u7559\u5728apt install bluez\u7684\u5c42\u9762&#xff0c;\u771f\u6b63\u9700\u8981\u5728\u5d4c\u5165\u5f0f\u5e73\u53f0\u843d\u5730\u3001\u505aProfile\u5b9a\u5236\u3001\u5b9a\u4f4d\u534f\u8bae\u6808\u95ee\u9898\u7684\u5de5\u7a0b\u5e08&#xff0c;\u7ed5\u4e0d\u5f00\u6e90\u7801\u7f16\u8bd1\u8fd9\u4e00\u5173\u3002\u672c\u6587\u5c06\u5b8c\u6574\u7f16\u8bd1\u4f53\u7cfb\u3001\u4ea4\u53c9\u7f16\u8bd1\u4f9d\u8d56\u5c42\u7ea7\u5904\u7406\u3001\u6700\u5c0f\u7cfb\u7edf\u88c1\u526a\u3001\u5168\u9636\u6bb5\u6392\u9519\u65b9\u6cd5\u8bba\u4e00\u6b21\u6027\u8bb2\u900f&#xff0c;\u76ee\u6807\u662f\u76f4\u63a5\u843d\u5730\u89e3\u51b3\u5de5\u4f5c\u4e2d\u7684\u7f16\u8bd1\u3001\u79fb\u690d\u3001\u88c1\u526a\u95ee\u9898\u3002 \u76ee\u5f55 \u4e00\u3001BlueZ\u7f16\u8bd1\u4f53\u7cfb\u5168\u666f\u8ba4\u77e5 1.1 \u4e3a\u4ec0\u4e48\u5fc5\u987b\u4ece\u6e90\u7801\u7f16\u8bd1BlueZ 1.2 BlueZ\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u4e0e\u7f16\u8bd1\u4ea7\u7269\u5bf9\u5e94\u5173\u7cfb 1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/87726.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-30T12:00:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120046-6a6b3cee1f3ec.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87726.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/87726.html\",\"name\":\"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-07-30T12:00:50+00:00\",\"dateModified\":\"2026-07-30T12:00:50+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/87726.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/87726.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/87726.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/87726.html","og_locale":"zh_CN","og_type":"article","og_title":"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7f51\u4e0a\u5927\u90e8\u5206BlueZ\u6559\u7a0b\u505c\u7559\u5728apt install bluez\u7684\u5c42\u9762&#xff0c;\u771f\u6b63\u9700\u8981\u5728\u5d4c\u5165\u5f0f\u5e73\u53f0\u843d\u5730\u3001\u505aProfile\u5b9a\u5236\u3001\u5b9a\u4f4d\u534f\u8bae\u6808\u95ee\u9898\u7684\u5de5\u7a0b\u5e08&#xff0c;\u7ed5\u4e0d\u5f00\u6e90\u7801\u7f16\u8bd1\u8fd9\u4e00\u5173\u3002\u672c\u6587\u5c06\u5b8c\u6574\u7f16\u8bd1\u4f53\u7cfb\u3001\u4ea4\u53c9\u7f16\u8bd1\u4f9d\u8d56\u5c42\u7ea7\u5904\u7406\u3001\u6700\u5c0f\u7cfb\u7edf\u88c1\u526a\u3001\u5168\u9636\u6bb5\u6392\u9519\u65b9\u6cd5\u8bba\u4e00\u6b21\u6027\u8bb2\u900f&#xff0c;\u76ee\u6807\u662f\u76f4\u63a5\u843d\u5730\u89e3\u51b3\u5de5\u4f5c\u4e2d\u7684\u7f16\u8bd1\u3001\u79fb\u690d\u3001\u88c1\u526a\u95ee\u9898\u3002 \u76ee\u5f55 \u4e00\u3001BlueZ\u7f16\u8bd1\u4f53\u7cfb\u5168\u666f\u8ba4\u77e5 1.1 \u4e3a\u4ec0\u4e48\u5fc5\u987b\u4ece\u6e90\u7801\u7f16\u8bd1BlueZ 1.2 BlueZ\u6e90\u7801\u76ee\u5f55\u7ed3\u6784\u4e0e\u7f16\u8bd1\u4ea7\u7269\u5bf9\u5e94\u5173\u7cfb 1","og_url":"https:\/\/www.wsisp.com\/helps\/87726.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-07-30T12:00:50+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/07\/20260730120046-6a6b3cee1f3ec.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"19 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/87726.html","url":"https:\/\/www.wsisp.com\/helps\/87726.html","name":"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-07-30T12:00:50+00:00","dateModified":"2026-07-30T12:00:50+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/87726.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/87726.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/87726.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"BlueZ\u6e90\u7801\u7f16\u8bd1\u73af\u5883\u914d\u7f6e\u5168\u6307\u5357\uff1aLinux\u684c\u9762\u539f\u751f\u7f16\u8bd1 + \u5d4c\u5165\u5f0fARM\u4ea4\u53c9\u7f16\u8bd1 + \u5b9a\u5236\u88c1\u526a\u4e0e\u8c03\u8bd5\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=87726"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/87726\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/87721"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=87726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=87726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=87726"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=87726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}