at commands examples application note(wls-cs-11003)

Download At Commands Examples Application Note(WLS-CS-11003)

Post on 30-Sep-2014

688 views

Category:

Documents

2 download

Embed Size (px)

TRANSCRIPT

Examples for u-blox wireless modulesApplication Note

AbstractThis document provides detailed examples of how to use AT commands with u-blox wireless modules.

www.u-blox.com

locate, communicate, accelerate

AT Commands Examples

AT Commands Examples - Application Note

Document Information Title Subtitle Document type Document number Document status AT Commands Examples Examples for u-blox wireless modules Application Note WLS-CS-11003 Preliminary

Document status information Objective This document contains target values. Revised and supplementary data will be published Specification later. Advance This document contains data based on early testing. Revised and supplementary data will Information be published later. This document contains data from product verification. Revised and supplementary data Preliminary may be published later. Released This document contains the final product specification.

This document and the use of any information contained therein, is subject to the acceptance of the u-blox terms and conditions. They can be downloaded from www.u-blox.com. u-blox makes no warranties based on the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. u-blox reserves all rights to this document and the information contained herein. Reproduction, use or disclosure to third parties without express permission is strictly prohibited. Copyright 2011, u-blox AG.

WLS-CS-11003

Page 2 of 51

AT Commands Examples - Application Note

ContentsContents.............................................................................................................................. 3 1 2 3 Introduction .................................................................................................................. 6 Storing parameters ...................................................................................................... 6 Network registration and configuration .................................................................... 73.1 Steps performed to register the module to a GSM/UMTS network ........................................................ 7 Preliminary operations ................................................................................................................... 7 Network registration: GSM module ............................................................................................... 8 Network registration: UMTS module ............................................................................................. 8 3.1.1 3.1.2 3.1.3

4

GPRS connection......................................................................................................... 124.1 4.2 Context Activation .............................................................................................................................. 12 Context Deactivation .......................................................................................................................... 13 Context Deactivation by the network .......................................................................................... 13 Context Deactivation by the module ........................................................................................... 13

4.2.1 4.2.1

5

TCP/IP AT commands.................................................................................................. 135.1 5.2 5.3 Socket Connect .................................................................................................................................. 13 Socket Listening.................................................................................................................................. 14 Socket Write ....................................................................................................................................... 14 Binary mode ................................................................................................................................ 14 Base syntax.................................................................................................................................. 15 Queue FULL ................................................................................................................................. 15 GSM network coverage lost ........................................................................................................ 16

5.3.1 5.3.2 5.3.3 5.3.4 5.4 5.5 5.6 5.7 5.8

Socket operations with Keep Alive option ....................................................................................... 18 Socket Read........................................................................................................................................ 19 Socket State ....................................................................................................................................... 21 Socket Close ....................................................................................................................................... 21 Direct Link .......................................................................................................................................... 22 Enter and exit from Direct Link Mode .......................................................................................... 22 Closing a connection ................................................................................................................... 23 Connection closed by remote host .............................................................................................. 23

5.8.1 5.8.2 5.8.3

6

UDP/IP AT commands................................................................................................. 236.1 6.2 6.3 6.4 Socket Write (+USOST) ....................................................................................................................... 23 Socket Read (+USORF) ........................................................................................................................ 24 Socket Write (+USOWR) ..................................................................................................................... 25 Socket Read (+USORD) ....................................................................................................................... 26

7

FTP AT commands ...................................................................................................... 27

WLS-CS-11003

Preliminary

Page 3 of 51

AT Commands Examples - Application Note

7.1 Direct Link .......................................................................................................................................... 28 7.1.1 Retrieve a file from FTP server ...................................................................................................... 28 7.1.2 7.1.3 7.1.4 Aborting retrieve file request ....................................................................................................... 29 Store a file on FTP server ............................................................................................................. 29 About +++ escape sequence usage ......................................................................................... 30

8 9

SMTP AT commands ................................................................................................... 30 HTTP AT commands.................................................................................................... 32

10 Network Congestion Detection AT commands ........................................................ 3310.1 GSM module................................................................................................................................... 33

11 ADC AT commands (if supported) ............................................................................. 33 12 GPIO AT commands .................................................................................................... 33 13 MUX AT commands .................................................................................................... 34 14 File System AT commands ......................................................................................... 34 15 SIM Toolkit.................................................................................................................. 3615.1 15.2 Profile download ............................................................................................................................. 36 Proactive SIM .................................................................................................................................. 36

15.3 Example .......................................................................................................................................... 38 15.3.1 Enable the SAT and terminal response ......................................................................................... 38 15.3.2 15.3.3 15.3.4 Changing the terminal profile ...................................................................................................... 38 Entering SAT menu and selecting an item ................................................................................... 39 Call setup .................................................................................................................................... 40

16 SMS AT Commands .................................................................................................... 4216.1 16.2 16.3 16.4 16.5 Read all messages or one single message ..........................................................................