{"id":136971,"date":"2020-05-16T07:57:46","date_gmt":"2020-05-16T14:57:46","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=136971"},"modified":"2020-05-16T07:57:50","modified_gmt":"2020-05-16T14:57:50","slug":"atsmunsub-unsubscribe-from-a-topic-with-the-mqtt-server","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/atsmunsub-unsubscribe-from-a-topic-with-the-mqtt-server\/","title":{"rendered":"AT+SMUNSUB -UnSubscribe from a topic with the MQTT server"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2020\/05\/at_smsub.png\" alt=\"\" class=\"wp-image-32155\"\/><\/figure>\n\n\n<p>Try the below script in the <a href=\"https:\/\/m2msupport.net\/m2msupport\/download-at-command-tester-for-simcom-modules\/\">AT Command Tester tool<\/a>\n<\/p>\n<pre style=\"color: blue; background-color: white; border: 1px solid black;\">\/\/Script: at+smunsub\n\/\/The AT commands in this script are applicable for Simcom modules only\n\/\/Check SIMCOM Module AT Command documentaiton\n\n\/\/Get the support for AT+SMPUB command\nAT+SMUNSUB=?\n\n\/\/Activate the application network\nAT+CNACT=0,1\n\n\/\/Wait\nWAIT=1\n\n\/\/Set up the MQTT URL\nAT+SMCONF=\"URL\",\"test.mosquitto.org\",\"1883\"\n\n\/\/Wait\nWAIT=1\n\n\/\/Set up the MQTT time to connect server\nAT+SMCONF=\"KEEPTIME\",60\n\n\/\/Wait\nWAIT=1\n\n\/\/Connect to the MQTT server\nAT+SMCONN\n\n\/\/Wait\nWAIT=4\n\n\/\/Subcribe to a topic on the MQTT server\nAT+SMSUB=\"my_topic\",1\n\/\/Wait\nWAIT=1\n\n\n\/\/Activate the application network\nAT+SMUNSUB=\"my_topic\"\n\n\n\n<\/pre>\n<p>Output of the above script in the <a href=\"https:\/\/m2msupport.net\/m2msupport\/download-at-command-tester-for-simcom-modules\/\">AT Command Tester tool<\/a><\/p>\n<pre style=\"color: blue; background-color: #ffffcc; border: 1px solid black;\">AT+SMUNSUB=?\n\n+SMUNSUB: 128\n\nOK\nAT+CNACT=0,1\n\nOK\n\n+APP PDP: 0,ACTIVE\nAT+SMCONF=\"URL\",\"test.mosquitto.org\",\"1883\"\n\nOK\nAT+SMCONF=\"KEEPTIME\",60\n\nOK\nAT+SMCONN\n\nOK\nAT+SMSUB=\"my_topic\",1\n\nOK\nAT+SMUNSUB=\"my_topic\"\n\nOK\n\n\n\n<\/pre>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/9kd__WCYD1k\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>Try the below script in the AT Command Tester tool \/\/Script: at+smunsub \/\/The AT commands in this script are applicable for Simcom modules only \/\/Check SIMCOM Module AT Command documentaiton \/\/Get the support for AT+SMPUB command AT+SMUNSUB=? \/\/Activate the application &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/atsmunsub-unsubscribe-from-a-topic-with-the-mqtt-server\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"atcommands.php","meta":{"footnotes":""},"class_list":["post-136971","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/136971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=136971"}],"version-history":[{"count":1,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/136971\/revisions"}],"predecessor-version":[{"id":136972,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/136971\/revisions\/136972"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=136971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}