piAccess Link AT Command Set
Standard AT command set supported by piAccess Link
- AT+CMGR Read Message
- AT+CMGD Delete Message
- AT+CMGL List Messages
- AT+CMGS Send Message
- AT+CNMI New Message Indication
- AT+CPMS Preferred Message Storage
- AT+CMGF Preferred Message Format
- AT+CPBR Phonebook Read
- AT+CPBS Select Phonebook Storage
- AT+CGSN Return IMEI
- AT+CIMI Return IMSI
- AT+CSQ Signal Quality
- AT+CBC Battery Charge
Custom AT commands supported by piAccess Link
- AT+SMGR Read Message With Phonebook Integration
- AT+SMGL List Messages With Phonebook Integration
- AT+SPBR Multi-number Phonebook Read
Standard AT commands soon to be supported by piAccess Link
Identification AT commands supported by piAccess Link
AT commands with mock support by piAccess Link
Standard AT command set supported by piAccess Link
AT+CMGR Read Message
Description: Returns messages with location value <index> from phone memory message storage (ME). If the status of the message is "REC UNREAD" (0), the status in the storage changes to "REC READ" (1). If reading fails, <CR><LF>+CMS ERROR 500<CR><LF> is returned and if <index> is out of bounds <CR><LF>+CMS ERROR 321<CR><LF> is returned.
Execution command: AT+CMGR=<index>
Command response: +CMGR: <stat>,<oa>,<scts>,<length>,<CR><LF><data>
PDU-mode example:
AT+CMGR=15<CR> +CMGR: 15,1,,78<CR><LF> <pdu_data><CR><LF> <CR><LF>OK<CR><LF>
AT+CMGD Delete Message
Description: Deletes message from the phone memory message storage at location <index>. If deletion fails, <CR><LF>+CMS ERROR 500<CR><LF> is returned and if <index> is out of bounds <CR><LF>+CMS ERROR 321<CR><LF> is returned.
Execution command: AT+CMGD=<index>
Example:
AT+CMGD=6<CR> <CR><LF>OK<CR><LF>
AT+CMGL List Messages
Description: Lists messages with status value <stat> from the phone memory message storage (ME).
Execution command: AT+CMGL=<stat>
Command response: +CMGL: <index>,<stat>,<da/oa>,<scts>,<length>,<CR><LF><data>
PDU-mode example:
AT+CMGL=4 <CR><LF>+CMGL: 1,1,,40<CR><LF> <pdu data> <CR><LF>+CMGL: 2,1,,48<CR><LF> <pdu data> <CR><LF>+CMGL: 3,2,,78<CR><LF> <pdu data> <CR><LF>+CMGL: 4,2,,78<CR><LF> <pdu data> <CR><LF>+CMGL: 5,0,,78<CR><LF> <pdu data> <CR><LF>+CMGL: 6,3,,78<CR><LF> <pdu data> <CR><LF> <CR><LF>OK<CR><LF>
AT+CMGS Send Message
Description: Sends message from a terminal equipment to the network. To send the message <ctr-Z> (ASCII 26) must be given. <mr> is returned after successful message delivery. If sending fails in the network or if there is an phone error, <CR><LF>+CMS ERROR 500<CR><LF> is returned. If the PDU message is corrupted or invalid <CR><LF>+CMS ERROR 304<CR><LF> is returned.
Execution command: AT+CMGS=<da><CR><pdu><ctrl-z/ESC>
Command response: +CMGS: <mr>
Example:
AT+CMGS=29<CR> 0011000C914477214365870000FF07C8721E847E8700<ctr-z> +CMGS: 1 <CR><LF>OK<CR><LF>
AT+CNMI New Message Indication
Description: Selects if the reception of new messages from the network is indicated to the terminal equipment when the phone is active. <mt> parameter is used to enable or disable new message indications. When set to 1 is enabled and value 0 disables it. Default is disabled.
Set command: AT+CNMI=<mode>,<mt>,<bm>,<ds>,<bfr><CR>
Important Note: Parameters <mode>,<bm>,<ds>,<bfr> are irrelevant to us and therefore will be ignored. Added in order to maintain compatibility with the standard AT+CNMI command
Example:
AT+CNMI=0,1,0,0,0 <CR><LF>OK<CR><LF>
New message unsolicited indication:
+CMTI: "ME",15<CR><LF>
Note: New message stored in phone's memory, in index 15
AT+CPMS Preferred Message Storage
Description: Selects memory storage spaces to be used for reading. If chosen storage is not valid, <CR><LF>ERROR<CR><LF> is returned. <mem> can take values "ME" for phone memory or "SM" for SIM. Note that currently only the phone memory (ME) storage is supported. "SM" is accepted for compatibility reasons but no messages will be read from SIM.
Command: AT+CPMS=<mem>
Command response: +CPMS: <preferred_used>,<preferred_total>,<used1>,<total1>,<used2>,<total2>
Example:
AT+CPMS="ME"<CR> +CPMS: 45,145,0,0,45,145 <CR><LF>OK<CR><LF>
AT+CMGF Preferred Message Format
Description: Selects message format to be used for reading. If chosen format is not valid, <CR><LF>ERROR<CR><LF> is returned. Default is PDU.
Command: AT+CMGF=<mode>
Command response: +CMGF:<mode>
Example:
AT+CMGF=1<CR> +CMGF:1 <CR><LF>OK<CR><LF>
AT+CPBR Phonebook Read
Description: Returns phone book entries in location number range <index1>...<index2> from the phone memory phonebook storage. If <index2> is omitted, only location <index1> is returned. Entry fields returned are location number <indexn>, phone number <number> in <indexn>, and last and/or first name <text> associated with the number.
Execution command: AT+CPBR=<index1>[,<index2>]
Command response: +CPBR: <index1>,<number>,<type>,<text<contact_flag>><CR><LF>
Test command: AT+CPBR=? Shows if the command is supported
Test command response: +CPBR: (list of supported <index>s),<nlength>,<tlength>
Example:
AT+CPBR=1,3 +CPBR: 1,"12345677890",129,"MARK/M" +CPBR: 2,"2107407407",129,"DEBBBY/H" +CPBR: 3,"+442089898989",145,"JOHN DOE/W" <CR><LF>OK<CR><LF>
AT+CPBS Select Phonebook Storage
Description: Selects the phonebook memory storage <storage> that is used by other phonebook commands such as CPBR. Currently only phone memory (ME) storage is supported.
Execution command: AT+CPBS=<storage>
Command response: +CPBS:(list of supported <storage>s)
Read command: AT+CPBS? Displays the current <storage> setting.
Test command: AT+CPBS=? Shows if the command is supported.
AT+CGSN Return IMEI
Description: Returns the pure 15-digit IMEI, no SV digits, but some formatting.
Example:
AT+CGSN 35454500-026854-6 <CR><LF>OK<CR><LF>
AT+CIMI Return IMSI
Description: Returns the IMSI
Example:
AT+CIMI 310380047335755 <CR><LF>OK<CR><LF>
Note: IMSI retrieval may not be supported in some phone models (eg. P800)
AT+CSQ Signal Quality
Description: Returns received signal strength indication.
Execution command: AT+CSQ
Command response: +CSQ: <rssi>,<ber>
Test command: AT+CSQ=? Shows if the command is supported.
Test command response: +CSQ: (list of supported <rssi>s),(list of supported<ber>s)
Values of <rssi>:
| 0-1 | -110dBm or less |
| 2-30 | -109dBm to -53dBm |
| 99 | Not known or not detectable |
Example:
AT+CSQ +CSQ: 30,99 <CR><LF>OK<CR><LF>
Note: <ber> is not supported and has a constant value of 99. It is included for compatibility reasons
AT+CBC Battery Charge
Description: Returns battery level.
Execution command: AT+CBC
Command response: +CBC:<bcs>,<bcl>
Test command: AT+CBC=? Shows if the command is supported.
Test command response: +CBC: (list of supported <bcs>s),(list of supported<bcl>s)
Example:
AT+CBC +CBC: 0,89 <CR><LF>OK<CR><LF>
Notes:
1. Battery level indications may not be supported in some phones (e.g. Px00, A1000)
2. <bcs> is not supported and has a constant value of 0. It is included for compatibility reasons
Custom AT commands supported by piAccess Link
AT+SMGR Read Message With Phonebook Integration
Description: Custom read command that returns messages with location value <index> from phone memory message storage (ME) and integrates phonebook information, if available, as part of the response. If reading fails, <CR><LF>+CMS ERROR 500<CR><LF> is returned and if <index> is out of bounds <CR><LF>+CMS ERROR 321<CR><LF> is returned.
Execution command: AT+SMGR=<index>
PDU-mode response: +SMGR: <oa>,<stat>,<scts>,<name>,<surname>,<email>,<length><CR><LF><data>
PDU-mode example:
AT+SMGR=59<CR> +SMGR: 59,1,,"FirstName","LastName","email@email.com",99<CR><LF> <pdu_data><CR><LF> <CR><LF>OK<CR><LF> AT+SMGR=12<CR> +SMGR: 12,3,"05/04/23,19:57:26",,"LastName",,68<CR><LF> <pdu_data><CR><LF> <CR><LF>OK<CR><LF>
Note: In PDU-mode the <scts> value is present only in messages with <stat> value 3. I.e. only for Sent items.
AT+SMGL List Messages With Phonebook Integration
Description: Custom list command that returns messages with status value <stat> from phone memory (ME) message storage and integrates phonebook information, if available, as part of the response.
Execution command: AT+SMGL=<stat>
Command response in Text-mode: +SMGL: <index>,<da/oa>,<name>,<surname>,<email>,<scts>,<length>,<CR><LF><data>
Command response in PDU-mode: +SMGL: <index>,<stat>,<scts>,<name>,<surname>,<email>,<length><CR><LF><data>
PDU-mode example:
AT+SMGL=4 +SMGL: 1,3,"05/04/23,19:57:26","Joe","Bloggs","joe@bloggs.com",40<CR><LF> <pdu data> <CR><LF>+SMGL: 2,1,,"Joey",,,48<CR><LF> <pdu data> <CR><LF>+SMGL: 3,1,,,,,55<CR><LF> <pdu data> <CR><LF>+SMGL: 4,0,,,"Smith","smith@email.com",99<CR><LF> <pdu data> <CR><LF>OK<CR><LF>
Important Notes:
1. In PDU-mode when a concatenated message is read, only the 1st fragment contains phonebook info. All other fragments of the message follow with the phonebook fields empty.
2. In PDU-mode the <scts> value is present only in messages with <stat> value 3. I.e. only for Sent items.
AT+SPBR Multi-number Phonebook Read
Description: Returns phone book entries in location number range <index1>...<index2> from the phone memory storage. If <index2> is omitted, only location <index1> is returned. Entry fields returned are location number <indexn>, number of phone numbers retrieved <pcount>, number of emails retrieved <ecount>, phone numbers <number> in <indexn>, followed by contact data info if present.
Execution command: AT+SPBR=<index1>[,<index2>]
Command response: +SPBR: <index1>,<pcount>,<ecount>,[<number>,<type>,...],[<firstname>],
[<lastname>],[<email>,...],[<address>],[<region>],[<city>],[<postcode>],[<country>]<CR><LF>
Test command: AT+SPBR=? Shows if the command is supported
Test command response: +SPBR: (list of supported <index>s),<nlength>,<tlength>
Example:
AT+SPBR=1,3 +SPBR: 1,1,0,"12345677890",129,"MARK",,,,,,, +SPBR: 2,0,2,,"JON","DOE,"jon@doe.com","jon@doe.net",,,,,USA +SPBR: 3,2,1,"+442089898989",145,"222244444",129,"Joe","Bloggs","joe@bloggs.com","10 High Street","Camden","London","N1 5FG","England" <CR><LF>OK<CR><LF>
Standard AT commands soon to be supported by piAccess Link
AT+CMGW Write Message To Memory
Description: Stores a message to phone memory message storage. The memory location <index> of the stored message is returned. If writing fails, <CR><LF>+CMS ERROR 500<CR><LF> is returned.
Execution command: AT+CMGW=<oa/da><CR><data><ctrl-z/ESC>
Command response: +CMGW: <index>
Example:
AT+CMGW=6949798989<CR>Hello there<ctr-z> +CMGW: 3 <CR><LF>OK<CR><LF>
Note: Message stored in index 3
Identification AT commands supported by piAccess Link
| Command | Reply |
| ATI | piAccess Link |
| ATI0 | piAccess Link |
| ATI1 | Software version |
| ATI2 | AT protocol version |
| ATI3 | Build number and date |
| AT+CGMM | piAccess Link |
| AT+GMM | piAccess Link |
| AT+CGMI | Pragmaticomm Limited |
| AT+GMI | Pragmaticomm Limited |
| AT+CGMR | Software version |
AT commands with mock support by piAccess Link
| Command | Reply |
| AT | OK |
| ATZ | OK |
| ATE0 | OK |
| ATE1 | OK |
Response termination sequence
All commands, will be appended at the end of their responses by:
<CR><LF>OK<CR><LF>
on succesful completion or by
<CR><LF>ERROR<CR><LF>
in case of error, unless otherwise stated.
Parameter definitions
| <data> | Message body |
| <stat> | Status of message. Can take values "ALL" or 4, "REC UNREAD" or 0, "REC READ" or 1 (both read from Inbox), |
| "STO UNSENT" or 2 (Drafts) and "STO SENT" or 3 (Sent) | |
| <oa> | Originator address |
| <da> | Destination address |
| <length> | Length of sms body characters |
| <scts> | Service center time stamp in string format: "yy/mm/dd,hh:mm:ss" (Year/Month/Day,Hour:Min:Sec) |
| <used1> | Always refers to SM (SIM) memory storage |
| <used2> | Always refers to ME (Phone) memory storage |
| <mode> | Message format mode. Takes values 0 for PDU and 1 for Text mode |
| <mr> | Message reference. 8-bit integer value that is increased every time a message is sent |
| <indexn> | Values in the range of location numbers of phonebook memory |
| <number> | Phone number of format <type> |
| <type> | 129:Unknown numbering plan, national/international number unknown, 145:international number |
| <text> | Contact last name and/or first name. Maximum length <tlength> |
| <nlength> | Maximum length of <number> field |
| <tlength> | Maximum length of <text> field |
| <contact_flag> | "/H": Home, "/M": Mobile, "/W": Work, "/F": Fax, "/O": Other |
| <rssi> | Received signal strength indication |
| <bcl> | Battery charge level. Values: 0 Battery exhausted, 1-99 percent of capacity remaining, 100 Fully charged |
| <CR> | Carriage return |
| <LF> | Line feed |
