Ö§³ÖÖÐÐÄ
USR-G805p MQTTģʽAÖ÷ÌâʹÓÃʾÀý
2024-07-10



USR-G805p MQTTģʽAÖ÷ÌâʹÓÃʾÀý

Ò»¡¢×ÊÁÏÏÂÔØ

USR-G805p ˵Ã÷Êé/Download/1163.html

USR-G805p ¹æ¸ñÊé /Download/1164.html

¡¾PC¶Ëµ÷ÊÔ¹¤¾ß¡¿ÍøÂçµ÷ÊÔÖúÊÖ ´®¿Úµ÷ÊÔÖúÊÖ¶þºÏÒ»/Download/27.html

MQTTfxÈí¼þ¿ÉÒÔ°Ù¶È×ÔÐÐÏÂÔØ¡£

±¸×¢£ºMQTT¹¦ÄÜ¿ÉÒԲο¼USR-DR504/514 ±ßÔµ¼ÆËã+MQTTʹÓÃ×ÊÁÏ°ü£º/Download/990.html

¶þ¡¢Ó²¼þÁ¬½Ó

1¡¢ËùÐèÎïÆ·

USR-G805p ²úÆ· 1̨

12VµçÔ´ÊÊÅäÆ÷ 1Ìõ

USB-RS485´®¿ÚÏß 1Ìõ

±Ê¼Ç±¾µçÄÔ 1̨

2¡¢Ó²¼þÁ¬½Ó

USR-G805pµÄ485´®¿Ú½ÓUSB-RS485´®¿ÚÏßµ½µçÄÔUSB¿Ú£¬½ÓºÃ4GÌìÏߣ¬²åºÃÍâÖÃSIM¿¨£¬È»ºó²úÆ·½Ó12VµçÔ´ÊÊÅäÆ÷£¬Éϵç¡£USR-G805pµÄLAN1Íø¿ÚÓÃÍøÏߺ͵çÄÔÖ±Á¬£¬µçÄÔ»ñȡͬÍø¶ÎIP¡£

3¡¢²é¿´¶Ë¿ÚºÅ

µçÄÔÊó±êµã»÷¼ÆËã»ú¾­Óª£¬ÓÒ»÷£¬µã¿ªÉ豸¾­ÓªÆ÷£¬µã»÷¶Ë¿Ú£¬²é¿´½Ó

USR-G805pµÄUSB-RS485´®¿ÚÏßCOM¿ÚºÅ£¬COM10¡£


Èý¡¢USR-G805pÍøÒ³²ÎÊýÉèÖÃ

1¡¢ä¯ÀÀÆ÷ÊäÈë192.168.1.1µÇ½USR-G806pÍøÒ³£¬ÃÜÂëÊÇadmin¡£

2¡¢ÉèÖù¤×÷ģʽ

ÍøÒ³µã»÷DTU£¬µã»÷»ù±¾²ÎÊý£¬¹¤×÷ģʽѡÔñMQTTģʽ¡£µã»÷Ó¦Óá£

3¡¢´®¿Ú²ÎÊý

ÍøÒ³µã»÷DTU£¬µã»÷»ù±¾²ÎÊý£¬´®¿Ú²ÎÊý±£³ÖĬÈÏ£¬Êµ¼ÊÓ¦ÓýÓʵ¼Ê485´®¿ÚÉ豸µÄʱºò£¬ÐèÒªºÍËù½Ó485´®¿ÚÉ豸µÄ´®¿Ú²ÎÊýÒ»Ö¡£µã»÷Ó¦Óá£

4¡¢MQTTÅäÖÃ

£¨1£©ÍøÒ³µã»÷DTU£¬µã»÷MQTT£¬·þÎñÅäÖã¬MQTTµØÖ·ºÍ¶Ë¿ÚÌîÒªÁ¬½ÓµÄMQTT·þÎñÆ÷µÄµØÖ·£¬¶Ë¿Ú1883¡£

¿Í‘ôÃûºÍÃÜÂëÌîMQTT·þÎñÆ÷µÄ¿Í‘ôÃûºÍÃÜÂë¡£

Êý¾Ý¸ñʽѡÔñ͸´«Êä³ö¡£

¹Ë¿Í¶ËID×Ô¶¨ÒåΪ1234567890£¬ÐÒÃâºÍÆäËûMQTT¹Ë¿Í¶ËIDÖظ´¡£

£¨2£©AÖ÷Ì⣬¶©ÔÄÌîд/USR-G805p/get£¬·¢²¼Ìîд/USR-G805p/update¡£

£¨3£©µã»÷Ó¦Óá£

5¡¢ÍøÒ³ÖØÆô

ÍøÒ³µã»÷ϵͳ£¬µã»÷»ù´¡ÉèÖ㬵ã»÷ÖØÆôÉ豸¡£

ËÄ¡¢MQTTfxÈí¼þÉèÖÃ

1¡¢´ò¿ªMQTT.fxÈí¼þ

2¡¢½¨Ò»¸öеÄÅäÖÃÎļþ×öÁíÒ»¸öMQTT¹Ë¿Í¶Ë

£¨1£©ÅäÖÃÎļþÃû×Ô¶¨ÒåÓÃMQTT

£¨2£©·þÎñÆ÷µØÖ·ÌîºÍUSR-G805pÁ¬½ÓµÄͬһ¸öMQTT·þÎñÆ÷µØÖ·

£¨3£©¶Ë¿ÚÌîMQTT·þÎñÆ÷¶Ë¿Ú1883

£¨4£©Client ID£¨¹Ë¿Í¶ËID£©¿ÉÒÔµã»÷ºóÃæµÄGenerate×Ô¶¯´´½¨£¬×¢ÒâºÍUSR-G805pµÄ¹Ë¿Í¶ËID²»ÒªÒ»Ñù£¬Èç¹ûÏàͬ»á³åÍ»¡£

£¨5£©µã»÷User Credentials£¬User NAMEÊäÈëMQTT·þÎñÆ÷µÄ¿Í‘ôÃû£¬PasswordÊäÈëMQTT·þÎñÆ÷µÄÃÜÂë¡£

£¨6£©ËùÓвÎÊýÉèÖÃÍê³ÉÖ®ºó£¬µã»÷ApplyÓ¦Óá£

3¡¢MQTT.fxÈí¼þÑ¡Ôñн¨µÄ¹Ë¿Í¶Ë£¬µã»÷ConnectÁ¬½Ó

4¡¢MQTT.fxÈí¼þ·¢ËÍATÖ¸ÁîAT+MQTTSUB;È¥²éѯÉèÖõÄÖ÷Ìâ¡£

£¨1£©MQTT.fxÈí¼þµã»÷Publish£¬ÊäÈëAT+MQTTSUB;

£¨2£©MQTT.fxÈí¼þµã»÷Subscribe£¬ÊäÈë/USR-G805p/update£¬µã»÷ºóÃæµÄSubscribe¡£

£¨3£©²éѯµ½ATÖ¸ÁîÄÚÈÝ

+MQTTSUB:

14,/USR-G805p/get,0

15,/USR-G805p/update,0;




±àдÈË£º½ðÖ¾·½ ±àдÈÕÆÚ£º2024-07-10

ÉóºËÈË£º½ðÖ¾·½ ÉóºËÈÕÆÚ£º2024-07-10

¶©Õý°æ±¾£ºV1.0 ¶©ÕýÄÚÈÝ£º³õ¸å                                                                        




¹Ø×¢galaxyÒøºÓ¹ú¼Ê΢ÐŹ«ÖÚºÅ
Á˽â¸ü¶àÐÅÏ¢

sitemap¡¢µØͼ