
ÍøÂçÍØÆËͼÈçÏ£º
Ò»¡¢ÃüÁî˵Ã÷£º
? ¹¦ÄÜ£º²éѯ/ÉèÖù¤×÷ģʽ¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+WKMOD{CR}»òAT+WKMOD?{CR}
{CR}{LF}+WKMOD:mod{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+HEARTTM=mod{CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u mod£º¹¤×÷ģʽÉèÖã¬ÕâÀïΪMQTT¡£
? Àý£ºAT+WKMOD =MQTT
2¡¢AT+MQTTCONN
? ¹¦ÄÜ£º²éѯ/ÉèÖÃMQTTÁ¬½Ó²ÎÊý¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTCONN{CR}»òAT+ MQTTCONN?{CR}
{CR}{LF}+ MQTTCONN:id,keepAlive,clean{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+HEARTTM= id,keepAlive,clean {CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u id£º¿Í»§¶Ëid£¬×î¶à10×Ö½Ú£¬Ä¬ÈÏλwww.usr.cn¡£
u keepAlive£ºÐÄÌø°ü£¬·¶Î§Îª60Ãë~180Ã룬ĬÈÏΪ100¡£
u clean£ºÊÇ·ñÇå³ýsession£¬0-²»Çå³ý£¬1-Çå³ý£¬Ä¬ÈÏΪ1¡£
? Àý£ºAT+WKMOD =www.usr.cn,100,1
3¡¢AT+MQTTSUB
? ¹¦ÄÜ£º²éѯ/ÉèÖö©ÔÄÖ÷Ìâ¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTSUB{CR}»òAT+ MQTTSUB?{CR}
{CR}{LF}+ MQTTSUB:num,top,qos{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+MQTTSUB= num,top,qos {CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u num£ºÖ÷ÌâºÅ£¬·¶Î§Îª1-10¡£
u top£ºÖ÷ÌâÃû£¬×î¶à20¸ö×Ö½Ú£¬Ä¬ÈÏΪ¿Õ¡£
u qos£º·þÎñµÈ¼¶£¬Ä¬ÈÏΪ0¡£
? Àý£ºAT+MQTTSUB =1,usr,0
×¢£º×î¶àÖ§³Ö¶©ÔÄ10¸öÖ÷Ìâ
4¡¢AT+MQTTUNSUB
? ¹¦ÄÜ£ºÈ¡Ïû¶©ÔÄÖ÷Ìâ¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTUNSUB{CR}»òAT+ MQTTUNSUB?{CR}
{CR}{LF}+ MQTTUNSUB:num{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+MQTTUNSUB= num {CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u num£ºÖ÷ÌâºÅ£¬·¶Î§Îª1-10¡£
? Àý£ºAT+MQTTSUB =1
5¡¢AT+MQTTU
? ¹¦ÄÜ£º²éѯ/ÉèÖÃÓû§ÃûºÍÃÜÂë¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTU{CR}»òAT+ MQTTU?{CR}
{CR}{LF}+ MQTTU:user,psw{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+MQTTU=user,psw {CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u user£ºÓû§Ãû£¬×î¶à20¸ö×Ö½Ú£¬Ä¬ÈÏΪ¿Õ¡£
u psw£ºÃÜÂ룬×î¶à20¸ö×Ö½Ú£¬Ä¬ÈÏΪ¿Õ¡£
? Àý£ºAT+MQTTSUB =zhang,123456
6¡¢AT+MQTTWILL
? ¹¦ÄÜ£º²éѯ/ÉèÖÃÒÅÖöÏûÏ¢¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTUWILL{CR}»òAT+MQTTUWILL?{CR}
{CR}{LF}+ MQTTWILL:will_topicName,will_topicMsg,will_qos,will_retain{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+MQTTUWILL= will_topicName,will_topicMsg,will_qos,will_retain {CR}
{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u will_topicName£ºÒÅÖöÖ÷ÌâÃû£¬×î¶à20¸ö×Ö½Ú¡£
u will_topicMsg£ºÒÅÖöÖ÷ÌâÏûÏ¢£¬×î¶à127¸ö×Ö½Ú¡£
u will_qos£ºÒÅÖöÏûÏ¢·þÎñµÈ¼¶£¬Ö»ÄÜΪ0¡¢1¡¢2¡£
u will_retain£ºÒÅÖö±£Áô±êÖ¾£¬Ö»ÄÜΪ0¡¢1¡£
? Àý£ºAT+MQTTWILL=usr.net,netoff,2,1
7¡¢AT+MQTTWILLEN
? ¹¦ÄÜ£º²éѯ/ÉèÖÃÒÅÖöÏûϢʹÄÜ¡£
? ¸ñʽ£º
u ²éѯµ±Ç°²ÎÊýÖµ£º
AT+MQTTUWILLEN{CR}»òAT+MQTTUWILLEN?{CR}
{CR}{LF}+ MQTTWILLEN:state{CR}{LF}{CR}{LF}
u ÉèÖãº
AT+MQTTWILLEN=state {CR}{CR}{LF}OK{CR}{LF}
? ²ÎÊý£º
u state£ºÊ¹ÄÜ״̬¡£
ON£º¿ªÆô¡£
OFF£º¹Ø±Õ¡£
? Àý£ºAT+MQTTWILLEN=ON
¶þ¡¢ ·¢²¼Ö÷Ìâ
Ö÷Ìâ·¢²¼·½Ê½£ºÔÚ͸´«Ä£Ê½Ï£¬·¢ËÍÌض¨¸ñʽµÄÊý¾Ý£¬Êý¾Ý¸ñʽÈçÏÂ
Ö÷ÌâÃû(×î¶à20×Ö½Ú) |
,(Ó¢Îĸñʽ) |
·þÎñµÈ¼¶ |
,(Ó¢Îĸñʽ) |
Êý¾Ý |
ʾÀýzhang,2,usr,cn
Èý¡¢ È¡Ïû¶©ÔÄÖ÷Ìâ
È¡Ïû¶©ÔÄÖ÷Ì⣬ÎÒÃÇ·ÖΪָÁîÈ¡ÏûºÍÔÚÏßÈ¡Ïû£¬Ö¸ÁîÈ¡Ïû¾ÍÊÇͨ¹ýATÖ¸ÁîAT+MQTTUNSUBÈ¡ÏûÖ÷Ì⣬ÔÚÏßÈ¡ÏûΪÔÚ͸´«Ä£Ê½Ï·¢ËÍÌض¨¸ñʽÊý¾ÝÈ¡ÏûÖ÷Ì⣬ÔÚÏßÈ¡Ïû²»»á±£´æµ½flashÀïÃ棬ÖØÆôÄ£¿é»òÕßµôÏßÖØÁ¬ºó»á¶ªÊ§¡£
ÔÚÏßÈ¡Ïû¶©ÔĸñʽΪ£º
unsubscribe (¹Ì¶¨) |
,(Ó¢Îĸñʽ) |
Ö÷Ìâ |
ʾÀý£ºunsubscribe,zhang1
ËÄ¡¢ ÅäÖùý³Ì
780ÒÀ´Î·¢Ë͵ÄÖ¸ÁîÈçÏÂͼËùʾ
AT+WKMOD=MQTT //mqttģʽ
AT+MQTTCONN=112233,120,1 //ÉèÖÃid£¬ÐÄÌø°üʱ¼ä£¬Çå³ýsession
AT+MQTTSUB=1,PUB1,0 //¶©ÔÄÖ÷ÌâÐòºÅ£¬Ãû³ÆÒÔ¼°ÖÊÁ¿µÈ¼¶
AT+SOCKA=TCP,39.105.117.9,1883 //mqtt·þÎñÆ÷¶Ë¿ÚºÍµØÖ·
AT+MQTTU=usr,www.usr.cn //mqtt·þÎñÆ÷µÇ¼Óû§ÃûºÍÃÜÂë
AT+Z //ÖØÆô
ʹÓÃmqttfxÈí¼þͬÑùµÇ¼ÏàͬipºÍ¶Ë¿ÚµÄmqtt·þÎñÆ÷¡£
µÇ¼֮ºó·¢²¼ÏûÏ¢
´Ëʱ¿ÉÒÔ¿´µ½780ÒѾ½ÓÊÕÐÅÏ¢
ͨ¹ý780·¢²¼ÏûÏ¢
´Ëʱ¿ÉÒÔ¿´µ½mqttfx½ÓÊÕµ½ÁËÏûÏ¢
¸½£º
´®¿ÚÈí¼þÏÂÔصØÖ·£º/Download/964.html