{"id":1081,"date":"2025-12-31T17:09:28","date_gmt":"2025-12-31T09:09:28","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=1081"},"modified":"2025-12-31T17:09:28","modified_gmt":"2025-12-31T09:09:28","slug":"4438%e6%97%a0%e7%ba%bf%e7%bd%91%e7%bb%9c%e7%bb%84%e7%bd%91%e4%bb%a3%e7%a0%81%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/31\/4438%e6%97%a0%e7%ba%bf%e7%bd%91%e7%bb%9c%e7%bb%84%e7%bd%91%e4%bb%a3%e7%a0%81%e8%a7%a3%e6%9e%90\/","title":{"rendered":"4438\u65e0\u7ebf\u7f51\u7edc\u7ec4\u7f51\u4ee3\u7801\u89e3\u6790"},"content":{"rendered":"\n<p>\u8fd9\u4e2a\u6807\u9898 <strong>\u201c4438 \u65e0\u7ebf\u7f51\u7edc\u7ec4\u7f51\u4ee3\u7801\u89e3\u6790\u201d<\/strong> \u672c\u8eab<strong>\u6709\u6b67\u4e49<\/strong>\uff0c\u5728\u65e0\u7ebf\/\u5d4c\u5165\u5f0f\u9886\u57df\u91cc <strong>\u201c4438\u201d\u5e76\u4e0d\u662f\u4e00\u4e2a\u901a\u7528\u6807\u51c6\u540d<\/strong>\uff0c\u4e0d\u540c\u5708\u5b50\u91cc\u53ef\u80fd\u6307\u7684\u662f<strong>\u4e0d\u540c\u82af\u7247\u6216\u6a21\u5757<\/strong>\u3002<br>\u4e3a\u4e86\u4e0d\u8bef\u5bfc\u4f60\uff0c\u6211\u5148 <strong>\u628a\u6700\u5e38\u89c1\u7684\u51e0\u79cd\u201c4438\u201d\u6765\u6e90\u8bf4\u660e\u6e05\u695a<\/strong>\uff0c\u518d\u7ed9\u4f60\u4e00\u4efd<strong>\u901a\u7528\u7684\u65e0\u7ebf\u7ec4\u7f51\u4ee3\u7801\u89e3\u6790\u6a21\u677f<\/strong>\uff08\u4f60\u4e00\u5bf9\u7167\u4ee3\u7801\u5c31\u80fd\u770b\u61c2\uff09\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u5148\u660e\u786e\uff1a\u4f60\u8bf4\u7684\u300c4438\u300d\u53ef\u80fd\u6307\u4ec0\u4e48\uff1f<\/h2>\n\n\n\n<p>\u76ee\u524d\u5de5\u7a0b\u91cc\u6700\u5e38\u89c1\u7684\u51e0\u79cd\u53ef\u80fd\u6027\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u2460 <strong>CC2538\uff08TI \u82af\u7247\uff09<\/strong> \u2190 \u2b50\u975e\u5e38\u5e38\u89c1<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e38\u88ab\u8bef\u5199 \/ \u53e3\u5934\u8bf4\u6210\u300c2538 \/ 4438\u300d<\/li>\n\n\n\n<li><strong>ZigBee \/ 6LoWPAN \/ Thread<\/strong><\/li>\n\n\n\n<li>\u7528\u4e8e\uff1a\n<ul class=\"wp-block-list\">\n<li>\u4f20\u611f\u5668\u7f51\u7edc<\/li>\n\n\n\n<li>Mesh \u7ec4\u7f51<\/li>\n\n\n\n<li>\u5de5\u4e1a\u65e0\u7ebf<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udc49 \u5982\u679c\u4f60\u662f <strong>ZigBee \/ Mesh \/ \u8282\u70b9\u5165\u7f51<\/strong>\uff0c90% \u662f\u5b83<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2461 <strong>ESP32 \/ ESP8266 Mesh \u793a\u4f8b\u7aef\u53e3\u53f7 4438<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6709\u4e9b\u9879\u76ee\u628a <strong>TCP \/ UDP \u7aef\u53e3\u5199\u6210 4438<\/strong><\/li>\n\n\n\n<li>\u5e76\u975e\u82af\u7247\u578b\u53f7\uff0c\u800c\u662f<strong>\u76d1\u542c\u7aef\u53e3<\/strong><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u2462 \u67d0\u56fd\u4ea7 <strong>433\/443 MHz \u65e0\u7ebf\u6a21\u5757<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u6709\u4e9b\u6587\u6863\u4f1a\u5199\u6210 <strong>\u201c44\u00d7\u00d7 \u6a21\u5757\u201d<\/strong><\/li>\n\n\n\n<li>\u70b9\u5bf9\u70b9 \/ \u7b80\u5355\u661f\u578b\u7f51\u7edc<\/li>\n\n\n\n<li>\u975e IP \u7f51\u7edc<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u5148\u7ed9\u4f60\u4e00\u4e2a\u3010\u65e0\u7ebf\u7ec4\u7f51\u4ee3\u7801\u901a\u7528\u7ed3\u6784\u89e3\u6790\u3011<\/h2>\n\n\n\n<p>\u4e0d\u7ba1\u4f60\u7528\u7684\u662f <strong>CC2538 \/ ESP \/ NRF \/ 433MHz<\/strong><br><strong>\u7ec4\u7f51\u4ee3\u7801\u4e00\u5b9a\u9003\u4e0d\u5f00\u8fd9 6 \u4e2a\u6838\u5fc3\u6a21\u5757<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1\ufe0f\u20e3 \u65e0\u7ebf\u534f\u8bae\u6808\u521d\u59cb\u5316\uff08\u6700\u5173\u952e\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nradio_init();\nmac_init();\nnetwork_init();\n\n<\/pre><\/div>\n\n\n<p>\u4f5c\u7528\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u521d\u59cb\u5316\u5c04\u9891<\/li>\n\n\n\n<li>\u8bbe\u7f6e\u9891\u9053 \/ \u53d1\u5c04\u529f\u7387<\/li>\n\n\n\n<li>\u51c6\u5907\u5165\u7f51\u80fd\u529b<\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udd11 \u5173\u952e\u8bcd\u4f60\u53ef\u4ee5\u5728\u4ee3\u7801\u91cc\u627e\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>init<\/code><\/li>\n\n\n\n<li><code>radio<\/code><\/li>\n\n\n\n<li><code>mac<\/code><\/li>\n\n\n\n<li><code>net<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2\ufe0f\u20e3 \u8282\u70b9\u89d2\u8272\u5b9a\u4e49\uff08\u7ec4\u7f51\u6838\u5fc3\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#define NODE_TYPE_COORDINATOR\n\/\/ \u6216\n#define NODE_TYPE_ROUTER\n\/\/ \u6216\n#define NODE_TYPE_END_DEVICE\n\n<\/pre><\/div>\n\n\n<p>\u5e38\u89c1\u89d2\u8272\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u89d2\u8272<\/th><th>\u4f5c\u7528<\/th><\/tr><\/thead><tbody><tr><td>Coordinator<\/td><td>\u7f51\u7edc\u521b\u5efa\u8005<\/td><\/tr><tr><td>Router<\/td><td>\u4e2d\u7ee7 \/ Mesh<\/td><\/tr><tr><td>End Device<\/td><td>\u7ec8\u7aef\u8282\u70b9<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\ud83d\udc49 <strong>\u7ec4\u7f51\u662f\u5426\u6210\u529f\uff0c\u5168\u770b\u8fd9\u91cc<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3\ufe0f\u20e3 \u7f51\u7edc\u521b\u5efa \/ \u52a0\u5165\u903b\u8f91\uff08\u91cd\u70b9\u770b\uff09<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u521b\u5efa\u7f51\u7edc<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnetwork_start(PAN_ID, CHANNEL);\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">\u641c\u7d22\u5e76\u52a0\u5165\u7f51\u7edc<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnetwork_scan();\nnetwork_join();\n\n<\/pre><\/div>\n\n\n<p>\u4f60\u53ef\u4ee5\u91cd\u70b9\u770b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>scan<\/code><\/li>\n\n\n\n<li><code>join<\/code><\/li>\n\n\n\n<li><code>start<\/code><\/li>\n\n\n\n<li><code>PANID<\/code><\/li>\n\n\n\n<li><code>CHANNEL<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4\ufe0f\u20e3 \u5730\u5740\u5206\u914d\u4e0e\u8282\u70b9\u8868<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnode.short_addr = allocate_addr();\nnode.parent = select_parent();\n\n<\/pre><\/div>\n\n\n<p>\u8fd9\u91cc\u51b3\u5b9a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8282\u70b9 ID<\/li>\n\n\n\n<li>\u7236\u8282\u70b9\u662f\u8c01<\/li>\n\n\n\n<li>Mesh \u8def\u5f84<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u679c\u4f60\u770b\u5230\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>neighbor table<\/code><\/li>\n\n\n\n<li><code>routing table<\/code><\/li>\n<\/ul>\n\n\n\n<p>\ud83d\udc49 <strong>\u8fd9\u662f Mesh \u4ee3\u7801<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5\ufe0f\u20e3 \u6570\u636e\u53d1\u9001 \/ \u8def\u7531\u903b\u8f91<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsend_packet(dst_addr, payload);\n\n<\/pre><\/div>\n\n\n<p>Mesh \u573a\u666f\u5e38\u89c1\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nif (!is_direct(dst)) {\n    forward_to_parent();\n}\n\n<\/pre><\/div>\n\n\n<p>\u5173\u952e\u8bcd\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>send<\/code><\/li>\n\n\n\n<li><code>recv<\/code><\/li>\n\n\n\n<li><code>route<\/code><\/li>\n\n\n\n<li><code>forward<\/code><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6\ufe0f\u20e3 \u5fc3\u8df3 &amp; \u91cd\u8fde\u673a\u5236\uff08\u7a33\u5b9a\u6027\uff09<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nheartbeat_timer();\ncheck_link_status();\nrejoin_network();\n\n<\/pre><\/div>\n\n\n<p>\u6ca1\u6709\u8fd9\u5757\uff1a<br>\u274c \u7f51\u7edc\u4e0d\u7a33\u5b9a<br>\u274c \u8282\u70b9\u4e00\u6389\u7ebf\u5c31\u6b7b<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u5982\u679c\u4f60\u7528\u7684\u662f <strong>CC2538\uff08ZigBee \/ Mesh\uff09<\/strong><\/h2>\n\n\n\n<p>\u4f60\u901a\u5e38\u4f1a\u770b\u5230\u8fd9\u4e9b\u6587\u4ef6\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnwk.c        \/\/ \u7f51\u7edc\u5c42\nmac.c        \/\/ MAC \u5c42\naps.c        \/\/ \u5e94\u7528\u652f\u6301\u5c42\nzdo.c        \/\/ \u8bbe\u5907\u5bf9\u8c61\n\n<\/pre><\/div>\n\n\n<p>\u5178\u578b\u5165\u7f51\u6d41\u7a0b\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nZDO_StartDevice();\nZDO_JoinNetwork();\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u5982\u679c\u4f60\u8bf4\u7684\u300c4438\u300d\u662f <strong>\u7aef\u53e3\u53f7<\/strong><\/h2>\n\n\n\n<p>\u90a3\u5b83\u591a\u534a\u662f\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#define SERVER_PORT 4438\n\n<\/pre><\/div>\n\n\n<p>\u6216\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nServerSocket server = new ServerSocket(4438);\n\n<\/pre><\/div>\n\n\n<p>\ud83d\udc49 \u90a3\u8fd9\u662f <strong>\u7f51\u7edc\u5e94\u7528\u5c42\u901a\u4fe1\uff0c\u4e0d\u662f\u65e0\u7ebf\u534f\u8bae\u672c\u8eab<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u6211\u53ef\u4ee5\u76f4\u63a5\u201c\u9010\u884c\u5e2e\u4f60\u62c6\u201d<\/h2>\n\n\n\n<p>\u4f60\u73b0\u5728\u6709\u4e09\u79cd\u9009\u62e9 \ud83d\udc47<br>\uff08\u6211\u90fd\u53ef\u4ee5\u76f4\u63a5\u505a\uff09<\/p>\n\n\n\n<p>1\ufe0f\u20e3 <strong>\u628a\u4ee3\u7801\u8d34\u51fa\u6765<\/strong>\uff08C \/ Arduino \/ ESP \/ ZigBee \u90fd\u884c\uff09<br>2\ufe0f\u20e3 \u544a\u8bc9\u6211\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7528\u7684\u662f\u4ec0\u4e48 <strong>\u82af\u7247\/\u6a21\u5757<\/strong><\/li>\n\n\n\n<li>\u662f <strong>Mesh \/ \u661f\u578b \/ \u70b9\u5bf9\u70b9<\/strong><br>3\ufe0f\u20e3 \u53d1\u4f60\u6587\u6863\u6807\u9898\u6216\u622a\u56fe\u4e00\u53e5\u8bdd<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u4e2a\u6807\u9898 \u201c4438 \u65e0\u7ebf\u7f51\u7edc\u7ec4\u7f51\u4ee3\u7801\u89e3\u6790\u201d \u672c\u8eab\u6709\u6b67\u4e49\uff0c\u5728\u65e0\u7ebf\/\u5d4c\u5165\u5f0f\u9886\u57df\u91cc &#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/31\/4438%e6%97%a0%e7%ba%bf%e7%bd%91%e7%bb%9c%e7%bb%84%e7%bd%91%e4%bb%a3%e7%a0%81%e8%a7%a3%e6%9e%90\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-1081","post","type-post","status-publish","format-standard","hentry","category-12"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=1081"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1081\/revisions"}],"predecessor-version":[{"id":1082,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/1081\/revisions\/1082"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=1081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=1081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}