{"id":8865,"date":"2022-01-07T11:08:01","date_gmt":"2022-01-07T03:08:01","guid":{"rendered":"http:\/\/www.szryc.com\/?p=8865"},"modified":"2022-01-07T11:08:01","modified_gmt":"2022-01-07T03:08:01","slug":"%e5%9f%ba%e4%ba%8estm32%e7%9a%84%e8%bf%9c%e7%a8%8b%e9%a2%84%e4%bb%98%e8%b4%b9%e7%94%b5%e8%83%bd%e7%9b%91%e6%b5%8b%e7%b3%bb%e7%bb%9f%e8%ae%be%e8%ae%a1%e4%b8%8e%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"http:\/\/www.szryc.com\/?p=8865","title":{"rendered":"\u57fa\u4e8eSTM32\u7684\u8fdc\u7a0b\u9884\u4ed8\u8d39\u7535\u80fd\u76d1\u6d4b\u7cfb\u7edf\u8bbe\u8ba1\u4e0e\u5e94\u7528"},"content":{"rendered":"

\u5f20\u661f<\/p>\n

\u5b89\u79d1\u745e\u7535\u6c14\u80a1\u4efd\u6709\u9650\u516c\u53f8 \u4e0a\u6d77\u5609\u5b9a 201801<\/p>\n

\u6587\u6458\uff1a<\/strong>\u968f\u7740\u7535\u5b50<\/u>\u4fe1\u606f\u6280\u672f\u7684\u8fc5\u731b\u53d1\u5c55\uff0c\u7535\u80fd\u8fdc\u7a0b\u76d1\u6d4b\u4e5f\u6709\u4e86\u5f88\u5927\u7684\u53d1\u5c55\uff0c\u5176\u53d1\u5c55\u4e0e\u5e94\u7528\u5bf9\u4e8e\u7535\u529b\u7cfb\u7edf\u7684\u5b89\u5168\u8fd0\u884c\u6709\u7740\u91cd\u5927\u7684\u610f\u4e49\u3002\u672c\u8bba\u6587\u4ee5MQTT\u670d\u52a1\u5668\u4e3a\u57fa\u7840\uff0c\u8bbe\u8ba1\u4e86\u4e00\u5957\u80fd\u591f\u5b9e\u65f6\u76d1\u63a7<\/u>\u7528\u6237\u7ec8\u7aef\u7535\u538b\u3001\u7535\u6d41<\/u>\u3001\u529f\u7387\u3001\u603b\u7535\u80fd\u3001\u529f\u7387\u56e0\u6570\u548c\u529f\u7387\u56e0\u6570\u7684\u8fdc\u7a0b\u76d1\u63a7\u7cfb\u7edf\u3002<\/p>\n

\u4fe1\u606f\u7531\u56e0\u7279\u7f51\u548cMQTT\u670d\u52a1\u5668\u4f20\u8f93\u5230\u8fdc\u7a0b\u76d1\u63a7\u7aef\uff0c\u8fdc\u7a0b\u76d1\u63a7\u7aef\u53ef\u4ee5\u5b9e\u65f6\u663e\u793a\u6709\u5173\u7684\u53c2\u6570\uff0c\u5e76\u901a\u8fc7MQTT\u670d\u52a1\u5668\u5bf9\u76f8\u5173\u7684\u7535\u529b\u53c2\u6570\u8fdb\u884c\u5206\u6790\u5904\u7406\u3002\u8bd5\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u8be5\u7cfb\u7edf\u8fd0\u884c\u7a33\u5b9a\uff0c\u53ef\u6269\u5c55\u6027\u597d\uff0c\u6210\u672c\u4f4e\u5ec9\u3002<\/p>\n

\u5173\u952e\u5b57<\/strong>\uff1aSTM32<\/u>\uff1b\u7535\u529b\u76d1\u6d4b\uff1bMQTT\u3002<\/p>\n

0\u5f15\u8a00<\/strong><\/p>\n

\u4f34\u968f\u7740\u7535\u5b50\u4fe1\u606f\u6280\u672f\u548c\u56e0\u7279\u7f51\u7684\u5feb\u901f\u53d1\u5c55\uff0c\u8bbe\u5907\u7684\u8fdc\u7a0b\u76d1\u63a7\u5728\u6211\u4eec\u751f\u6d3b\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5b83\u8ba9\u6211\u4eec\u7684\u751f\u6d3b\u53d8\u5f97\u66f4\u52a0\u5feb\u6377\u3001\u4fbf\u5229\u3002\u7535\u529b\u662f\u4eba\u4eec\u751f\u6d3b\u4e2d\u4e0d\u53ef\u7f3a\u5c11\u7684\u91cd\u8981\u80fd\u6e90\uff0c\u5176\u5b89\u5168\u8fd0\u884c\u4e8b\u5173\u56fd\u6c11\u7ecf\u6d4e\u7684\u5404\u4e2a\u65b9\u9762\uff0c\u4f46\u662f\uff0c\u4e09\u76f8\u4ea4\u6d41\u7cfb\u7edf\u4e2d\u8bbe\u5907\u7684\u975e\u7ebf\u6027\u3001\u975e\u5bf9\u79f0\u6027\u8f83\u5927\uff0c\u5404\u79cd\u6545\u969c\u90fd\u4f1a\u5f71\u54cd\u7535\u7f51\u8d28\u91cf\u3002\u56e0\u6b64\u9700\u8981\u968f\u65f6\u638c\u63e1\u7535\u7f51\u8fd0\u884c\u72b6\u6001\uff0c\u5b9e\u65f6\u76d1\u63a7\u7535\u7f51\u7684\u5404\u9879\u53c2\u6570\uff0c\u5e76\u4e14\u80fd\u53ca\u65f6\u5c06\u76d1\u6d4b\u6570\u636e\u4f20\u8f93\u5230\u8fdc\u7a0b\u76d1\u63a7\u7aef\uff0c\u4ee5\u4fbf\u6709\u5173\u4eba\u5458\u89c2\u5bdf\u548c\u5206\u6790\u3002<\/p>\n

1\u7cfb\u7edf\u8bbe\u8ba1<\/strong><\/p>\n

\u8be5\u7cfb\u7edf\u4e3b\u8981\u7531\u7535\u80fd\u91c7\u96c6\u7ec8\u7aef\u3001\u7f51\u5173\u8bbe\u5907\u548c\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0\u7ec4\u6210\uff0c\u7cfb\u7edf\u7ed3\u6784\u89c1\u56fe1\u3002\u7ec8\u7aef\u7535\u80fd\u6570\u636e\u7531\u7535\u80fd\u8ba1\u91cf\u4f20\u611f\u5668<\/u>\u83b7\u53d6\uff0c\u7ecf\u8fc7\u5355\u7247\u673aSTM32\u5904\u7406\u540e\uff0c\u4ee5CAN<\/u>\u603b\u7ebf\u65b9\u5f0f\u4f20\u9001\u81f3\u7f51\u5173\u8bbe\u5907\uff0c\u518d\u901a\u8fc7Internet\u7f51\u7edc\u548cMQTT\u670d\u52a1\u5668\u5411\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0\u53d1\u9001\u6570\u636e\uff0c\u5e76\u5bf9\u5176\u8fdb\u884c\u663e\u793a\u3001\u5b58\u50a8\u7b49\u64cd\u4f5c\u3002( \u89c1\u56fe 1)\u3002<\/p>\n

\"\u57fa\u4e8eSTM32\u7684\u8fdc\u7a0b\u9884\u4ed8\u8d39\u7535\u80fd\u76d1\u6d4b\u7cfb\u7edf\u8bbe\u8ba1\u4e0e\u5e94\u7528\"<\/div>\n

\u56fe1 \u7cfb\u7edf\u7ed3\u6784\u56fe<\/p>\n

2<\/strong>\u786c\u4ef6\u8bbe\u8ba1<\/strong><\/p>\n

\u7b2c\u4e00\u90e8\u5206\u91c7\u7528STM32F103C<\/u>8T6\u5355\u7247\u673a\u4f5c\u4e3a\u4e3b\u63a7\u82af\u7247\uff0c\u4ee5\u4fbf\u4e8e\u6d4b\u91cf<\/u>\uff0c\u4f7f\u5f97\u6d4b\u91cf\u66f4\u52a0\u65b9\u4fbf\u53ef\u9760\uff0c\u964d\u4f4e\u6210\u672c\u3002\u6b64\u82af\u7247\u7cfb\u7edf\u529f\u8017\u4f4e\uff0c\u5177\u6709CAN\u603b\u7ebf\u63a5\u53e3<\/u>\uff0c\u4fbf\u4e8e\u5404\u8fdc\u7a0b\u76d1\u63a7\u7ec8\u7aef\u3001\u7f51\u5173\u8bbe\u5907\u8fdb\u884c\u901a\u4fe1\uff0c\u5e76\u5177\u67095\u8defUSART\u63a5\u53e3\uff0c\u53ef\u65b9\u4fbf\u5730\u4e0eWifi\u6a21\u5757\u53ca\u7535\u80fd\u8ba1\u91cf\u4f20\u611f\u5668\u8fdb\u884c\u901a\u4fe1\u3002<\/p>\n

(\u4e8c)\u4f20\u611f\u5668\u6a21\u5757\u672c\u7cfb\u7edf\u91c7\u7528IM1253B\u5355\u76f8\u76f4\u6d41\u6a21\u5757\uff0c\u53ef\u5bf945~65Hz\u4ea4\u6d41\u7535\u538b\u3001\u7535\u6d41\u3001\u529f\u7387\u56e0\u6570\u3001\u529f\u7387\u3001\u7535\u80fd\u7b49\u8fdb\u884c\u6d4b\u91cf\u3002<\/p>\n

\u8d44\u6599<\/u>\uff0c\u4fbf\u53ef\u901a\u8fc7\u4e32\u53e3\u65b9\u5f0f\u4e0e\u5176\u4ed6\u5355\u7247\u673a<\/u>\u8fdb\u884c\u901a\u4fe1\u3002<\/p>\n

3\u00a0<\/strong>MQTT\u670d\u52a1\u5668<\/strong><\/p>\n

MQTT\u662f\u4e00\u79cd\u5e7f\u6cdb\u5e94\u7528\u7684\u7269\u8054\u7f51<\/u>\u534f\u8bae\uff0cMQTT\u534f\u8bae\u8981\u6c42MQTT\u7684\u4ee3\u7406\u3002\u672c\u65b9\u6848\u5229\u7528\u5f00\u653e\u6e90\u7801\u7684MQTT\u7ec4\u4ef6\u5728\u963f\u91cc\u4e91\u670d\u52a1\u5668\u4e0a\u6784\u5efaMQTT\u670d\u52a1\u5668\uff0c\u5177\u4f53\u7684\u642d\u5efa\u8fc7\u7a0b\u53ef\u53c2\u8003\u76f8\u5173\u6587\u6863\u3002MQTT\u670d\u52a1\u5668\u642d\u5efa\u5b8c\u6210\u540e\uff0c\u8fdc\u7a0b\u76d1\u63a7\u7ec8\u7aef\u4e0e\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0\u4e4b\u95f4\u5c31\u53ef\u4ee5\u8fdb\u884c\u4fe1\u606f\u4ea4\u4e92\u3002<\/p>\n

4<\/strong>\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0<\/strong><\/p>\n

\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0\u91c7\u7528C#<\/u>\u8bed\u8a00\u5f00\u53d1\uff0c\u5f00\u53d1\u5e73\u53f0\u4e3avisualstudio2010\u3002\u5b98\u65b9\u63d0\u4f9b\u4e86\u4e0eMQTT\u670d\u52a1\u5668\u7684\u52a8\u6001\u5e93\uff0c\u5305\u62ec\u670d\u52a1\u5668\u8fde\u63a5\u3001\u6570\u636e\u53d1\u9001\u548c\u6570\u636e\u63a5\u6536\u51fd\u6570\u3002\u76d1\u63a7\u5e73\u53f0\u63a5\u6536\u7684\u6570\u636e\u53ef\u4ee5\u5b9e\u65f6\u663e\u793a\u5e76\u5b58\u50a8\u5728\u672c\u5730\u6570\u636e\u670d\u52a1\u5668\u4e2d\uff0c\u4fbf\u4e8e\u540e\u7eed\u5206\u6790\u548c\u5904\u7406\u3002\u5f53\u7cfb\u7edf\u4f7f\u7528\u6570\u636e\u5e93<\/u>\u65f6\uff0cMi<\/u>crosoftSQLServer2008\u3002<\/p>\n

5\u5b89\u79d1\u745eAcrelCloud-3200\u9884\u4ed8\u8d39\u6c34\u7535\u4e91\u5e73\u53f0<\/strong><\/p>\n

5.1 \u7cfb\u7edf\u65b9\u6848<\/p>\n

\u8be5\u7cfb\u7edf\u91c7\u7528B\/S\u7cfb\u7edf\u7ed3\u6784\uff0c\u4e3b\u8981\u5305\u62ec\u524d\u7aef\u7ba1\u7406\u7f51\u7ad9\u548c\u540e\u53f0\u6536\u96c6\u670d\u52a1\uff0c\u914d\u5408DDSY1352\u3001DTSY1352\u7cfb\u5217\u548cDTSY1352\u7cfb\u5217\uff0c\u5b9e\u73b0\u7535\u80fd\u6d4b\u91cf\u3001\u7535\u8d39\u7ba1\u7406\u7b49\u529f\u80fd\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u9009\u62e9\u8fdc\u7a0b\u9600\u63a7\u6c34\u8868\uff0c\u5f62\u6210\u6c34\u7535\u4e00\u4f53\u5316\u9884\u4ed8\u7cfb\u7edf\uff0c\u4ee5\u5b9e\u73b0\u5148\u4ed8\u540e\u4ed8\u7684\u76ee\u7684\u3002\u5269\u4f59\u6c34\u81ea\u52a8\u5173\u95ed\u3002<\/p>\n

 <\/p>\n

 <\/p>\n

5.2 \u7cfb\u7edf\u529f\u80fd<\/p>\n

AcrelCloud-3200\u9884\u4ed8\u6c34\u7535\u4e91\u5e73\u53f0\u7531\u4e91\u5e73\u53f0-\u7f51\u5173-\u9884\u4ed8\u7535\u80fd\u8868\u7ec4\u6210\uff0c\u901a\u8fc7\u901a\u4fe1\u7f51\u7edc\u5145\u503c\u3001\u67e5\u8be2\u3001\u76d1\u63a7\u3001\u63a7\u5236\u548c\u77ed\u4fe1\u62a5\u8b66\u3002<\/p>\n

\u8be5\u7cfb\u7edf\u9002\u7528\u4e8e\u4e00\u4e9b\u5927\u578b\u96c6\u56e2\u548c\u5927\u578b\u7269\u4e1a\uff0c\u5f80\u5f80\u9700\u8981\u5206\u6563\u591a\u4e2a\u7269\u4e1a\u73af\u5883\u7684\u96c6\u4e2d\u6536\u8d39\u548c\u7ba1\u7406\uff0c\u9762\u4e34\u590d\u6742\u7684\u9700\u6c42\uff0c\u5982\u6570\u636e\u516c\u5171\u7f51\u7edc\u4f20\u8f93\u3001\u8d22\u52a1\u8fd0\u8425\u5206\u6563\u3001\u5728\u7ebf\u652f\u4ed8\u3001\u603b\u90e8\u8d22\u52a1\u624e\u53e3\u7b49\u3002<\/p>\n

 <\/p>\n

 <\/p>\n

\u8fdc\u7a0b\u96c6\u4e2d\u6284\u8868\uff1a\u6284\u8868\u4fe1\u606f\u901a\u8fc7\u7f51\u5173\u5b9e\u65f6\u4e0a\u4f20\u5230\u4e91\u5e73\u53f0\uff0c\u5feb\u901f\u4fbf\u6377\uff0c\u514d\u53bb\u4eba\u5de5\u6284\u8868 \u3002<\/p>\n

\u6c34\u8868\u9884\u4ed8\u8d39:\u53ef\u662f\u67e5\u770b\u67d0\u533a\u57df\u6c34\u8868\u7684\u5b9e\u65f6\u72b6\u6001\u4fe1\u606f\uff0c\u5e76\u53ef\u4ee5\u8fdb\u884c\u5355\u8868\u6216\u6279\u91cf\u8bbe\u7f6e\u6c34\u4ef7\u63a7\u9600\u7b49\u64cd\u4f5c\u3002<\/p>\n

\u8fdc\u7a0b\u552e\u7535:\u8d22\u52a1\u96c6\u4e2d\u7ba1\u7406\uff0c\u7535\u91cf\u5b9e\u65f6\u4e0b\u53d1\uff0c\u5e76\u6bd4\u5bf9\u5145\u503c\u6b21\u6570\uff0c\u65b9\u4fbf\u5feb\u6377\u3002<\/p>\n

6\u7ed3\u675f\u8bed<\/strong><\/p>\n

\u8be5\u7cfb\u7edf\u5229\u7528MQTT\u670d\u52a1\u5668\u4f5c\u4e3a\u6570\u636e\u4e2d\u5fc3\uff0c\u80fd\u591f\u5b9e\u73b0\u5bf9\u7535\u80fd\u6570\u636e\u7684\u8fdc\u7a0b\u8fdc\u7a0b\u76d1\u6d4b\uff0c\u5e76\u53ef\u5728\u8fdc\u7a0b\u76d1\u63a7\u5e73\u53f0\u4e0a\u8fdb\u884c\u663e\u793a\u4e0e\u5b58\u50a8\uff0c\u5728\u7535\u529b\u7cfb\u7edf\u7684\u667a\u80fd\u5316\u3001\u81ea\u52a8\u5316\u5efa\u8bbe\u4e2d\u5177\u6709\u4e00\u5b9a\u7684\u5e94\u7528\u4ef7\u503c\u3002
\n\u00a0<\/p>\n

\u4f5c\u8005<\/u>\u7b80\u4ecb\uff1a<\/p>\n

\u5f20\u661f. \u5973. \u73b0\u4efb\u804c\u4e8e\u5b89\u79d1\u745e\u7535\u6c14\u80a1\u4efd\u6709\u9650\u516c\u53f8\uff0c\u4e3b\u8981\u4ece\u4e8b\u667a\u6167\u6d88\u9632\u5e73\u53f0\u7684\u8bbe\u8ba1\u4e0e\u5e94\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5f20\u661f \u5b89\u79d1\u745e\u7535\u6c14\u80a1\u4efd\u6709\u9650\u516c\u53f8 \u4e0a\u6d77\u5609\u5b9a 201801 \u6587\u6458\uff1a\u968f\u7740\u7535\u5b50\u4fe1\u606f\u6280\u672f\u7684\u8fc5\u731b\u53d1\u5c55\uff0c\u7535\u80fd\u8fdc\u7a0b\u76d1\u6d4b\u4e5f\u6709\u4e86\u5f88\u5927 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"_links":{"self":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/8865"}],"collection":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8865"}],"version-history":[{"count":1,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/8865\/revisions"}],"predecessor-version":[{"id":8871,"href":"http:\/\/www.szryc.com\/index.php?rest_route=\/wp\/v2\/posts\/8865\/revisions\/8871"}],"wp:attachment":[{"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8865"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.szryc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}