Transcription of AT Commands Examples - U-blox
1 AT Commands Examples Examples for U-blox cellular modules Application Note Abstract This document provides detailed Examples of how to use AT Commands with U-blox cellular modules. UBX-13001820 - R13. AT Commands Examples - Application Note Document Information Title AT Commands Examples Subtitle Examples for U-blox cellular modules Document type Application Note Document number UBX-13001820. Revision and date R13 27-May-2019. Disclosure Restriction This document applies to the following products: Product name LEON-G1 series SARA-G3 series SARA-G4 series LISA-U2 series SARA-U2 series TOBY-R2 series LARA-R2 series TOBY-L2 series MPCI-L2 series U-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document. Copying, reproduction, modification or disclosure to third parties of this document or any part thereof is only permitted with the express written permission of U-blox . The information contained herein is provided as is and U-blox assumes no liability for its use.
2 No warranty, either express or implied, is given, including but not limited to, with respect to the accuracy, correctness, reliability and fitness for a particular purpose of the information. This document may be revised by U-blox at any time without notice. For the most recent documents, visit Copyright U-blox AG. UBX-13001820 - R13 Page 2 of 153. AT Commands Examples - Application Note Contents Document Information .. 2. Contents .. 3. 1 Introduction .. 8. 2 AT command response parser .. 9. Handle AT command response .. 9. Handle unsolicited result code .. 10. Best practices .. 11. 3 Parameters storing .. 12. 4 Network registration and configuration .. 13. Steps for registering the module with a cellular 13. Preliminary 13. Network registration: GSM module .. 14. Network registration: UMTS module .. 15. Network registration: LTE module .. 19. Network operator configuration through +UMNOCONF AT command ..21. PLMN list extension +UMNOPLMN: LTE module.
3 23. Forbidden PLMN list management .. 23. Preferred PLMN list selection .. 24. Network registration flow-chart .. 26. Recommendations on registration failure 28. Simultaneous support of data and voice services .. 29. Configurations for optimized power consumption .. 29. 5 PS data connection .. 32. External PDP context handling .. 32. External PDP context definition and activation .. 32. Secondary PDP context definition and activation in ROUTER mode .. 37. Internal PDP context activation ..38. PDP contexts activation on Verizon Mobile Network Operator .. 39. Context deactivation .. 41. Context deactivation by the network .. 41. Context deactivation by the module .. 41. Using sockets on an already activated PDP context .. 41. PDP context activation by means of +UPSDA, impact of <PDP_type> on 44. Management of counters of sent and received PSD 45. DoCoMo PS PUSH context manual activation .. 46. DoCoMo PS PUSH context manual reject .. 47. Data connection management.
4 47. Network policy: no IP connectivity on the default bearer ..48. Network policy: only one bearer for each APN can be activated .. 49. Network policy: more than one bearer with the same APN can be activated ..50. Network connectivity in ROUTER mode .. 52. 2G/3G case .. 52. UBX-13001820 - R13 Page 3 of 153. AT Commands Examples - Application Note 4G case .. 52. Set up the connection on Windows 7 ..53. Network connectivity (BRIDGE mode) .. 56. 2G/3G case .. 56. 4G case .. 56. Set up the connection on Windows 7 .. 56. Dial-up .. 63. Generic dial-up .. 63. AT+UUSBCONF? .. 63. Local dial-up .. 64. Data context active after boot .. 64. TOBY-L2 pseudo code .. 64. 6 IP Multimedia Subsystem (IMS) .. 65. How to set IMS 65. How to disable/enable IMS client .. 65. IMS client registration .. 66. VoLTE call .. 66. 7 Speech calls .. 69. Voice call monitoring .. 69. Quality of the radio link .. 69. Status of the 69. Conference calls .. 70. 8 Audio interface and parameters.
5 72. 9 Dynamic DNS AT command ..74. 10 TCP/IP AT Commands .. 75. Socket connect .. 75. Socket listening .. 75. Socket write .. 76. Binary mode .. 76. Base syntax .. 76. Queue FULL .. 77. GSM network coverage lost .. 77. Socket operations with "Keep Alive" 79. Socket read .. 79. Socket state .. 81. Socket close .. 82. Direct link .. 82. Enter and exit from Direct link mode .. 82. Closing a connection ..83. Connection closed by remote Socket Always On ..84. Client configuration ..84. Client operation ..84. Server configuration ..84. UBX-13001820 - R13 Page 4 of 153. AT Commands Examples - Application Note Server IP Change Verizon socket AT&T socket 87. 11 UDP/IP AT Commands .. 88. Socket write (+USOST) ..88. Socket read (+USORF) ..88. Socket write (+USOWR) ..89. Socket read (+USORD) ..90. 12 FTP AT Commands .. 91. Direct link .. 92. Retrieve a file from FTP server .. 92. Aborting retrieve file request .. 93. Store a file on FTP server .. 93. About "+++" escape sequence usage.
6 94. Using secure option .. 95. 13 SMTP AT Commands .. 96. 14 ODIS implementation .. 97. OMA-DM client initialization .. 97. ODIS nodes ..98. Module FW update notification .. 99. OMA-DM client activity reporting .. 100. 15 HTTP AT Commands .. 101. Using secure option .. 102. Importing a certificate .. 102. Examples about certificate validation levels .. 106. Data security and integrity .. 109. HTTP POST .. 110. HTTP cookies .. 111. 16 Network jamming detection AT Commands ..112. Jamming detection threshold and number of carriers evaluation .. 112. example 1: 2G threshold and number of carriers evaluation .. 113. Jamming detection in 2G network .. 113. example 1: all the available 2G carriers jammed .. 113. Jamming detection in 3G network .. 114. example 1: all the available 3G carriers jammed .. 114. Jamming detection in 2G/3G network .. 114. example 1: all the available 2G and 3G carriers jammed .. 114. Advanced jamming detection in 2G network.
7 115. Case 1: all the available 2G carriers 115. Case 2: all the available 2G carriers jammed; selected PLMN not retrieved from IMSI .. 115. Case 3: not jammed 2G carrier(s) are not part of the selected PLMN .. 116. 17 Cell lock AT Commands .. 117. Cell lock in single mode .. 117. UBX-13001820 - R13 Page 5 of 153. AT Commands Examples - Application Note Cell lock in 2G network: normal mode .. 117. Cell lock in 2G network: extended 117. Cell lock in 2G network: normal mode .. 118. Cell lock in 2G network: extended 118. Cell lock in 3G network: normal mode .. 118. Cell lock in 3G network: extended 119. Cell lock in 3G network: extended + redirection mode .. 119. Cell lock in 4G network: normal mode .. 119. Cell lock in 4G network: extended 120. Cell lock in 4G network: extended + redirection mode .. 120. Cell lock in multi-mode .. 121. Cell lock in dual-mode: normal mode .. 121. Cell lock in dual-mode: extended mode .. 121. Cell lock in dual-mode: extended + redirection mode.
8 121. Cell lock in tri-mode: normal mode .. 122. Cell lock in tri-mode: extended mode .. 122. Cell lock in tri-mode: extended + redirection 123. 18 ADC AT Commands .. 124. 19 GPIO AT Commands .. 125. 20 Multiplexer AT Commands .. 127. 21 File system AT Commands .. 128. 22 SIM toolkit .. 129. Profile download .. 129. Proactive SIM .. 130. example .. 131. Enable the SAT and terminal response .. 131. Changing the terminal profile .. 131. Entering SAT menu and selecting an 132. Call setup .. 132. SIM Refresh proactive command handling .. 134. UICC reset .. 135. Envelope: idle screen available .. 135. IMSI swap .. 136. 23 SMS AT Commands ..138. Read all messages or one single 138. Read Messages on-the-fly .. 138. Delete one single message or multiple messages .. 139. Write and/or send one single message .. 139. Read all messages or one single message (concatenated SMS related Commands ) .. 140. Write and/or send a concatenated SMS message .. 141. Message Acknowledgement.
9 142. 24 SIM lock AT command .. 144. SIM lock activation and deactivation .. 144. SIM lock enabling and activation .. 144. UBX-13001820 - R13 Page 6 of 153. AT Commands Examples - Application Note 25 SIM Access Profile (SAP) AT Commands .. 145. SAP activation .. 145. SAP deactivation .. 146. 26 USB profile configuration .. 147. High throughput profile .. 147. Fairly back-compatible profile .. 147. Low/Medium throughput profile .. 148. Appendix .. 149. A Glossary .. 149. Related documents .. 151. Revision history .. 152. Contact .. 153. UBX-13001820 - R13 Page 7 of 153. AT Commands Examples - Application Note 1 Introduction This document provides Examples of using AT Commands . See U-blox AT Commands Manual [1] for the AT command descriptions. The following symbols are used to highlight important information within the document: An index finger points out key information pertaining to integration and performance. A warning symbol indicates actions that could negatively impact or damage the module.
10 These icons will be used to indicate applicability to the related products: LEON-G1. : LEON-G1 series LISA-U2. : LISA-U2 series SARA-G3. : SARA-G3 series SARA-G4. : SARA-G4 series SARA-U2. : SARA-U2 series TOBY-L2. : TOBY-L2 series TOBY-R2. : TOBY-R2 series LARA-R2. : LARA-R2 series If the subsection applies to a specific product, the related icon will be provided there. The MPCI-L2 series provides the same feature set as the TOBY-L2 series. Therefore the "TOBY-L2" icon also refers to MPCI-L2 series. The correctness of the networking Examples depends on the availability of the website and FTP. site. Be sure to use a valid website (or FTP site). UBX-13001820 - R13 Contents Page 8 of 153. AT Commands Examples - Application Note 2 AT command response parser LEON-G1 LISA-U2 SARA-G3 SARA-G4 SARA-U2 TOBY-L2 TOBY-R2 LARA-R2. The scope of this section is to give some hints about how to develop a proper AT parser and how to handle the AT command replies and the URCs.