{"id":145290,"date":"2020-06-18T07:44:27","date_gmt":"2020-06-18T14:44:27","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=145290"},"modified":"2020-06-21T08:14:59","modified_gmt":"2020-06-21T15:14:59","slug":"atcaopen-open-tcp-or-udp-connection-in-simcom-sim70xx-modules","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/atcaopen-open-tcp-or-udp-connection-in-simcom-sim70xx-modules\/","title":{"rendered":"AT+CAOPEN &#8211; Open TCP or UDP connection in Simcom SIM70XX  modules"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2020\/06\/at_caopen-1.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+caopen\n\/\/AT+CAOPEN command is used to open tcp\/udp connection in Simcom SIM70XX modules\n\/\/Check SIMCOM Module AT Command documentaiton\n\n\/\/Get the support for the commands\nAT+CAOPEN=?\n\n\/\/Wait\nWAIT=1\n\n\/\/Get the current TCP configuration\nAT+CAOPEN?\n\n\/\/Wait\nWAIT=1\n\n\/\/Activate the network\nAT+CNACT=0,1\n\n\/\/Wait\nWAIT=10\n\n\/\/Open TCP connection\n\/\/CID, PDP Index, connection type, server address, port\nAT+CAOPEN=0,0,\"TCP\",\"postman-echo.com\",80\n\n\/\/Wait\nWAIT=5\n\n\/\/Close the connection\nAT+CACLOSE=0\n\n\/\/Wait\nWAIT=5\n\n\/\/Open UDP connection\n\/\/CID, PDP Index, connection type, server address, port\nAT+CAOPEN=0,0,\"UDP\",\"postman-echo.com\",80\n\n\/\/Wait\nWAIT=5\n\n\/\/Close the connection\nAT+CACLOSE=0\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<p><\/p>\n<pre style=\"color: blue; background-color: #ffffcc; border: 1px solid black;\">AT+CAOPEN=?\n\n+CAOPEN: (0-12),(0-4),(\"TCP\",\"UDP\"),64,(1-65535)\n\nOK\nAT+CAOPEN?\n\nOK\nAT+CNACT=0,1\n\nERROR\nAT+CAOPEN=0,0,\"TCP\",\"postman-echo.com\",80\n\n+CAOPEN: 0,0\n\nOK\nAT+CACLOSE=0\n\nTCP connection is closed by remote server\n\nOK\nAT+CAOPEN=0,0,\"UDP\",\"postman-echo.com\",80\n\n+CAOPEN: 0,0\n\nOK\nAT+CACLOSE=0\n\nTCP connection is closed by remote server\n\nOK\n\n\n\n<\/pre>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/34cDFnSAGJo\" 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+caopen \/\/AT+CAOPEN command is used to open tcp\/udp connection in Simcom SIM70XX modules \/\/Check SIMCOM Module AT Command documentaiton \/\/Get the support for the commands AT+CAOPEN=? \/\/Wait WAIT=1 \/\/Get &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/atcaopen-open-tcp-or-udp-connection-in-simcom-sim70xx-modules\/\">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-145290","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/145290","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=145290"}],"version-history":[{"count":5,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/145290\/revisions"}],"predecessor-version":[{"id":145489,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/145290\/revisions\/145489"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=145290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}