{"id":98427,"date":"2024-10-23T14:58:54","date_gmt":"2024-10-23T06:58:54","guid":{"rendered":"\/\/www.viralrail.com\/?p=98427"},"modified":"2024-10-23T14:59:02","modified_gmt":"2024-10-23T06:59:02","slug":"rhdqlymmkxx","status":"publish","type":"post","link":"\/\/www.viralrail.com\/blog\/98427.html","title":{"rendered":"\u5982\u4f55\u8bfb\u53d6\u84dd\u7259Mesh\u6a21\u5757\u4fe1\u606f"},"content":{"rendered":"\n
\u3000\u3000\u8981\u8bfb\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u4fe1\u606f\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528UART_MESH_COMMAND_CODE_GET_INFO\u547d\u4ee4\u6765\u83b7\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u5fc5\u8981\u4fe1\u606f\uff0c\u5982\u84dd\u7259\u5730\u5740\u3001UUID\u3001\u7f51\u7edc\u77edID\u7b49\u3002\u8be5\u547d\u4ee4\u7684\u6570\u636e\u683c\u5f0f\u5305\u62ec\u5e27\u5934\u3001\u547d\u4ee4\u7801\u3001\u53c2\u6570\u957f\u5ea6\u548c\u53c2\u6570\u672c\u8eab\uff0c\u4ee5\u53ca\u9519\u8bef\u7801\u3002<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528bt_mesh_cfg_comp_data_get\u51fd\u6570\u6765\u83b7\u53d6\u8282\u70b9\u7684Composition\u6570\u636e\u3002\u8be5\u51fd\u6570\u9700\u8981\u4f20\u5165Network Key\u7d22\u5f15\u3001\u8282\u70b9\u7684unicast\u5730\u5740\u3001\u6307\u5b9a\u9875(\u9ed8\u8ba4\u4e3a0)\u7b49\u53c2\u6570\uff0c\u5e76\u8fd4\u56de\u8282\u70b9\u7684Composition\u6570\u636e\u72b6\u6001\u3002<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528ble_mesh_model_get_comp_data\u51fd\u6570\u6765\u83b7\u53d6\u8282\u70b9\u7684Composition\u6570\u636e\uff0c\u5305\u62ec\u8282\u70b9\u4fe1\u606f\u3001Models\u7684\u7ec4\u6210\u7b49\u3002<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528ble_mesh_provisioner_get_node_info\u51fd\u6570\u6765\u83b7\u53d6\u672c\u8eabNODE\u8282\u70b9\u4ee5\u53ca\u5165\u7f51NODE\u8282\u70b9\u4fe1\u606f\u3002\u8be5\u51fd\u6570\u9700\u8981\u4f20\u5165\u8282\u70b9\u7684unicast\u5730\u5740\uff0c\u5e76\u8fd4\u56de\u8282\u70b9\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528IThingBlueMeshDevice\u7c7b\u6765\u64cd\u4f5c\u6307\u5b9a\u84dd\u7259Mesh\u5185\u7684\u6240\u6709\u8bbe\u5907\uff0c\u83b7\u53d6\u8bbe\u5907\u7684\u5728\u7ebf\u72b6\u6001\u548c\u672c\u5730\u84dd\u7259\u5728\u7ebf\u72b6\u6001\u7b49\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u901a\u8fc7\u914d\u7f6e\u548c\u8c03\u8bd5\u8bbe\u7f6e\uff0c\u5982\u542f\u7528model\u5c42\u603b\u5f00\u5173\u3001\u8bbe\u7f6emesh\u6570\u91cf\u3001APP\u5bc6\u94a5\u6570\u91cf\u3001\u6807\u7b7e\u6570\u91cf\u7b49\u53c2\u6570\uff0c\u6765\u83b7\u53d6\u548c\u8c03\u8bd5\u84dd\u7259Mesh\u6a21\u5757\u7684\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u4f7f\u7528IThingBlueMeshPlugin\u63d2\u4ef6\u6765\u5b9e\u4f8b\u5316IThingBlueMeshDevice\uff0c\u5e76\u901a\u8fc7DeviceBean\u7c7b\u83b7\u53d6\u8bbe\u5907\u7684\u5728\u7ebf\u72b6\u6001\u548c\u672c\u5730\u84dd\u7259\u5728\u7ebf\u72b6\u6001\u7b49\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u5224\u65ad\u8bbe\u5907\u662f\u5426\u4e3a\u84dd\u7259Mesh\u8bbe\u5907\u548c\u7f51\u5173\uff0c\u4ee5\u83b7\u53d6\u76f8\u5e94\u7684\u8bbe\u5907\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u67e5\u8be2\u8bbe\u5907\u5728\u7ebf\u72b6\u6001\u3001\u79fb\u9664\u84dd\u7259Mesh\u5b50\u8bbe\u5907\u7b49\u64cd\u4f5c\uff0c\u4ee5\u83b7\u53d6\u8bbe\u5907\u7684\u5b9e\u65f6\u72b6\u6001\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5168\u9762\u5730\u8bfb\u53d6\u548c\u83b7\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u5404\u79cd\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u8981\u4f7f\u7528UART_MESH_COMMAND_CODE_GET_INFO\u547d\u4ee4\u8be6\u7ec6\u83b7\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u4fe1\u606f\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u8bbe\u5907\u5df2\u7ecf\u5165\u7f51\u3002\u5165\u7f51\u662f\u5b9e\u73b0\u8bbe\u5907\u4e92\u76f8\u7ec4\u7f51\u548c\u6570\u636e\u8f6c\u53d1\u7684\u524d\u63d0\u6761\u4ef6\u3002\u5728\u8bbe\u5907\u5165\u7f51\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u53d1\u9001UART_MESH_COMMAND_CODE_GET_INFO\u547d\u4ee4\u6765\u83b7\u53d6\u8bbe\u5907\u7684\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n\n\n\n
\u3000\u3000\u786e\u4fdd\u8bbe\u5907\u5df2\u7ecf\u901a\u8fc7APP\u8fdb\u884c\u5165\u7f51\u3002<\/p>\n\n\n\n
\u3000\u3000\u53d1\u9001UART_MESH_COMMAND_CODE_GET_INFO\u547d\u4ee4\u3002<\/p>\n\n\n\n
\u3000\u3000bt_mesh_cfg_comp_data_get\u51fd\u6570\u5728\u84dd\u7259Mesh\u914d\u7f6e\u6a21\u578b\u4e2d\u7684\u5e94\u7528\u793a\u4f8b\u4e3b\u8981\u6d89\u53ca\u5230\u83b7\u53d6\u76ee\u6807\u8282\u70b9\u7684\u7ec4\u6210\u6570\u636e\u3002\u8be5\u51fd\u6570\u901a\u8fc7\u6307\u5b9a\u7f51\u7edc\u7d22\u5f15(net_idx)\u3001\u5730\u5740(addr)\u3001\u9875\u9762(page)\u7b49\u53c2\u6570\uff0c\u4ece\u76ee\u6807\u8282\u70b9\u83b7\u53d6\u5176\u7ec4\u6210\u6570\u636e\u3002\u5982\u679c\u76ee\u6807\u8bbe\u5907\u6ca1\u6709\u8bf7\u6c42\u7684\u7ec4\u6210\u6570\u636e\u9875\u9762\uff0c\u5b83\u5c06\u8fd4\u56de\u652f\u6301\u7684\u6700\u5927\u9875\u9762\u53f7\uff0c\u8be5\u9875\u9762\u53f7\u5c0f\u4e8e\u8bf7\u6c42\u7684\u9875\u9762\u7d22\u5f15\u3002<\/p>\n\n\n\n
\u3000\u3000\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u8fd9\u4e2a\u51fd\u6570\u901a\u5e38\u7528\u4e8e\u914d\u7f6e\u5ba2\u6237\u7aef(Configuration Client)\u4e0e\u914d\u7f6e\u670d\u52a1\u5668(Configuration Server)\u4e4b\u95f4\u7684\u4ea4\u4e92\u3002\u4f8b\u5982\uff0c\u5728BLE Mesh\u7f51\u7edc\u7684\u914d\u7f6e\u8fc7\u7a0b\u4e2d\uff0c\u914d\u7f6e\u5ba2\u6237\u7aef\u53ef\u4ee5\u8c03\u7528bt_mesh_cfg_comp_data_get\u51fd\u6570\u6765\u83b7\u53d6\u7f51\u7edc\u4e2d\u5176\u4ed6\u8282\u70b9\u7684\u7ec4\u6210\u6570\u636e\uff0c\u4ee5\u4fbf\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u914d\u7f6e\u548c\u7ba1\u7406\u3002<\/p>\n\n\n\n
\u3000\u3000\u6b64\u5916\uff0c\u6839\u636e\u5f00\u53d1\u6307\u5357\u7684\u63cf\u8ff0\uff0cbt_mesh_cfg_comp_data_get\u51fd\u6570\u662f\u57fa\u4e8eXR806 SDK\u7684BLE Mesh\u6a21\u5757\u63a5\u53e3\u51fd\u6570\u4e4b\u4e00\uff0c\u7528\u4e8e\u6307\u5bfc\u5f00\u53d1\u8005\u5982\u4f55\u4f7f\u7528\u8be5\u51fd\u6570\u8fdb\u884cBLE Mesh\u6a21\u5757\u7684\u914d\u7f6e\u548c\u7ba1\u7406\u3002<\/p>\n\n\n\n
\u3000\u3000\u5728\u4f7f\u7528ble_mesh_model_get_comp_data\u51fd\u6570\u65f6\uff0c\u89e3\u6790\u8fd4\u56de\u7684\u8282\u70b9Composition\u6570\u636e\u6d89\u53ca\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n\n\n\n
\u3000\u3000ble_mesh_provisioner_get_node_info\u51fd\u6570\u8fd4\u56de\u7684\u8282\u70b9\u4fe1\u606f\u5305\u542b\u4ee5\u4e0b\u5177\u4f53\u5185\u5bb9\uff1a<\/p>\n\n\n\n
\u3000\u3000Provisioner NODE \u8282\u70b9\u4fe1\u606f<\/strong>\uff1a\u5982\u679c\u4f20\u5165\u7684 unicast_addr \u5730\u5740\u662f Provisioner \u672c\u8eab\u7684\u5730\u5740\uff0c\u5219\u8be5\u51fd\u6570\u4f1a\u8fd4\u56de Provisioner \u8282\u70b9\u7684\u4fe1\u606f\u3002<\/p>\n\n\n\n \u3000\u3000\u5df2\u5165\u7f51\u8bbe\u5907\u7684\u8282\u70b9\u5730\u5740\u4fe1\u606f<\/strong>\uff1a\u5982\u679c\u4f20\u5165\u7684 unicast_addr \u5730\u5740\u4e0d\u662f Provisioner \u7684\u5730\u5740\uff0c\u5219\u8be5\u51fd\u6570\u4f1a\u8fd4\u56de\u5df2\u5165\u7f51\u8bbe\u5907\u7684\u8282\u70b9\u5730\u5740\u4fe1\u606f\u3002<\/p>\n\n\n\n \u3000\u3000\u8981\u5224\u65ad\u8bbe\u5907\u662f\u5426\u4e3a\u84dd\u7259Mesh\u8bbe\u5907\u548c\u7f51\u5173\uff0c\u53ef\u4ee5\u53c2\u8003\u300a\u84dd\u7259Mesh\u8bbe\u5907\u914d\u7f51\u4e0e\u63a7\u5236\u6307\u5357\u300b\u4e2d\u7684\u65b9\u6cd5\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n\n\n\n \u3000\u3000\u4f7f\u7528DeviceBean\u7c7b\u6765\u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u7528isSigMesh()\u65b9\u6cd5\u6765\u5224\u65ad\u8bbe\u5907\u662f\u5426\u4e3a\u84dd\u7259Mesh\u8bbe\u5907\u3002\u5982\u679c\u8fd4\u56de\u503c\u4e3a\u771f\uff0c\u5219\u8be5\u8bbe\u5907\u662f\u84dd\u7259Mesh\u8bbe\u5907\u3002<\/p>\n\n\n\n \u3000\u3000\u540c\u6837\u4f7f\u7528DeviceBean\u7c7b\u3002<\/p>\n\n\n\n \u3000\u3000\u8c03\u7528isSigMeshWifi()\u65b9\u6cd5\u6765\u5224\u65ad\u8bbe\u5907\u662f\u5426\u4e3a\u84dd\u7259Mesh\u7f51\u5173\u8bbe\u5907\u3002\u5982\u679c\u8fd4\u56de\u503c\u4e3a\u771f\uff0c\u5219\u8be5\u8bbe\u5907\u662f\u84dd\u7259Mesh\u7f51\u5173\u8bbe\u5907\u3002<\/p>\n\n\n\n \u3000\u3000\u6b64\u5916\uff0c\u84dd\u7259Mesh\u7f51\u5173\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u53cc\u6a21\u8bbe\u5907\uff0c\u8fd9\u610f\u5473\u7740\u5b83\u65e2\u53ef\u4ee5\u4f7f\u7528Wi-Fi\u8fdb\u884c\u914d\u7f51\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u84dd\u7259\u8fdb\u884c\u914d\u7f51\u3002\u5728\u5b9e\u9645\u64cd\u4f5c\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u626b\u63cf\u5468\u56f4\u7b26\u5408SIG\u6807\u51c6\u7684\u84dd\u7259\u8bbe\u5907\u6765\u8bc6\u522b\u5f85\u914d\u7f51\u7684\u5b50\u8bbe\u5907\uff0c\u5e76\u901a\u8fc7\u7f51\u5173\u8fdb\u884c\u914d\u7f51\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u8981\u8bfb\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u4fe1\u606f\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff0c\u901a\u8fc7\u4e32\u53e3\u901a\u4fe1\u547d\u4ee4\u83b7\u53d6\u4fe1\u606fUART_MESH_COMMAND_CODE_GET_INFO\u547d\u4ee4\u6765\u83b7\u53d6\u84dd\u7259Mesh\u6a21\u5757\u7684\u5fc5\u8981\u4fe1\u606f<\/p>\n","protected":false},"author":1,"featured_media":97709,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[49,434],"class_list":["post-98427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-m-2","tag-bluetoothmodule"],"_links":{"self":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/98427"}],"collection":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/comments?post=98427"}],"version-history":[{"count":0,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/posts\/98427\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media\/97709"}],"wp:attachment":[{"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/media?parent=98427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/categories?post=98427"},{"taxonomy":"post_tag","embeddable":true,"href":"\/\/www.viralrail.com\/wp-json\/wp\/v2\/tags?post=98427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\u3000\u3000\u516d\u3001 \u5982\u4f55\u901a\u8fc7\u84dd\u7259Mesh\u8bbe\u5907\u914d\u7f51\u4e0e\u63a7\u5236\u6307\u5357\u4e2d\u7684\u65b9\u6cd5\u5224\u65ad\u8bbe\u5907\u662f\u5426\u4e3a\u84dd\u7259Mesh\u8bbe\u5907\u548c\u7f51\u5173?<\/h2>\n\n\n\n
\u3000\u30001. \u5224\u65ad\u662f\u5426\u662f\u84dd\u7259Mesh\u8bbe\u5907<\/strong>\uff1a<\/h3>\n\n\n\n
\u3000\u30002. \u5224\u65ad\u662f\u5426\u662f\u84dd\u7259Mesh\u7f51\u5173\u8bbe\u5907<\/strong>\uff1a<\/h3>\n\n\n\n