{"id":15709,"date":"2018-01-20T23:15:54","date_gmt":"2018-01-21T07:15:54","guid":{"rendered":"http:\/\/m2msupport.net\/m2msupport\/?page_id=15709"},"modified":"2018-01-21T00:41:22","modified_gmt":"2018-01-21T08:41:22","slug":"ussd-how-to-send-ussd-short-codes-with-at-command","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/ussd-how-to-send-ussd-short-codes-with-at-command\/","title":{"rendered":"USSD &#8211; How to send USSD short codes with AT command?"},"content":{"rendered":"<p>Unstructured Supplementary Service Data (USSD) is service offered by network providers to get information about subscriber account, mobile-money services, menu-based information services etc. Subscriber sends a short code(ex. #225#, *43#)\u00a0 from the device to request for specific service on the network. As an example, in T-Mobile network in U.S, you can send #225# from your phone to check account balance and last payment. The short codes different in each network.<\/p>\n<p>AT+CUSD command is used to send USSD codes to network. The short code and encoding format are passed as command parameters. Network response is usually received within few seconds.<\/p>\n<p>AT Command Tester tool provides an east interface to test USSD messages. User can enter the USSD code and look at the AT command request and response on the command window. The network response is parsed and displayed as well.<\/p>\n<p><a href=\"http:\/\/m2msupport.net\/m2msupport\/download-at-command-tester\/\"><img decoding=\"async\" src=\"http:\/\/www.m2msupport.net\/m2msupport\/wp-content\/themes\/admired\/images\/ussd.PNG\" alt=\"\" width=\"95%\" height=\"95%\" \/><\/a><\/p>\n<p>Try this script included in <a href=\"http:\/\/m2msupport.net\/m2msupport\/download-at-command-tester\/\\&quot; data-mce-href=\">AT Command Tester Tool.<\/a><\/p>\n<div style=\"background-color: white; border: 1px solid black; border-radius: 10px;\">\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Script-send_ussd.at<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Send USSD<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/List of supported responses<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=?<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Status of result code presentation<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/ 0 &#8211; result code presentation is disabled, 1- result code presentation is enabled ,<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD?<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Disable USSD result code presentation<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Enable USSD result code presentation<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Cancel session<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=2<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Set the character set to GSM<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CSCS=&#8221;GSM&#8221;<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=1<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Send short code<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/Check the list of short code supported by your network<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/15 is encoding scheme as per GSM 3.38<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/If you send supported short code, you should see response from network<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/for example, below short on T-Mobile (US) should provide response account balance on prepaid accounts<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1,&#8221;#999#&#8221;,15<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/WAIT for 1 sec<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">WAIT=5<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: #159600;\">\/\/If you send unsupport code, you will see cancel reponse session +CUSD :2<\/span><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><span style=\"font-size: 12.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1,&#8221;unsupported code&#8221;,15<\/span><\/p>\n<\/div>\n<p>Response to above output script in <a href=\"http:\/\/m2msupport.net\/m2msupport\/download-at-command-tester\/\\&quot; data-mce-href=\">AT Command Tester Tool.<\/a><\/p>\n<div style=\"background-color: #ffffcc; border: 1px solid black; border-radius: 10px;\">\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=?<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">+CUSD: (0-2)<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD?<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">+CUSD: 1<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=2<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CSCS=&#8221;GSM&#8221;<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1,&#8221;#999#&#8221;,15<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">+CUSD: 0, &#8220;Your T-Mobile Prepaid account balance is 1.00 USD. To add more minutes, dial *233 or redeem a refill card.&#8221;, 15<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">AT+CUSD=1,&#8221;unsupported code&#8221;,15<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">OK<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">\u00a0<\/span><\/em><\/p>\n<p style=\"margin-bottom: .0001pt; line-height: normal; text-autospace: none;\"><em><span style=\"font-size: 10.0pt; font-family: Dialog; color: blue;\">+CUSD: 2<\/span><\/em><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Unstructured Supplementary Service Data (USSD) is service offered by network providers to get information about subscriber account, mobile-money services, menu-based information services etc. Subscriber sends a short code(ex. #225#, *43#)\u00a0 from the device to request for specific service on the &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/ussd-how-to-send-ussd-short-codes-with-at-command\/\">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":"software_howto.php","meta":{"footnotes":""},"class_list":["post-15709","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/15709","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=15709"}],"version-history":[{"count":6,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/15709\/revisions"}],"predecessor-version":[{"id":15718,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/15709\/revisions\/15718"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=15709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}