AT Commands Examples Examples for U-Blox Cellular Modules Application Note
Total Page:16
File Type:pdf, Size:1020Kb
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. www.u-blox.com 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. 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 www.u-blox.com. 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 2.1 Handle AT command response ................................................................................................................ 9 2.2 Handle unsolicited result code ............................................................................................................... 10 2.3 Best practices ............................................................................................................................................. 11 3 Parameters storing ............................................................................................................................. 12 4 Network registration and configuration ...................................................................................... 13 4.1 Steps for registering the module with a cellular network ................................................................. 13 4.1.1 Preliminary operations ..................................................................................................................... 13 4.1.2 Network registration: GSM module .............................................................................................. 14 4.1.3 Network registration: UMTS module ............................................................................................ 15 4.1.4 Network registration: LTE module ................................................................................................ 19 4.1.5 Network operator configuration through +UMNOCONF AT command ................................. 21 4.1.6 PLMN list extension +UMNOPLMN: LTE module ...................................................................... 23 4.1.7 Forbidden PLMN list management ............................................................................................... 23 4.1.8 Preferred PLMN list selection ........................................................................................................ 24 4.2 Network registration flow-chart ............................................................................................................ 26 4.2.1 Recommendations on registration failure handling .................................................................. 28 4.3 Simultaneous support of data and voice services ............................................................................. 29 4.4 Configurations for optimized power consumption ............................................................................ 29 5 PS data connection ............................................................................................................................ 32 5.1 External PDP context handling .............................................................................................................. 32 5.1.1 External PDP context definition and activation ......................................................................... 32 5.2 Secondary PDP context definition and activation in ROUTER mode ............................................. 37 5.3 Internal PDP context activation ............................................................................................................. 38 5.3.1 PDP contexts activation on Verizon Mobile Network Operator .............................................. 39 5.4 Context deactivation ................................................................................................................................ 41 5.4.1 Context deactivation by the network ........................................................................................... 41 5.4.2 Context deactivation by the module ............................................................................................. 41 5.5 Using sockets on an already activated PDP context ......................................................................... 41 5.5.1 PDP context activation by means of +UPSDA, impact of <PDP_type> on address ............ 44 5.6 Management of counters of sent and received PSD data ................................................................ 45 5.7 DoCoMo PS PUSH context manual activation .................................................................................... 46 5.8 DoCoMo PS PUSH context manual reject ............................................................................................ 47 5.9 Data connection management .............................................................................................................. 47 5.9.1 Network policy: no IP connectivity on the default bearer ......................................................... 48 5.9.2 Network policy: only one bearer for each APN can be activated ............................................. 49 5.9.3 Network policy: more than one bearer with the same APN can be activated ......................50 5.10 Network connectivity in ROUTER mode ............................................................................................... 52 5.10.1 2G/3G case ......................................................................................................................................... 52 UBX-13001820 - R13 Page 3 of 153 AT Commands Examples - Application Note 5.10.2 4G case ................................................................................................................................................ 52 5.10.3 Set up the connection on Windows 7 ........................................................................................... 53 5.11 Network connectivity (BRIDGE mode) .................................................................................................. 56 5.11.1 2G/3G case ......................................................................................................................................... 56 5.11.2 4G case ................................................................................................................................................ 56 5.11.3 Set up the connection on Windows 7 ........................................................................................... 56 5.12 Dial-up ......................................................................................................................................................... 63 5.12.1 Generic dial-up ................................................................................................................................... 63 AT+UUSBCONF? ........................................................................................................................................... 63 5.12.2 Local dial-up ....................................................................................................................................... 64 5.13 Data context active after boot ............................................................................................................... 64 5.13.1 TOBY-L2 pseudo code ..................................................................................................................... 64 6 IP Multimedia Subsystem (IMS) .................................................................................................... 65 6.1 How to set IMS APN .................................................................................................................................. 65 6.2 How to disable/enable IMS client ........................................................................................................... 65 6.3 IMS client registration