{"id":54143,"date":"2023-10-07T21:07:10","date_gmt":"2023-10-07T13:07:10","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=54143"},"modified":"2023-10-07T21:07:14","modified_gmt":"2023-10-07T13:07:14","slug":"wlwtxxymhcqb","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/54143.html","title":{"rendered":"\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8baeMQTT\u548cCOAP\u533a\u522b"},"content":{"rendered":"\n
\u3000\u3000\u968f\u7740\u7269\u8054\u7f51\u7684\u5feb\u901f\u53d1\u5c55\uff0c\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\u4e5f\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\u3002MQTT(Message Queuing Telemetry Transport)\u548cCoAP(Constrained Application Protocol)\u662f\u4e24\u79cd\u5e38\u7528\u7684\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8MQTT\u548cCoAP\u7684\u533a\u522b\uff0c\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u548c\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u534f\u8bae\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u53d1\u5e03\/\u8ba2\u9605\u534f\u8bae\uff0c\u6700\u65e9\u7531IBM\u5f00\u53d1\u3002\u5b83\u4e13\u4e3a\u4f4e\u5e26\u5bbd\u548c\u4e0d\u7a33\u5b9a\u7f51\u7edc\u73af\u5883\u4e0b\u7684\u7269\u8054\u7f51\u8bbe\u5907\u8bbe\u8ba1\u3002MQTT\u7684\u6838\u5fc3\u601d\u60f3\u662f\u53d1\u5e03\u8005\u53d1\u5e03\u6d88\u606f\uff0c\u8ba2\u9605\u8005\u8ba2\u9605\u611f\u5174\u8da3\u7684\u4e3b\u9898\uff0c\u5e76\u63a5\u6536\u76f8\u5e94\u7684\u6d88\u606f\u3002<\/p>\n\n\n\n
\u3000\u3000CoAP\u662f\u4e00\u79cd\u4e13\u4e3a\u53d7\u9650\u8bbe\u5907\u548c\u7f51\u7edc\u8bbe\u8ba1\u7684\u5e94\u7528\u5c42\u534f\u8bae\uff0c\u6700\u521d\u7531IETF\u63d0\u51fa\u3002\u5b83\u57fa\u4e8eRESTful\u539f\u5219\uff0c\u4f7f\u7528UDP\u534f\u8bae\u8fdb\u884c\u901a\u4fe1\u3002CoAP\u7684\u76ee\u6807\u662f\u5728\u8d44\u6e90\u53d7\u9650\u7684\u8bbe\u5907\u4e0a\u5b9e\u73b0\u4f4e\u5ef6\u8fdf\u548c\u4f4e\u80fd\u8017\u7684\u901a\u4fe1\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u91c7\u7528\u53d1\u5e03\/\u8ba2\u9605\u6a21\u5f0f\uff0c\u53d1\u5e03\u8005\u53d1\u9001\u6d88\u606f\u5230\u7279\u5b9a\u4e3b\u9898\uff0c\u8ba2\u9605\u8005\u5219\u8ba2\u9605\u611f\u5174\u8da3\u7684\u4e3b\u9898\u5e76\u63a5\u6536\u76f8\u5e94\u7684\u6d88\u606f\u3002\u800cCoAP\u4f7f\u7528\u8bf7\u6c42\/\u54cd\u5e94\u6a21\u5f0f\uff0c\u5ba2\u6237\u7aef\u53d1\u9001\u8bf7\u6c42\uff0c\u670d\u52a1\u5668\u8fd4\u56de\u54cd\u5e94\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u4f7f\u7528TCP\u534f\u8bae\u8fdb\u884c\u901a\u4fe1\uff0c\u4fdd\u8bc1\u53ef\u9760\u6027\u548c\u6709\u5e8f\u6027\u3002\u800cCoAP\u4f7f\u7528UDP\u534f\u8bae\uff0c\u5177\u6709\u8f83\u4f4e\u7684\u5f00\u9500\u548c\u5ef6\u8fdf\uff0c\u9002\u7528\u4e8e\u8d44\u6e90\u53d7\u9650\u7684\u8bbe\u5907\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u7684\u901a\u4fe1\u5f00\u9500\u76f8\u5bf9\u8f83\u5927\uff0c\u9700\u8981\u7ef4\u62a4\u8fde\u63a5\u72b6\u6001\u548c\u6d88\u606f\u961f\u5217\u7b49\u3002\u800cCoAP\u7684\u901a\u4fe1\u5f00\u9500\u8f83\u5c0f\uff0c\u9002\u7528\u4e8e\u8d44\u6e90\u53d7\u9650\u7684\u8bbe\u5907\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u652f\u6301\u57fa\u4e8eSSL\/TLS\u7684\u52a0\u5bc6\u901a\u4fe1\uff0c\u53ef\u4ee5\u4fdd\u8bc1\u6570\u636e\u7684\u5b89\u5168\u6027\u3002CoAP\u4e5f\u652f\u6301\u52a0\u5bc6\u901a\u4fe1\uff0c\u4f46\u7531\u4e8eUDP\u534f\u8bae\u7684\u7279\u6027\uff0c\u9700\u8981\u4f7f\u7528DTLS(Datagram Transport Layer Security)\u6765\u5b9e\u73b0\u3002<\/p>\n\n\n\n
\u3000\u3000MQTT\u9002\u7528\u4e8e\u9700\u8981\u53ef\u9760\u6027\u548c\u7a33\u5b9a\u6027\u7684\u573a\u666f\uff0c\u4f8b\u5982\u5de5\u4e1a\u63a7\u5236\u7cfb\u7edf\u548c\u4f20\u611f\u5668\u7f51\u7edc\u3002CoAP\u9002\u7528\u4e8e\u8d44\u6e90\u53d7\u9650\u7684\u8bbe\u5907\uff0c\u4f8b\u5982\u667a\u80fd\u5bb6\u5c45\u548c\u7269\u8054\u7f51\u8bbe\u5907\u3002<\/p>\n\n\n\n
\u3000\u3000\u9009\u62e9\u5408\u9002\u7684\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\u9700\u8981\u8003\u8651\u4ee5\u4e0b\u51e0\u4e2a\u56e0\u7d20\uff1a<\/p>\n\n\n\n
\u3000\u3000MQTT\u548cCoAP\u662f\u4e24\u79cd\u5e38\u7528\u7684\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\uff0c\u5b83\u4eec\u5728\u901a\u4fe1\u6a21\u5f0f\u3001\u4f20\u8f93\u534f\u8bae\u3001\u8d44\u6e90\u6d88\u8017\u3001\u5b89\u5168\u6027\u548c\u5e94\u7528\u573a\u666f\u7b49\u65b9\u9762\u5b58\u5728\u4e00\u5b9a\u7684\u5dee\u5f02\u3002\u9009\u62e9\u9002\u5408\u7684\u534f\u8bae\u9700\u8981\u6839\u636e\u8bbe\u5907\u8d44\u6e90\u9650\u5236\u3001\u901a\u4fe1\u53ef\u9760\u6027\u8981\u6c42\u3001\u6570\u636e\u5b89\u5168\u6027\u8981\u6c42\u548c\u5e94\u7528\u573a\u666f\u7b49\u56e0\u7d20\u8fdb\u884c\u7efc\u5408\u8003\u8651\u3002<\/strong>\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u548c\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" \u968f\u7740\u7269\u8054\u7f51\u7684\u5feb\u901f\u53d1\u5c55\uff0c\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae\u4e5f\u53d8\u5f97\u8d8a\u6765\u8d8a\u91cd\u8981\u3002MQTT(Message Queuing Telemetry Transport)\u548cCoAP(Constrained Application Protocol)\u662f\u4e24\u79cd\u5e38\u7528\u7684\u7269\u8054\u7f51\u901a\u4fe1\u534f\u8bae<\/p>\n","protected":false},"author":1,"featured_media":4132,"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":[136,46,137],"class_list":["post-54143","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-coap","tag-m","tag-txxy"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/54143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=54143"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/54143\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=54143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=54143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=54143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}