Connect One SM2144N1 Nano WiReach 802.11b/g, 2144 User Manual AT i Programmer s Manual

Connect One Ltd. Nano WiReach 802.11b/g, 2144 AT i Programmer s Manual

Users Manual

International:
Connect One Ltd.
20 Atir Yeda Street
Kfar Saba 44643, Israel
Tel: +972-9-766-0456
Fax: +972-9-766-0461
http://www.connectone.com
USA:
Connect One Semiconductors, Inc.
560 S. Winchester Blvd.
Suite 500
San Jose, CA 95128
Tel: (408) 572-5675
Fax: (408) 572-5601
Pub. No. 20-5000-08_32, November 2008
Programmer s Manual
Version 8.32
for iChipCO2
with Firmware Version 722P01
November 2008
AT+i TM
AT+i Programmer‘s Manual Version 8.32 ii
Discalaimer, Copyrights and Trademarks
The information in this document is subject to change without notice and shall not be
construed as a commitment on the part of Connect One.
Connect One assumes no liability for any errors that may appear in this document.
The software described in this document is furnished under a license agreement and may
be used or copied only in accordance with the terms of such a license agreement. It is
forbidden by law to copy the software on any medium except as specifically allowed in
the license agreement. No part of this document may be reproduced or transmitted in any
form or by any means, electronic or mechanical, including but not limited to
photocopying, recording, transmitting via fax and/or modem devices, scanning, and/or
information storage and retrieval systems for any purpose without the express written
consent of Connect One.
iChip, SerialNET, AT+i, and Connect One are trademarks of Connect One Ltd.
Copyright 2000-2008 Connect One Ltd. All rights reserved.
WPA Supplicant
Copyright (c) 2003-2005, Jouni Malinen <jkmaline@cc.hut.fi> and contributors All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the
distribution.
3. Neither the name(s) of the above-listed copyright holder(s) nor the names of its contributors may
be used to endorse or promote products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Revision History 20-5000-08_32
AT+i Programmer‘s Manual Version 8.32 iii
Revision History 20-5000-08_32
Version
Date
1.0
Nov. 1999
3.0
Nov. 2000
4.0
January 2001
5.0
February 2001
6.0
March 2001
6.1
June 2001
6.3
July 2001
6.4
Sep. 2001
6.5
Oct. 2001
7.1
July 2002
7.2
Nov. 2002
7.4
August 2003
7.4a
October 2003
7.4b
Dec. 2004
7.6
September 2005
7.6a
April 2006
8.0a
June 2007
8.14
September 2007
8.20
December 2007
8.21
January 2008
8.30
March 2008
8.31
March 2008
8.32
November 2008
Contents
AT+i Programmer‘s Manual Version 8.32 iv
Contents
1 AT+i Command Set ............................................................................................... 1-1
1.1 SCOPE .............................................................................................................. 1-1
1.2 AT+I COMMAND GUIDELINES ......................................................................... 1-1
1.3 AT+I COMMAND FORMAT ............................................................................... 1-1
1.4 ESCAPE CODE SEQUENCE ................................................................................ 1-2
1.5 SOCKET COMMAND ABORT ............................................................................. 1-2
1.6 FLEXIBLE HOST AND MODEM INTERFACES ..................................................... 1-2
1.7 AUTO BAUD RATE DETECTION ........................................................................ 1-3
1.8 HIGH SPEED USART ....................................................................................... 1-4
1.9 RESET VIA SERIAL LINK .................................................................................. 1-4
1.10 ENTERING RESCUE MODE DURING RUNTIME .................................................. 1-5
1.11 INTERNET SESSION HANG-UP PROCEDURE (MODEM ONLY) ........................... 1-5
1.12 MODEM STARTUP ............................................................................................ 1-5
1.13 ANALOG-TO-DIGITAL CONVERTER ................................................................. 1-5
1.14 ICHIP READINESS INDICATION ......................................................................... 1-6
1.15 PROGRAMMING ICHIPS SERIAL NUMBER INTO FLASH MEMORY .................... 1-6
1.15.1 +iSNUM iChip Serial Number ........................................................... 1-6
1.16 PROGRAMMING A UNIQUE ID STRING INTO FLASH MEMORY .......................... 1-7
1.16.1 +iUID Unique ID ............................................................................... 1-7
2 General Format ..................................................................................................... 2-1
2.1 AT+I COMMANDS BY CATEGORY .................................................................... 2-1
3 AT+i Result Code Summary ................................................................................ 3-1
4 Report Status ......................................................................................................... 4-1
4.1 +I[!]RPI REPORT STATUS ............................................................................ 4-1
4.2 STATUS MESSAGE FORMAT ............................................................................. 4-3
5 Connection ............................................................................................................. 5-1
5.1 +IBDRA FORCES ICHIP INTO AUTO BAUD RATE MODE ............................. 5-1
5.2 +IUP INITIATE INTERNET SESSION .............................................................. 5-2
5.3 +ITUP TRIGGERED INTERNET SESSION INITIATION .................................... 5-3
5.4 +IDOWN TERMINATE INTERNET SESSION ................................................. 5-5
5.5 +IPING SEND A PING REQUEST TO A REMOTE SERVER ............................ 5-6
6 E-mail Send Commands ....................................................................................... 6-1
6.1 +IEMA ACCEPT ASCII-CODED LINES FOR E-MAIL SEND ......................... 6-1
6.2 +IEMB ACCEPT BINARY DATA FOR IMMEDIATE E-MAIL SEND ................. 6-2
6.3 +IE* TERMINATE BINARY E-MAIL ............................................................. 6-4
7 E-Mail Retrieve ...................................................................................................... 7-1
7.1 +IRML RETRIEVE MAIL LIST ..................................................................... 7-1
7.2 +IRMH RETRIEVE MAIL HEADER .............................................................. 7-2
7.3 +IRMM RETRIEVE MAIL MESSAGE ............................................................ 7-3
Contents
AT+i Programmer‘s Manual Version 8.32 v
8 HTTP Client Interface .......................................................................................... 8-1
8.1 +IRLNK RETRIEVE LINK ............................................................................ 8-1
8.2 +ISLNK SUBMIT A POST REQUEST TO A WEB SERVER ............................ 8-3
9 SerialNET Mode Initiation ................................................................................... 9-1
9.1 +ISNMD ACTIVATE SERIALNET MODE .................................................... 9-1
10 Web Server Interface .......................................................................................... 10-1
10.1 +IWWW ACTIVATE EMBEDDED WEB SERVER ........................................ 10-1
10.2 +IWNXT RETRIEVE NEXT CHANGED WEB PARAMETER .......................... 10-2
11 File Transfer Protocol (FTP) .............................................................................. 11-1
11.1 +I[@]FOPN FTP OPEN SESSION .............................................................. 11-1
11.2 +IFDL FTP DIRECTORY LISTING .............................................................. 11-2
11.3 +IFDNL FTP DIRECTORY NAMES LISTING .............................................. 11-3
11.4 +IFMKD FTP MAKE DIRECTORY ............................................................ 11-4
11.5 +IFCWD FTP CHANGE WORKING DIRECTORY ........................................ 11-5
11.6 +IFSZ FTP FILE SIZE ............................................................................... 11-6
11.7 +IFRCV FTP RECEIVE FILE ..................................................................... 11-7
11.8 +IFSTO FTP OPEN FILE FOR STORAGE .................................................... 11-8
11.9 +IFAPN FTP OPEN FILE FOR APPENDING ................................................ 11-9
11.10 +IFSND FTP SEND FILE DATA .............................................................. 11-10
11.11 +IFCLF FTP CLOSE FILE ....................................................................... 11-11
11.12 +IFDEL FTP DELETE FILE ..................................................................... 11-12
11.13 +IFCLS FTP CLOSE SESSION ................................................................. 11-13
12 Telnet Client ......................................................................................................... 12-1
12.1 +ITOPN TELNET OPEN SESSION .............................................................. 12-1
12.2 +ITRCV TELNET RECEIVE DATA ............................................................. 12-2
12.3 +ITSND TELNET SEND DATA LINE .......................................................... 12-3
12.4 +ITBSN[%] TELNET SEND A BYTE STREAM............................................ 12-4
12.5 +ITFSH[%] FLUSH TELNET SOCKETS OUTBOUND DATA ........................ 12-5
12.6 +ITCLS TELNET CLOSE SESSION ............................................................. 12-6
13 Direct Socket Interface ....................................................................................... 13-1
13.1 +ISTCP OPEN AND CONNECT A TCP SOCKET ......................................... 13-1
13.2 +ISUDP OPEN A CONNECTIONLESS UDP SOCKET ................................... 13-2
13.3 +ILTCP OPEN A TCP LISTENING SOCKET ............................................... 13-3
13.4 +ILSST GET A LISTENING SOCKETS ACTIVE CONNECTION STATUS ....... 13-4
13.5 +ISST GET A SINGLE SOCKET STATUS REPORT ....................................... 13-5
13.6 +ISCS GET A SOCKET CONNECTION STATUS REPORT ............................. 13-6
13.7 +ISSND[%] SEND A BYTE STREAM TO A SOCKET................................... 13-7
13.8 +ISRCV RECEIVE A BYTE STREAM FROM A SOCKETS INPUT BUFFER .... 13-9
13.9 +IGPNM GET PEER NAME FOR A SPECIFIED SOCKET ............................ 13-11
13.10 +ISDMP DUMP SOCKET BUFFER ............................................................ 13-12
13.11 +ISFSH[%] FLUSH SOCKETS OUTBOUND DATA ................................... 13-13
13.12 +ISCLS CLOSE SOCKET ......................................................................... 13-14
Contents
AT+i Programmer‘s Manual Version 8.32 vi
14 Special Modem Commands ................................................................................ 14-1
14.1 +IMCM ISSUE INTERMEDIATE COMMAND TO MODEM ............................. 14-1
15 Wireless LAN Mode ............................................................................................ 15-1
15.1 +IWLTR WIRELESS LAN TRANSMISSION RATE ...................................... 15-2
15.2 +IWLPW SET WLAN TX POWER ............................................................ 15-3
15.3 +IWRFU WLAN RADIO UP ..................................................................... 15-4
15.4 +IWRFD WLAN RADIO DOWN ............................................................... 15-5
15.5 +IWRST RESET WLAN CHIPSET ............................................................. 15-6
15.6 +IWLBM WLAN B MODE ...................................................................... 15-7
15.7 +IWLGM WLAN G MODE ...................................................................... 15-8
15.8 ROAMING MODE ........................................................................................... 15-9
15.8.1 iChip Behavior Following a Hardware or Software Reset ................... 15-9
15.8.2 iChip Behavior when AP Signal Becomes Weak .................................. 15-9
15.8.3 iChip Behavior in the Event of a Lost Link ......................................... 15-10
15.9 MULTIPLE SSIDS ........................................................................................ 15-10
15.10 ICHIP POWER SAVE MODE........................................................................... 15-11
16 IP Registration ..................................................................................................... 16-1
16.1 E-MAIL REGISTRATION ................................................................................. 16-1
16.2 SOCKET REGISTRATION ................................................................................. 16-2
16.3 WEB SERVER REGISTRATION ........................................................................ 16-2
17 DHCP Client ........................................................................................................ 17-1
18 DHCP Server ....................................................................................................... 18-1
19 iRouter Mode ....................................................................................................... 19-2
19.1 INTRODUCTION .............................................................................................. 19-2
19.2 ESTABLISHING IROUTER MODE ...................................................................... 19-2
19.3 BASIC ROUTING ............................................................................................. 19-2
19.4 TERMINATING IROUTER MODE ...................................................................... 19-3
19.5 CONFIGURING ICHIP WHEN IN IROUTER MODE .............................................. 19-3
19.6 AT+I INTERFACE TO ICHIP ............................................................................ 19-4
19.7 BAUD RATE SETTINGS AND AUTO BAUD RATE ............................................. 19-4
19.8 IROUTER AND POWER SAVE MODE ............................................................... 19-4
19.9 +ISTRR START ROUTER ........................................................................... 19-5
19.10 +ISTPR STOP ROUTER ............................................................................. 19-6
20 Ad-Hoc Networks ................................................................................................ 20-1
20.1 CONFIGURATION ........................................................................................... 20-1
20.2 ICHIP BEHAVIOR IN AD-HOC MODE .............................................................. 20-1
20.2.1 Automatic Scanning for Existing Ad-Hoc Networks ............................. 20-1
20.2.2 Creating a New Ad-Hoc Network ......................................................... 20-1
20.2.3 Joining an Existing Ad-Hoc Network ................................................... 20-1
20.2.4 Merging Ad-Hoc Networks ................................................................... 20-2
Contents
AT+i Programmer‘s Manual Version 8.32 vii
21 Secure Socket Protocol ........................................................................................ 21-1
21.1 ESTABLISHING AN SSL3/TLS1 SOCKET CONNECTION ................................. 21-1
21.2 SENDING AND RECEIVING DATA OVER AN SSL3/TLS1 SOCKET ................... 21-1
21.3 SSL3/TLS1 HANDSHAKE AND SESSION EXAMPLE ........................................ 21-1
21.4 SECURE FTP SESSION ON ICHIP ..................................................................... 21-2
21.5 +ISSL SECURE SOCKET CONNECTION HANDSHAKE ................................. 21-4
21.6 +I[@]FOPS SECURE FTP OPEN SESSION ................................................. 21-5
22 Network Time Client ........................................................................................... 22-1
23 MIME Encapsulated E-Mail Messages ............................................................. 23-1
23.1 ICHIP-GENERATED BINARY MESSAGE FORMATS .......................................... 23-1
23.2 MIME-RELATED AT+I COMMANDS AND PARAMETERS ................................ 23-1
23.2.1 Binary Attachment Parameters ............................................................. 23-2
23.2.2 Defining A Textual Body for Binary Messages ..................................... 23-2
23.3 MIME-ENCAPSULATED E-MAIL MESSAGE FORMAT .................................... 23-3
24 Flow Control ........................................................................................................ 24-1
24.1 HOST ICHIP SOFTWARE FLOW CONTROL .................................................. 24-1
24.2 SOFTWARE FLOW CONTROL DIAGRAM IN BINARY E-MAIL SEND ................. 24-3
24.3 SOFTWARE FLOW CONTROL DURING A SOCKET SEND.................................. 24-4
24.4 SOFTWARE FLOW CONTROL DIAGRAM IN SOCKET SEND .............................. 24-5
24.5 HOST ICHIP HARDWARE FLOW CONTROL ................................................ 24-6
25 Remote Firmware Update .................................................................................. 25-1
25.1 INTRODUCTION .............................................................................................. 25-1
25.2 UPDATING FIRMWARE FROM A REMOTE SERVER .......................................... 25-1
25.3 +IRFU REMOTE FIRMWARE UPDATE ........................................................ 25-3
26 iChip Parameter Update ..................................................................................... 26-1
26.1 INTRODUCTION .............................................................................................. 26-1
26.2 REMOTE PARAMETER FILE (RPF) STRUCTURE .............................................. 26-1
26.3 HEADER PARAMETER NAMES AND VALUES .................................................. 26-2
26.4 UPLOADING A PARAMETERS UPDATE FILE TO ICHIP ..................................... 26-3
27 iChip Embedded Web Server ............................................................................. 27-1
27.1 INTRODUCTION .............................................................................................. 27-1
27.2 FEATURES ...................................................................................................... 27-1
27.3 WEB SERVER MODES .................................................................................... 27-2
27.4 THE APPLICATION WEBSITE .......................................................................... 27-2
27.5 PARAMETER TAGS ......................................................................................... 27-3
27.6 ICHIP CONFIGURATION MODE ....................................................................... 27-3
27.7 HOST INTERACTION MODE ............................................................................ 27-4
27.8 WEBSITE CREATION, PACKING, AND UPLOADING ......................................... 27-5
27.9 MANIPULATING VARIABLES IN THE APPLICATION WEBSITE ......................... 27-5
27.10 SECURITY AND RESTRICTIONS ....................................................................... 27-7
27.11 PARAMETER UPDATE ERROR HANDLING ....................................................... 27-8
Contents
AT+i Programmer‘s Manual Version 8.32 viii
27.12 FILE TYPES SUPPORTED BY ICHIPS WEB SERVER ......................................... 27-8
28 iChip RAS Server ................................................................................................ 28-1
28.1 INTRODUCTION .............................................................................................. 28-1
28.2 RAS PARAMETERS ........................................................................................ 28-1
28.3 RAS THEORY OF OPERATION ........................................................................ 28-2
28.3.1 Auto PPP RAS Mode ............................................................................. 28-2
28.3.2 SerialNET Mode .................................................................................... 28-3
28.3.3 Lost Carrier .......................................................................................... 28-3
28.3.4 Restrictions ........................................................................................... 28-3
29 SerialNET Theory of Operation ........................................................................ 29-1
29.1 INTRODUCTION .............................................................................................. 29-1
29.2 SERIALNET MODE ........................................................................................ 29-1
29.3 SERVER DEVICES ........................................................................................... 29-2
29.4 CLIENT DEVICES ........................................................................................... 29-2
29.5 AUTOMATIC SERIALNET SERVER WAKE-UP PROCEDURE ............................ 29-3
29.6 TRANSMIT PACKETS ...................................................................................... 29-3
29.7 COMPLETING A SERIALNET SESSION ............................................................ 29-4
29.8 SERIALNET FAILED CONNECTION ................................................................ 29-4
29.9 LOCAL SERIAL PORT CONFIGURATION .......................................................... 29-4
29.10 ACTIVATION COMMAND ................................................................................ 29-4
29.11 SERIALNET OVER TELNET ......................................................................... 29-5
29.11.1 Mode of Operation ................................................................................ 29-6
29.11.2 RFC2217 Implementation ..................................................................... 29-6
30 File Transfer Protocol (FTP) Theory of Operation.......................................... 30-1
30.1 INTRODUCTION .............................................................................................. 30-1
30.2 ICHIP FAMILY FTP CLIENT COMMAND SET .................................................. 30-1
30.3 ICHIP FTP CLIENT OPERATION MODE ........................................................... 30-1
30.4 FTP COMMAND SOCKET ............................................................................... 30-1
30.5 FTP RECEIVE FLOW ...................................................................................... 30-2
31 Telnet Client Operation ...................................................................................... 31-1
32 Secure Socket Protocol Theory of Operation ................................................... 32-1
32.1 INTRODUCTION .............................................................................................. 32-1
32.2 GENERATING CERTIFICATES FOR USE WITH SERVERS ................................... 32-1
32.3 USING THE OPENSSL PACKAGE TO CREATE CERTIFICATES .......................... 32-1
32.4 CREATING A CERTIFICATE AUTHORITY ......................................................... 32-2
32.4.1 Creating the CA Environment ............................................................... 32-2
32.4.2 Creating the Test CA Configuration File .............................................. 32-2
32.4.3 Creating a Self-Signed Root Certificate ............................................... 32-3
32.5 SIGNING A CERTIFICATE WITH A CA CERTIFICATE ........................................ 32-4
32.5.1 Creating a Certificate Request .............................................................. 32-4
32.5.2 Using the Test CA to Issue the Certificate ............................................ 32-5
33 Remote AT+i Service ........................................................................................... 33-1
Contents
AT+i Programmer‘s Manual Version 8.32 ix
33.1 INTRODUCTION .............................................................................................. 33-1
33.2 REMOTE AT+I COMMANDS ........................................................................... 33-1
33.3 CLOSING A REMOTE AT+I SESSION .............................................................. 33-1
33.4 CAVEATS AND RESTRICTIONS ........................................................................ 33-1
34 Nonvolatile Parameter Database........................................................................ 34-1
34.1 PARAMETER DESCRIPTIONS ........................................................................... 34-1
0 34-6
34.2 +IFD RESTORE ALL PARAMETERS TO FACTORY DEFAULTS ..................... 34-7
34.3 OPERATIONAL PARAMETERS ......................................................................... 34-8
34.3.1 +iXRC Extended Result Code .......................................................... 34-8
34.3.2 +iDMD Modem Dial Mode .............................................................. 34-9
34.3.3 +iMIS Modem Initialization String ................................................ 34-10
34.3.4 +iMTYP Set Type of Modem Connected to iChip .......................... 34-11
34.3.5 +iWTC Wait Time Constant ........................................................... 34-13
34.3.6 +iTTO TCP Timeout ...................................................................... 34-14
34.3.7 +iPGT PING Timeout .................................................................... 34-15
34.3.8 +iMPS Max PPP Packet Size ......................................................... 34-16
34.3.9 +iTTR TCP Retransmit Timeout .................................................... 34-17
34.3.10 +iBDRF Define A Fixed Baud Rate on Host Connection .............. 34-18
34.3.11 +iBDRM Define A Fixed Baud Rate on iChip
Modem Connection34-
19
34.3.12 +iBDRD Baud Rate Divider ........................................................... 34-20
34.3.13 +iAWS Activate WEB Server Automatically .................................. 34-21
34.3.14 +iLATI TCP/IP Listening Socket to Service Remote AT+i Commands
34-22
34.3.15 +iFLW Set Flow Control Mode ...................................................... 34-23
34.3.16 +iCPF Active Communications Platform ...................................... 34-24
34.3.17 +iPSE Set Power Save Mode ......................................................... 34-25
34.3.18 +iSDM Service Disabling Mode .................................................... 34-26
34.3.19 +iDF IP Protocol ‘Don’t Fragment’ Bit Value ............................. 34-27
34.3.20 +iCKSM Checksum Mode .............................................................. 34-28
34.3.21 +iHIF Host Interface...................................................................... 34-29
34.3.22 +iMIF Modem Interface ................................................................. 34-30
34.3.23 +iADCL ADC Level ....................................................................... 34-31
34.3.24 +iADCD ADC Delta ...................................................................... 34-32
34.3.25 +iADCT ADC Polling Time ........................................................... 34-33
34.3.26 +iADCP ADC GPIO Pin ................................................................ 34-34
34.3.27 +iRRA iChip Readiness Report Activation .................................... 34-35
34.3.28 +iRRHW iChip Readiness Hardware Pin ...................................... 34-37
34.4 ISP CONNECTION PARAMETERS .................................................................. 34-38
34.4.1 +iISPn Set ISP Phone Number ....................................................... 34-38
34.4.2 +iATH Set PPP Authentication Method ......................................... 34-39
34.4.3 +iUSRN Define Connection User Name ........................................ 34-40
34.4.4 +iPWD Define Connection Password ............................................ 34-41
34.4.5 +iRDL Number of Times to Redial ISP .......................................... 34-42
34.4.6 +iRTO Delay Period between Redials to ISP ................................ 34-43
Contents
AT+i Programmer‘s Manual Version 8.32 x
34.5 SERVER PROFILE PARAMETERS ................................................................... 34-44
34.5.1 +iLVS ‘Leave on Server’ Flag ....................................................... 34-44
34.5.2 +iDNSn Define Domain Name Server IP Address ......................... 34-45
34.5.3 +iSMTP Define SMTP Server Name .............................................. 34-46
34.5.4 +iSMA SMTP Authentication Method ............................................ 34-47
34.5.5 +iSMU Define SMTP Login User Name ........................................ 34-48
34.5.6 +iSMP Define SMTP Login Password ........................................... 34-49
34.5.7 +iPOP3 Define POP3 Server Name .............................................. 34-50
34.5.8 +iMBX Define POP3 Mailbox Name ............................................. 34-51
34.5.9 +iMPWD Define POP3 Mailbox Password ................................... 34-52
34.5.10 +iNTSn Define Network Time Server ............................................. 34-53
34.5.11 +NTOD Define Network Time-of-Day Activation Flag ................. 34-54
34.5.12 +iGMTO Define Greenwich Mean Time Offset ............................. 34-55
34.5.13 +iDSTD Define Daylight Savings Transition Rule ........................ 34-56
34.5.14 +iPDSn Define PING Destination Server ...................................... 34-57
34.5.15 +iPFR PING Destination Server Polling Frequency..................... 34-58
34.6 +IUFN USER FIELDS AND MACRO SUBSTITUTION .................................. 34-59
34.7 EMAIL FORMAT PARAMETERS ..................................................................... 34-60
34.7.1 +iXFH Transfer Headers Flag....................................................... 34-61
34.7.2 +iHDL Limit Number of Header Lines .......................................... 34-62
34.7.3 +iFLS Define Filter String ............................................................. 34-63
34.7.4 +iDELF Email Delete Filter String ............................................... 34-64
34.7.5 +iSBJ Email Subject Field ............................................................. 34-65
34.7.6 +iTOA Define Primary Addressee ................................................. 34-66
34.7.7 +iTO Email ‘To’ Description/Name .............................................. 34-67
34.7.8 +iREA Return Email Address......................................................... 34-68
34.7.9 +iFRM Email ‘From’ Description/Name ....................................... 34-69
34.7.10 +iCCn Define Alternate Addressee <n> ....................................... 34-70
34.7.11 +iMT Media Type Value ................................................................ 34-71
34.7.12 +iMST Media Subtype String ......................................................... 34-72
34.7.13 +iFN Attachment File Name .......................................................... 34-73
34.8 HTTP PARAMETERS .................................................................................... 34-74
34.8.1 +iURL Default URL Address ......................................................... 34-75
34.8.2 +iCTT Define Content Type Field in POST Request ..................... 34-76
34.8.3 +iWPWD Password for Application Website Authentication ........ 34-77
34.9 RAS SERVER PARAMETERS ......................................................................... 34-78
34.9.1 +iRAR RAS RINGs ......................................................................... 34-78
34.9.2 +iRAU Define RAS Login User Name ........................................... 34-79
34.9.3 +iRAP Password for RAS Authentication ...................................... 34-80
34.10 LAN PARAMETERS ...................................................................................... 34-81
34.10.1 +iMACA MAC Address of iChip .................................................... 34-81
34.10.2 +iDIP iChip Default IP Address .................................................... 34-82
34.10.3 +iIPA Active IP Address ................................................................ 34-83
34.10.4 +iIPG IP Address of the Gateway .................................................. 34-84
34.10.5 +iSNET Subnet Address ................................................................. 34-85
34.11 WIRELESS LAN PARAMETERS ..................................................................... 34-86
Contents
AT+i Programmer‘s Manual Version 8.32 xi
34.11.1 +iWLCH Wireless LAN Communication Channel ......................... 34-86
34.11.2 +iWLSI Wireless LAN Service Set Identifier .................................. 34-87
34.11.3 +iWLWM Wireless LAN WEP Mode.............................................. 34-88
34.11.4 +iWLKI Wireless LAN Transmission WEP Key Index ................... 34-89
34.11.5 +iWLKn Wireless LAN WEP Key Array ........................................ 34-90
34.11.6 +iWLPS Wireless LAN Power Save ............................................... 34-91
34.11.7 +iWLPP Personal Shared Key Pass-Phrase .................................. 34-92
34.11.8 +iWROM Enable Roaming in WiFi ............................................... 34-93
34.11.9 +iWPSI Periodic WiFi Scan Interval ............................................. 34-94
34.11.10 +iWSRL SNR Low Threshold ......................................................... 34-95
34.11.11 +iWSRH SNR High Threshold ....................................................... 34-96
34.11.12 +iWSIn Wireless LAN Service Set Identifier Array........................ 34-97
34.11.13 +iWPPn Pre-Shared Key Passphrase Array.................................. 34-99
34.11.14 +iWKYn Wireless LAN WEP Key Array ...................................... 34-100
34.11.15 +iWSTn Wireless LAN Security Type Array ................................ 34-101
34.11.16 +iWSEC Wireless LAN WPA Security ......................................... 34-102
34.12 IP REGISTRATION PARAMETERS ................................................................ 34-103
34.12.1 +iRRMA IP Registration Mail Address........................................ 34-103
34.12.2 +iRRSV IP Registration Host Server Name ................................. 34-104
34.12.3 +iRRWS IP Registration Web Server ........................................... 34-105
34.12.4 +iRRRL IP Registration Return Link ........................................... 34-106
34.12.5 +iHSTN iChip LAN Host Name ................................................... 34-107
34.13 SERIALNET MODE PARAMETERS .............................................................. 34-108
34.13.1 +iHSRV | +iHSRn Host Server Name/IP ..................................... 34-108
34.13.2 +iHSS Assign Special Characters to Hosts .................................. 34-109
34.13.3 +iDSTR Define Disconnection String for SerialNET Mode ........ 34-110
34.13.4 +iLPRT SerialNET Device Listening Port ................................... 34-111
34.13.5 +iMBTB Max Bytes To Buffer ...................................................... 34-112
34.13.6 +iMTTF Max Timeout to Socket Flush ........................................ 34-113
34.13.7 +iFCHR Flush Character ............................................................ 34-114
34.13.8 +iMCBF Maximum Characters before Socket Flush................... 34-115
34.13.9 +iIATO Inactivity Timeout ........................................................... 34-116
34.13.10 +iSNSI SerialNET Device Serial Interface .................................. 34-117
34.13.11 +iSTYP SerialNET Device Socket Type ....................................... 34-118
34.13.12 +iSNRD SerialNET Device Re-Initialization Delay .................... 34-119
34.13.13 +iSPN SerialNET Server Phone Number ..................................... 34-120
34.13.14 +iSDT SerialNET Dialup Timeout ............................................... 34-121
34.13.15 +iSWT SerialNET Wake-Up Timeout........................................... 34-122
34.13.16 +iPTD SerialNET Packets to Discard ......................................... 34-123
34.14 REMOTE FIRMWARE UPDATE PARAMETERS .............................................. 34-124
34.14.1 +iUEN Remote Firmware Update Flag ....................................... 34-124
34.14.2 +iUSRV Remote Firmware Update Server Name ........................ 34-125
34.14.3 +iUUSR Remote Firmware Update FTP User Name .................. 34-126
34.14.4 +iUPWD Remote Firmware Update FTP User Password .......... 34-127
34.15 REMOTE PARAMETER UPDATE .................................................................. 34-128
Contents
AT+i Programmer‘s Manual Version 8.32 xii
Note: This default value is shipped from the factory. The AT+iFD command does not
restore RPG to this value. ...................................................................................... 34-128
34.16 SECURE SOCKET PROTOCOL PARAMETERS ................................................ 34-129
34.16.1 +iCS Define the SSL3/TLS Cipher Suite ...................................... 34-129
34.16.2 +iCA Define SSL3/TLS Certificate Authority .............................. 34-130
34.16.3 +iCERT Define SSL3/TLS1 Certificate ........................................ 34-131
34.16.4 +iPKEY Define iChip’s Private Key ............................................ 34-132
34.17 DHCP SERVER PARAMETERS .................................................................... 34-133
34.17.1 +iDPSZ DHCP Server Pool Size ................................................. 34-133
34.17.2 +iDSLT DHCP Server Lease Time .............................................. 34-134
34.18 IROUTER PARAMETERS .............................................................................. 34-135
34.18.1 +iARS Automatic Router Start ..................................................... 34-135
35 Appendix A .......................................................................................................... 35-1
35.1 MIME CONTENT TYPES AND SUBTYPES ......................................................... 35-1
36 Appendix B ........................................................................................................... 36-1
36.1 SAMPLE PARAMETER UPDATE FILE ............................................................... 36-1
37 Appendix C .......................................................................................................... 37-1
37.1 NIST TIME SERVERS ..................................................................................... 37-1
38 Index ..................................................................................................................... 38-1
Figures
AT+i Programmer‘s Manual Version 8.32 xiii
Figures
Figure 7-1 E-Mail Receive (RMM) Flow Diagram ........................................................ 7-5
Figure 23-1 Software Flow Control in Binary E-Mail Send ......................................... 24-3
Figure 23-2 Software Flow Control in Socket Send ..................................................... 24-5
Figure 23-3 Minimum Hardware Flow Control Connections ....................................... 24-6
Figure 26-1: iChip Web Server Modes ......................................................................... 27-2
Figure 29-1 FTP Receive Flowchart ............................................................................. 30-2
Tables
AT+i Programmer‘s Manual Version 8.32 xiv
Tables
Table 2-1 AT+i Commands by Category........................................................................ 2-5
Table 3-1 AT+i Result Code Summary .......................................................................... 3-3
Table 1-1 Report Status Message Format ....................................................................... 4-6
Table 17-1: Server Names Acquired from DHCP Server ............................................. 17-1
Table 22-1 Binary Attachment Parameters ................................................................... 23-2
Table 25-1 Header Parameter Names and Values ........................................................ 26-2
Table 34-1 Nonvolatile Parameter Database ................................................................ 34-6
Table 34-1 MIME Content Types and Subtypes .......................................................... 35-3
Table 36-1: List of NIST Time Servers ........................................................................ 37-1
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-1
1 AT+i Command Set
1.1 Scope
This manual describes Connect One‘s AT+i™ interface standard, protocol, and syntax for
the iChip CO2128.
1.2 AT+i Command Guidelines
AT+i commands are an extension to the basic AT command set. They are parsed and
acted upon by iChip.
iChip in dial-up mode only: When iChip is in COMMAND mode, basic AT commands
and raw data (not prefixed by AT+i) are transparently transferred to the underlying
modem Digital Communications Equipment (DCE), where they are serviced. When
transferring data transparently to the DCE, the hardware flow control signals (CTS, RTS,
DTR and DSR) are mirrored across the iChip, unless disabled by the FLW parameter. AT
and AT+i commands may be issued intermittently. During an Internet session, when
iChip is online, an AT command can be sent to the modem using the AT+iMCM
command.
The ASCII ISO 646 character set (CCITT T.50 International Alphabet 5, American
Standard Code for Information Interchange) is used for issuing commands and responses.
Only the low-order 7 bits of each character are used for commands and parameters; the
high-order bit is ignored. Uppercase characters are equivalent to lowercase ones.
1.3 AT+i Command Format
An AT+i command line is a string of characters sent from the host to the iChip while it is
in command state. The command line has a prefix, body, and terminator. Each command
must begin with the character sequence AT+i and terminated by a carriage return <CR>.
Commands can be entered either in uppercase or lowercase.
iChip in dialup mode only: Commands that do not begin with the AT+i prefix are
transferred to the underlying DCE, where they are parsed and acted upon. DCE responses
are transparently returned to the host.
The AT+i command body is restricted to printable ASCII characters (032126). The
command terminator is the ASCII <CR> character. The command line interpretation
begins upon receipt of the carriage return character. An exception to this rule are the
AT+iEMB, AT+iSSND, AT+iTBSN and AT+iFSND commands.
When ECHO is enabled, the <CR> character is echoed as a two-character sequence:
<CR><LF> (Carriage Return+Line Feed).
Characters within the AT+i command line are parsed as commands with associated
parameter values.
The iChip supports editing of command lines by recognizing a backspace character.
When ECHO is enabled, the iChip responds to receipt of a backspace by echoing a
backspace character, a space character, and another backspace. When ECHO is disabled,
backspace characters are treated as data characters without any further processing.
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-2
If a syntax error is found anywhere in a command line, the remainder of the line is
ignored and the I/ERROR result code returned.
An AT+i command is accepted by iChip once the previous command has been fully
executed, which is normally indicated by the return of an appropriate result code.
Due to the fact that iChip is intended for Machine-to-Machine applications, only limited
parsing is performed on AT+i commands it receives from the host. The following
restrictions apply:
When setting parameters to values larger than the 65535 limit, the values is accepted
as mudulo 65535.
The validity of input IP addresses is not checked.
Illegal numbers, for example, 0.5 or 1.5 are not checked for validity.
1.4 Escape Code Sequence
While the iChip is in Internet mode attending to Internet communications, it is possible to
break into the communications and abort the Internet mode in an orderly manner. This is
achieved by sending the iChip a sequence of three (+) ASCII characters (+++) after a half
second silence period. In response to this, the iChip:
Shuts down Internet communications.
Terminates data transmission to the host.
Performs a software reset.
Responds with an I/ERROR (056) message.
Returns to command mode.
A maximum delay of 10msec may elapse from the time the (+++) escape sequence is sent
until iChip cuts off transmission to the host. The interrupted Internet activity is not
completed. Nevertheless, this is considered to comprise a session. Thus, parameters set
with the (~) character are restored to their permanent value.
1.5 Socket Command Abort
While the iChip is in Internet mode, during a TCP or UDP socket operation, it is possible
to override iChip‘s normal timeout procedure and abort the current socket operation in an
orderly manner. This is achieved by sending the iChip a sequence of three ASCII (-)
characters (---) following a half second silence period. The socket commands to which
this applies are: STCP, SUDP, SSND, and SFSH. When iChip detects the socket abort
command, it aborts the last socket command and returns an I/ERROR following the
STCP and SUDP commands, or I/OK during an SSND or SFSH command.
1.6 Flexible Host and Modem Interfaces
The flexible host and modem interfaces feature enables users to select the interface
through which iChip accepts AT+i commands from the host processor, as well as the
interface through which AT+i commands are sent to a dialup or cellular modem.
Available host interfaces are:
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-3
USART0
USART1
USART2
USB Device (identifies itself as a CDC device)
USB Host (supports only USB Modem class)
Available modem interfaces are:
USART0
USART1
USART2
USB Device
USB Host (only Motorola G24 USB GSM modem is supported)
As a USB host/device, iChip supports the Full-Speed USB standard (12Mbps).
Host-to-iChip interface is selected by setting the value of the Host Interface (HIF)
parameter. Any value from 1 to 5 specifies a certain choice of interface, while a 0 value
specifies automatic interface detection. In automatic interface detection mode, the first
character sent from the host over one of the supported interfaces sets the host interface to
be used throughout that session until the next iChip power cycle.
When automatic host interface detection mode is enabled, a host is connected to one of
the USARTs, and the Host Fixed Baud Rate (BDRF) parameter is set to ‗a‘ (automatic
baud rate detection), the first character the host has to send to iChip in order to trigger
detection must be an ‗a‘ or ‗A‘. If BDRF is set to a fixed baud rate, any character sent
from the host triggers automatic host interface detection.
In a similar fashion, an iChip-to-modem interface can be selected using the Modem
Interface (MIF) parameter, except that automatic modem interface detection is not
available.
Note that any changes to the HIF and MIF parameters take effect only after the following
iChip power-up. Also note that iChip cannot be operated in SerialNET mode when the
HIF parameter is set to automatic mode. Sending an SNMD command (activate
SerialNET mode) with HIF set to automatic mode will result in an error message
I/ERROR (122). In addition, any feature that requires setting a fixed baud rate requires
setting a fixed host interface, as well.
Hardware flow control is supported on USART0 and USART1 only. Hardware signal
mirroring is enabled only if the host and modem interfaces are set to either USART0 or
USART1. See description of Bit 2 of the FLW parameter.
1.7 Auto Baud Rate Detection
iChip supports auto baud rate detection on the host serial communications line. After
power-up, iChip enters auto baud mode when the BDRF parameter is set to the value ‗a‘.
The AT+iBDRA command forces iChip into auto baud mode while it is already in
operation.
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-4
In auto baud mode, iChip expects an A or a character. This is usually the first character
sent, since in command mode a meaningful command is always prefixed by AT+i.
The host may send an a or A to the iChip to allow it to determine the host‘s baud rate. It
may also send a complete AT+i command. In any case, iChip detects the A or a character,
determines the correct baud rate, and configures its serial channel during the stop bit.
Thus, the next character is received by the serial port at the correct baud rate. The A itself
is retained as well. iChip supports auto baud rate detection for the following baud rates:
2400, 4800, 9600, 19200, 38400, 57600, and 115200.
When the BDRF parameter contains a fixed baud rate, iChip initializes to the specified
baud rate without entering auto baud rate mode. Commands issued by the host must be
sent using that baud rate in order to be recognized. In this case, iChip can be forced into
auto baud rate mode by holding the special input signal low for not more than five
seconds following power-up.
iChip dial-up mode only: When the BDRM parameter is set to an a value, iChip
assumes the attached modem has the auto baud rate feature. Once the hostiChip baud
rate is determined, the iChipmodem baud rate is set to the same rate. Any other BDRM
value is used as a fixed baud rate to the modem.
1.8 High Speed USART
Very high baud rates, up to 3Mbps, can be reached between host and iChip via one of
iChip‘s USARTs. The BDRD parameter acts as baud rate divider. When set to ‗0‘, iChip
sets its host USART baud rate according to the value of the BDRF parameter. When set
to any value in the range 1-255, it divides the maximum supported baud rate 3Mbps
by that value. The quotient of this division is set as the host baud rate, and the value of
BDRF is ignored. For example, if BDRD is set to 2, then the host baud rate will be
3Mbps÷2=1.5Mbps.
If the iChipmodem interface is a USART, BDRD is set to any value other than ‗0‘, and
the modem baud rate is set to Auto (BDRM=‗a‘), then the modem baud rate will be set to
a fixed value of 115,200bps.
In SerialNET mode, you can specify that hostiChip baud rate over USART be
determined by the BDRD parameter. You do so by setting the first field of the SNSI
parameter (<baud>) to ‗0‘.
1.9 Reset via Serial Link
Issuing a BREAK signal on the host serial link effectively resets the iChip. A BREAK
signal is issued by transmitting a LOW (zero value) for a period that is longer than 23 bits
at the current baud rate. Considerably lowering the host baud rate (300 baud or less) and
transmitting a binary zero generates a BREAK signal. After a BREAK signal is issued,
iChip requires 4 seconds to complete the reset cycle before commands can be issued.
When iChip is configured for auto baud rate, the BREAK method is especially useful to
force iChip back into auto baud rate mode when iChip and the host lose synchronization.
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-5
1.10 Entering Rescue Mode during Runtime
The MSEL (Mode Select) input signal of the iChip (see the iChip CO2128 Datasheet),
can be used for entering iChip into Rescue mode.
If MSEL is pulled low (logical 0) for more than 5 seconds during runtime, iChip waits
until MSEL is pulled high (logical 1), performs a software reset and restarts in Rescue
mode. In Rescue mode, iChip performs the following operations:
If in SerialNET mode iChip exits SerialNET mode (changes SNMD value to 0).
If serial baud rate (BDRF or BDRD) is set to a fixed value iChip forces auto baud
rate detection. BDRF/BDRD value will be used again upon the next power-up.
If Always Online mode is defined (TUP=2), or Automatic Router Start is enabled
(ARS=1) iChip bypasses this mode, which means that iChip does not attempt to go
online until the next software or hardware reset.
If the Host Interface parameter (HIF) is set to a fixed interface, it is forced into auto
host interface detection mode (HIF=0).
1.11 Internet Session Hang-Up Procedure (Modem Only)
Upon completion of a dialup Internet session, the iChip automatically executes a modem
hang-up procedure:
The DTR line is dropped.
After a 1 second delay, iChip raises the DTR.
If the modem responds to the DTR drop with a No Carrier then Done. Otherwise,
iChip issues a (+++) to the modem followed by ATH.
1.12 Modem Startup
Following power-up and baud rate determination, iChip in dial-up mode issues the
AT<CR> command to the modem to configure the modem‘s baud rate.
1.13 Analog-to-Digital Converter
iChip contains an Analog-to-Digital (A/D) 8-bit converter that receives analog input
voltage through the ADC signal. This input voltage can be monitored: if it reaches a
predefined upper threshold or goes below a certain lower threshold, an acknowledgement
can be sent. This acknowledgement is sent to the host processor through one of iChip‘s
general-purpose I/O pins (GPIO).
Input voltage can be polled every predefined number of milliseconds. In addition, a report
can be obtained at any given time by issuing the AT+iRP19 command.
The following parameters determine the behavior of the A/D converter:
ADCL and ADCD specify threshold and delta values, respectively. If the value read
from the register of the A/D converter is greater than the sum of ADCL and ADCD,
then the GPIO pin specified by the ADCP parameter is asserted High. If that value is
less than ADCL minus ADCD, the GPIO pin is asserted Low.
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-6
The ADCT parameter defines an interval, in milliseconds, between consecutive
queries of the value of the A/D converter‘s register. iChip‘s response time to value
changes is up to 40ms.
In order to enable the A/D converter polling mechanism, you must, at the very least, set
the ADCL, ADCT, and ADCP parameters to a non-zero value.
The following table summarizes the behavior of the A/D converter.
ADC Register Value
GPIO Pin State
R > L+D
High
R < L-D
Low
Legend:
R ADC register value, which is a binary representation of the A/D converter’s analog input voltage.
L Base level, or threshold, as defined by the ADCL parameter.
D Delta, as defined by the ADCD parameter.
1.14 iChip Readiness Indication
This iChip Readiness Indication feature provides an indication of iChip‘s readiness to
accept AT+i commands following a hardware reset. Using this feature, iChip can also
notify the host when it is ready for IP communication.
This functionality is based on two parameters RRA and RRHW. The RRA parameter
can be set to send a software message to the host, assert a dedicated hardware pin, or do
both. The RRHW parameter specifies which of iChip‘s I/O pins will be asserted.
The hardware pin specified by the RRHW parameter is asserted High immediately after
power up. It will be asserted Low when iChip is ready to receive AT+i commands, and
asserted High again following iChip‘s response to any AT+i command.
1.15 Programming iChip’s Serial Number into Flash Memory
You can use the AT+iSNUM command to program the iChip serial number into flash
memory. This can be done only once.
1.15.1 +iSNUM iChip Serial Number
Syntax:
AT+iSNUM=<serial_number>
Programs iChip‘s serial number into flash memory.
Parameters:
<serial_number>
iChip‘s serial number consisting 8 hexadecimal characters.
The serial number can be assigned only once, while the
current serial number is still FFFFFFFF. Once a serial
number is assigned, it cannot be modified. To find out the
current serial number, use the AT+iRP5 command.
Default:
The serial number assigned at the factory.
Result Code:
AT+i Command Set
AT+i Programmer‘s Manual Version 8.32 1-7
I/OK
If serial_number is a legal hexadecimal string and is being
set for the first time.
I/ERROR(068)
Serial number already exists.
AT+iSNUM=?
Returns the message ―String‖ followed by I/OK.
1.16 Programming a Unique ID String into Flash Memory
You can use the AT+iUID command to enable programming of a unique 8-character ID
string for each iChip in iChip‘s flash memory.
1.16.1 +iUID Unique ID
Syntax:
AT+iUID=<ID>
Programs a unique ID number into the flash memory that
iChip is connected to.
Parameters:
<ID>
A unique string consisting of 8 characters or less. This
string can be assigned only once, while the current ID is still
FFFFFFFFFFFFFFFF. Once an ID is assigned, it cannot be
modified.
Default:
FFFFFFFFFFFFFFFF
Result Code:
I/OK
If ID string is 8 characters or less in length and is being set
for the first time.
I/ERROR(065)
ID already exists (not all FF)
AT+iUID?
Returns the current UID value followed by I/OK.
AT+iUID=?
Returns the message string‖ followed by I/OK.
General Format
AT+i Programmer‘s Manual Version 8.32 2-1
2 General Format
AT+i<cc>[<del>[<parameter> | #UFn]…]<CR>
<cc> (or <par>)
24 letter command code (<cc>) or parameter name (<par>)
<del>
Delimiter: '=', '~', '?', ':', ‗,‘
<parameter>
Optional parameter or data. If <parameter> includes a <del>, as
defined above, it must be enclosed in single (‗) or double (―) quotes.
The terminating <CR> is considered as a terminating quote as well.
#UFn
User-field macro substitution
<CR>
Carriage Return line terminator (ASCII 13)
2.1 AT+i Commands by Category
Command
Function
Parameters/Description
AT+i
Command prefix
Required to precede all commands
Host Interface
En
Echo Mode
n=0 Do not echo host characters
n=1 Echo all host characters (default upon power-up)
This command is equivalent to and interchangeable with
ATEn.
Parameter Database Maintenance
<par>=value
-or-
<par>:value
Set parameter
value stored in parameter <par> in nonvolatile memory.
<par> retains set value indefinitely after power down.
<par>~value
Assign single session
parameter value
value is assigned to parameter <par> for the duration of
a single Internet session. Following the session, the
original value is restored.
<par>?
Read parameter
Parameter value is returned.
<par>=?
Parameter allowed
values
Returns the allowed values for this parameter.
FD
Factory Defaults
Restores all parameters to factory defaults.
Status Report
RP<i>
Request status report
Returns a status report value based on <i>.
Connection
BDRA
Auto baud rate mode
Forces iChip into auto baud rate detection mode.
UP
Connect to Internet
Forces iChip to go online, establish an Internet session,
and optionally register its IP address.
TUP
Triggered Internet
session mode
Enters a mode in which iChip goes online in response to
triggers from external signals. It also supports a special
Always Online mode.
DOWN
Perform a software reset
Performs a software reset. Forces iChip to terminate an
Internet session and go offline.
PING
PING a remote system
Sends a PING message and waits for its echo response.
General Format
AT+i Programmer‘s Manual Version 8.32 2-2
Command
Function
Parameters/Description
Send E-mail
[!]EMA:<text>
Send textual e-mail
Defines the textual contents of the e-mail body.
Following this command, several text lines can be
sent in sequence.
[!]EMB:<sz>,<data>
Send binary e-mail
Prefixes a binary data stream. The data is
encapsulated as a base 64 encoded MIME
attachment. Following this prefix, exactly <sz> bytes
are streamed to iChip.
[!]E*
Terminate binary
e-mail
Terminates a binary (MIME attachment) e-mail.
Retrieve E-mail
[!]RML
Retrieve mail list
Retrieves an indexed, short form list of all qualifying
messages in mailbox.
[!]RMH[:<i>]
Retrieve header
Retrieves only the e-mail header part from the <i>‘th
e-mail in the mailbox, or the entire mailbox.
[!]RMM[:<i>]
Retrieve e-mail
Retrieves all e-mail contents of the <i>‘th e-mail in
the mailbox, or the entire mailbox.
HTTP Client
[!]RLNK[:<URL>]
Retrieve link
Retrieves a file from a URL on a web server. If
<URL> is not specified, uses the URL stored in the
URL parameter.
[!]SLNK:<text>
Send POST request
Sends a file consisting lines of ASCII to a web server
defined in the URL parameter.
HTTP Server
WWW
Activate the web
server
Activates iChip‘s internal web server. Once
activated, remote browsers can surf iChip‘s website.
WNXT
Retrieve next
changed web
parameter
Returns the parameter tag name and new value of the
next web parameter that has been changed as a result
of a submit by a remote browser.
SerialNET
[!|@]SNMD
Activate SerialNET
mode
Activates iChip‘s dedicated serial-to-network
SerialNET mode.
Telnet Client
TOPN
Telnet open session
Opens a Telnet session to a remote Telnet server. If
iChip is not online, it is connected.
TRCV
Telnet receive
Receives data from a remote Telnet server.
TSND
Telnet send line
Sends an ASCII data line to a remote Telnet server.
TBSN[%]
Telnet send binary
stream
Sends a binary data stream to a remote Telnet server.
TFSH[%]
Telnet flush
Flushes a Telnet socket‘s outbound data.
TCLS
Telnet close
Closes a Telnet session.
General Format
AT+i Programmer‘s Manual Version 8.32 2-3
Command
Function
Parameters/Description
File Transfer Protocol (FTP)
FOPN
Open FTP link
Opens an FTP command socket to a remote FTP
server. If iChip is not online, it is connected. Once
an FTP link is established, it can be used to carry
out operations on the server‘s file system.
FOPS
Open secure FTP
link
Opens an FTP link and negotiates an SSL3/TLS1
connection on the control channel. All following
FTP operations in this session are performed over
an SSL3/TLS1 connection.
FDL
FTP directory
listing
Retrieves the remote FTP server‘s file directory
listing. The full server-dependent listing is returned.
FDNL
FTP directory name
list
Retrieves the remote FTP server‘s file directory
listing. Only file names are returned.
FMKD
FTP make directory
Creates a directory on a remote FTP server.
FCWD
FTP change
directory
Changes a remote FTP server‘s current directory.
FSZ
FTP file size
Retrieves the size of a file stored on a remote FTP
server.
FRCV
FTP file receive
Downloads a file from a remote FTP server.
FSTO
FTP file store
Opens a file for upload to a remote FTP server. If
the file already exists, it is overwritten.
FAPN
FTP file append
Opens a file on a remote FTP server for appending.
If the file does not already exist, it is created.
FSND
FTP file send
Sends data to a file on a remote FTP server. The file
must be already open by a previous FSTO or FAPN
command.
FCLF
FTP close file
Closes the currently open file on an FTP server.
Any data uploaded to the file with the FSND
command is retained on the server.
FDEL
FTP delete file
Deletes a file from a remote FTP server‘s file
system.
FCLS
FTP close
Closes an FTP link.
General Format
AT+i Programmer‘s Manual Version 8.32 2-4
Command
Function
Parameters/Description
Socket Interface
STCP:<host>,
<port>[,<lport>]
Socket TCP
Opens and connects a TCP socket. If iChip is not
online, it is connected. The responding system is
assumed to be a server listening on the specified
socket. Returns a handle to the socket.
SUDP:
<host>,<rport>
[,<lport>]
Socket UDP
Opens, connects, and optionally binds a UDP
socket. If iChip is not online, it is connected.
Returns a handle to the socket.
LTCP:
<port>,<backlog>
Listening socket
Opens a TCP listening socket on <port>. Allows a
maximum of <backlog> concurrent connections.
Returns a handle to the socket. Up to two listening
sockets are supported.
LSST:<hn>
Listening socket
status
Returns a list of active socket handles accepted for
a listening socket identified by handle <hn>.
SST:<hn>
Single socket status
Returns status of a single socket identified by
handle <hn>. A subset of RP4 report.
SCS:<hn>
Socket connection
status
Returns status of a single socket identified by
handle <hn>. A subset of RP4 report. Does not
report number of buffered characters.
SSND[%]:
<hn>,<sz>:<stream>
Socket send
Sends a byte stream of size <sz> to the socket
identified by handle <hn>. The % flag indicates
automatic socket flush.
SRCV:<hn>
[,<max>]
Socket receive
Receives a byte stream from the socket identified
by handle <hn>. Accepts up to <max> bytes. If
<max> is not specified, all available bytes are
retrieved.
GPNM:<hn>
Get peer name
Retrieves peer name (<IP>:<port>) of a remote
connection to the TCP/UDP socket specified by
socket handle <hn>.
SDMP:<hn>
Dump socket buffer
Dumps all buffered data currently accumulated in a
socket‘s input buffer. The socket remains open.
SFSH[%]:<hn>
Flush socket‘s
outbound data
Flushes (sends immediately) data accumulated in a
socket‘s outbound buffer. If the flush-and-
acknowledge flag (!) is specified, iChip waits for
peer to acknowledge receipt of the TCP packet.
[!]SCLS:<hn>
Close socket
Closes a TCP/UDP socket. If that socket is the only
socket open and the stay online flag (!) is not
specified, iChip terminates the Internet session and
goes offline.
SSL:<hn>
SSL3/TLS1 socket
connection
Negotiates an SSL3/TLS1 connection over an
active TCP socket.
General Format
AT+i Programmer‘s Manual Version 8.32 2-5
Command
Function
Parameters/Description
Special Modem Command
MCM
Interlaced modem
command
Sends an interlaced AT command to the modem
while it is online.
Wireless LAN
WLTR
WLAN
transmisssion rate
Sets the maximum allowable WLAN transmission
rate.
WLPW
WLAN Tx power
Sets the transmission power of the Marvell WLAN
chipset.
WRFU
WLAN radio up
Turns on radio transmission of the Marvell WLAN
chipset.
WRFD
WLAN radio down
Turns off radio transmission of the Marvell WLAN
chipset.
WRST
Reset WLAN
chipset
Performs a hardware reset of the Marvell WLAN
chipset.
WLBM
WLAN b mode
Sets the Marvell WLAN chipset to 802.11/b mode.
WLGM
WLAN g mode
Sets the Marvell WLAN chipset to 802.11/g mode.
Remote Firmware Update
RFU
Remote firmware
update
Updates firmware from a remote HTTP or FTP
server.
Table 2-1 AT+i Commands by Category
AT+i Result Code Summary
AT+i Programmer‘s Manual Version 8.32 3-1
3 AT+i Result Code Summary
Response
String
Denotation
I/OK
Command was successfully executed.
I/BUSY
iChip busy. Command discarded.
I/DONE
iChip completed Internet activity; returned to command mode, or entered
SerialNET mode.
I/ONLINE
iChip completed Internet activity and returned to command mode, or entered
SerialNET mode. iChip issues this response when it has remained online as a
result of the stay online flag (!) or as a result of the web server being online.
I/OFFLINE
iChip in LAN mode entered SerialNET Always Online mode but failed to detect a
LAN link at time of entry.
I/RCV
Marks beginning of e-mail retrieve mode, with XFH=1. iChip does not respond to
any commands, except for (+++) (Break).
I/PART
Marks beginning of MIME attachment part.
I/EOP
Marks end of MIME attachment part.
I/EOM
Marks end of e-mail message during retrieve.
I/MBE
This flag is returned when attempting to retrieve mail from an empty mailbox.
I/UPDATE
iChip is downloading a new firmware version. Allow up to 5 minutes to complete.
I/ERROR(nnn)
nnn
Command error encountered. Command discarded.
41
Illegal delimiter
42
Illegal value
43
CR expected
44
Number expected
45
CR or ‘,’ expected
46
DNS expected
47
‘:’ or ‘~’ expected
48
String expected
49
‘:’ or ‘=’ expected
50
Text expected
51
Syntax error
52
‘,’ expected
53
Illegal command code
54
Error when setting parameter
55
Error when getting parameter
value
56
User abort
57
Error when trying to establish
PPP
58
Error when trying to establish SMTP
59
Error when trying to establish
POP3
60
Single session body for MIME exceeds the
maximum allowed
61
Internal memory failure
62
User aborted the system
63
~CTSH needs to be LOW to
change to hardware flow
control.
64
User aborted last command using ‘---
65
RESERVED
66
RESERVED
67
Command ignored as
irrelevant
68
iChip serial number already exists
69
Timeout on host
communication
70
Modem failed to respond
71
No dial tone response
72
No carrier modem response
73
Dial failed
74
Modem connection with ISP lost
-or-
LAN connection lost
-or-
WLAN connection lost
75
Access denied to ISP server
76
Unable to locate POP3 server
77
POP3 server timed out
78
Access denied to POP3 server
79
POP3 failed
80
No suitable message in mailbox
81
Unable to locate SMTP server
82
SMTP server timed out
AT+i Result Code Summary
AT+i Programmer‘s Manual Version 8.32 3-2
83
SMTP failed
84
RESERVED
85
RESERVED
86
Writing to internal non-volatile parameters
database failed
87
Web server IP registration
failed
88
Socket IP registration failed
89
E-mail IP registration failed
90
IP registration failed for all methods specified
91
RESERVED
92
RESERVED
93
RESERVED
94
In Always Online mode, connection was lost
and re-established
96
A remote host, which had taken over iChip
through the LATI port, was disconnected
98
RESERVED
99
RESERVED
100
Error restoring default parameters
101
No ISP access numbers
defined
102
No USRN defined
103
No PWD entered
104
No DNS defined
105
POP3 server not defined
106
MBX (mailbox) not defined
107
MPWD (mailbox password)
not defined
108
TOA (addressee) not defined
109
REA (return e-mail address)
not defined
110
SMTP server not defined
111
Serial data overflow
112
Illegal command when modem online
113
E-mail firmware update
attempted but not completed.
The original firmware
remained intact.
114
E-mail parameters update rejected
115
SerialNET could not be
started due to missing
parameters
116
Error parsing a new trusted CA certificate
117
RESERVED
118
Protocol specified in the USRV parameter
does not exist or is unknown
119
WPA passphrase too short -
has to be 8-63 chars
120
RESERVED
121
RESERVED
122
SerialNET error: Host Interface undefined
(HIF=0)
123
SerialNET mode error: Host
baud rate cannot be
determined
124
SerialNET over TELNET error: HIF
parameter must be set to 1 or 2
200
Socket does not exist
201
Socket empty on receive
202
Socket not in use
203
Socket down
204
No available sockets
206
PPP open failed for socket
207
Error creating socket
208
Socket send error
209
Socket receive error
210
PPP down for socket
212
Socket flush error
215
No carrier error on socket
operation
216
General exception
217
Out of memory
218
An STCP (Open Socket) command specified a
local port number that is already in use
219
SSL initialization/internal CA
certificate loading error
220
SSL3 negotiation error
221
Illegal SSL socket handle.
Must be an open and active
TCP socket.
222
Trusted CA certificate does not exist
223
RESERVED
224
Decoding error on incoming SSL data
AT+i Result Code Summary
AT+i Programmer‘s Manual Version 8.32 3-3
225
No additional SSL sockets
available
226
Maximum SSL packet size (2K) exceeded
227
AT+iSSND command failed
because size of stream sent
exceeded 2048 bytes
228
AT+iSSND command failed because checksum
calculated does not match checksum sent by
host
300
HTTP server unknown
301
HTTP server timeout
302
HTTP failure
303
No URL specified
304
Illegal HTTP host name
305
Illegal HTTP port number
306
Illegal URL address
307
URL address too long
308
The AT+iWWW command failed because
iChip does not contain a home page
400
MAC address exists
401
No IP address
402
Wireless LAN power set failed
403
Wireless LAN radio control
failed
404
Wireless LAN reset failed
405
Wireless LAN hardware setup
failed
406
Command failed because WiFi module is
currently busy
407
Illegal WiFi channel
408
Illegal SNR threshold
500
RESERVED
501
Communications platform
already active
502
RESERVED
503
RESERVED
504
RESERVED
505
Cannot open additional FTP
session all FTP handles in
use
506
Not an FTP session handle
507
FTP server not found
508
Timeout when connecting to FTP server
509
Failed to login to FTP server
(bad username or password
or account)
510
FTP command could not be completed
511
FTP data socket could not be
opened
512
Failed to send data on FTP data socket
513
FTP shutdown by remote
server
514
RESERVED
550
Telnet server not found
551
Timeout when connecting to
Telnet server
552
Telnet command could not be completed
553
Telnet session shutdown by
remote server
554
A Telnet session is not currently active
555
A Telnet session is already
open
556
Telnet server refused to switch to BINARY
mode
557
Telnet server refused to switch
to ASCII mode
558
RESERVED
559
RESERVED
560
Client could not retrieve a ring response
e-mail
561
Remote peer closed the
SerialNET socket
570
PING destination not found
571
No reply to PING request
Table 3-1 AT+i Result Code Summary
Note: All iChip response strings are terminated with <CR><LF>.
AT+i Result Code Summary
AT+i Programmer‘s Manual Version 8.32 3-4
Report Status
AT+i Programmer‘s Manual Version 8.32 4-1
4 Report Status
4.1 +i[!]RPi Report Status
Syntax:
AT+i[!]RPi
Returns a status report.
Parameters:
i=0..20
Command Options:
i=0
Returns the iChip part number.
i=1
Returns the current firmware revision and date.
i=2
Returns the connection status.
i=3
Returns boot-block revision and date.
i=4
Returns iChip socket status.
i=5
Returns a unique serial number.
i=6
Returns current ARP table.
i=7
Returns socket buffers utilization bitmap. iChip‘s DATA_RDY
signal can be used to signal socket buffer status changes in
hardware. This signal is raised when new data in one or more
sockets is available, or when a remote browser has changed a
web parameter. It is lowered when any socket or web
parameter is read.
i=8
Returns current time-of-day based on time retrieved from the
Network Time Server and the GMT offset setting. Returns an
all-zero response if a timestamp has not yet been retrieved from
the network since the last power-up.
i=9
Reserved
i=10
and
AT+i!RP10
Return two different status reports about the current Wireless
LAN connection.
i=11
Returns a list of all Access Points available in the surrounding
area.
AT+i!RP11
Returns a list of all Ad-Hoc networks available in the
surrounding area.
i=14
Returns a DHCP server table of MAC and IP addresses of all
the stations connected to iChip.
i=19
Returns Analog-to-Digital Converter (ADC) pin status report.
i=20
Returns a list of all APs and Ad-Hoc networks available in the
surrounding area.
Report Status
AT+i Programmer‘s Manual Version 8.32 4-2
Default:
None
Result Code:
i=0..20
Status message followed by I/OK.
I/ERROR
Otherwise
Report Status
AT+i Programmer‘s Manual Version 8.32 4-3
4.2 Status Message Format
Report Option
Format
0
COnnnAD-ii
nnn Version number; ii Interface code: S-Serial, L-LAN, D-Dual
1
IiimmmTss (<version-date>)
Iii Interface code; mmm Major Version; T Version type code;
ss Sub-version
2
Status string: "Modem data<CR/LF>"
"Command mode<CR/LF>"
"<CR/LF>Connecting to ISP<CR/LF>"
"<CR/LF>Connected to ISP<CR/LF>"
"<CR/LF>Connecting as RAS<CR/LF>"
"<CR/LF>RAS Connected<CR/LF>""<CR/LF>Closing PPP<CR/LF>"
"<CR/LF>Establishing SMTP<CR/LF>"
"<CR/LF>Sending Email<CR/LF>"
"<CR/LF>Establishing POP3<CR/LF>"
"<CR/LF>POP3 Open<CR/LF>"
"<CR/LF>Establishing HTTP<CR/LF>"
"<CR/LF>Receiving HTTP<CR/LF>"
"<CR/LF>Carrier Lost<CR/LF>"
"<CR/LF>Link Lost<CR/LF>"
3
nnmm Boot block version number
4
I/(<sock0sz>, <sock1sz>, … ,<sock9sz>)
sock<i>sz >=0 : Number of bytes pending in socket‘s input buffer
<0 : Negative value of socket‘s error code
5
nnnnnnnn Hexadecimal representation of iChip serial number.
6
Current ARP table listing:
INTERNET ADDRESS PHYSICAL ADDRESS STATE TTL
nnn.nnn.nnn.nnn xxxxxxxxxxxx VALID nnn sec.
For debugging purposes.
7
I/xxxx
xxxx 16 bit Hex Value Bitmap
A bit set to ‗1‘ indicates that the corresponding socket contains buffered data,
which needs to be read by the host.
bit
15
10
7
0
socket
WEB
9
8
7
6
5
4
3
2
1
0
Bit 10 is set to ‗1‘, when the remote browser updates one or more application
website parameter tags. It will be reset to ‗0‘ when the host reads any
application website parameter, using AT+i<Parameter Tag>?
8
The current time-of-day is returned according to ISO 8601:
<YYYY-MM-DD>T<HH:MM:SS> <TZD>
YYYY-MM-DD -- Year-Month-Day ; ‗T‘ – Fixed Separator ;
HH:MM:SS - Hrs:Mins:Secs ; TZD - Time Zone Designator: +hh:mm or hh:mm
All-zeros response: 0000-00-00T00:00:00 <TZD>.
9
Reserved
Report Status
AT+i Programmer‘s Manual Version 8.32 4-4
Report Option
Format
10
I/(<port stat>, <xfer rate>, <sig level>, <lnk qual>)
port stat -Port Status: 0: Wireless LAN adapter not present
1: Wireless LAN adapter disabled
2: Searching for initial connection
4: Connected
5: Out of range
xfer rate -- Transfer rate in the range 1..54
sig level -- Signal level [%], in the range 0..100
lnk qual -- Link quality [%], in the range 0..100
I/OK
AT+i!RP10
Returns a report of the current WLAN connection.
<SSID>,<BSSID>,<security type>,<WPA status>,<channel>,<SNR>
I/OK
where
<security type>=NONE|WEP64|WEP128|WPA|WPA2
<WPA status>=Completed|Not Completed
<WPA status> indicates, when WPA/WPA2 security is specified, whether WPA
negotiation completed or not.
Notes:
For Ad-Hoc networks, SSID starts with (!).
WPA status is reported whether WPA negotiation completed or not.
For example:
Jetta,06:14:6C:69:4A:7C,WPA,Completed,1,68
I/OK
11
iChip scans all available Access Points (APs) in the surrounding area and returns a list
of APs. Each line contains the following comma-separated fields: SSID, security
scheme, and signal strength. The AP having the strongest signal appears first.
<SSID>,<security_scheme>,<signal_strength><CR><LF>
<SSID>,<security_scheme>,<signal_strength><CR><LF>
.
.
<SSID>,<security_scheme>,<signal_strength><CR><LF>
I/OK<CR><LF>
where,
SSID Up to 32 alphanumeric characters
security_scheme None | WEP | WPA
signal_strength 0 - low, 1 - good, 2 - excellent
Note: If no APs are detected, only I/OK<CR><LF> is returned.
AT+i!RP11
Returns a list of all Ad-Hoc networks available in the surrounding area.
Each line contains the following comma-separated fields:
SSID, security scheme, and signal strength. Security scheme for Ad-Hoc networks is
NONE. The Ad-Hoc network having the strongest signal appears first.
<SSID>, NONE, <signal_strength><CR><LF>
<SSID>, NONE, <signal_strength><CR><LF>
.
.
<SSID>, NONE, <signal_strength><CR><LF>
I/OK<CR><LF>
where
Report Status
AT+i Programmer‘s Manual Version 8.32 4-5
Report Option
Format
SSID Up to 32 alphanumeric characters
signal_strength 0 - low, 1 - good, 2 - excellent
For example:
Free Public WiFi,NONE,1
I/OK<CR><LF>
Note: If no Ad-Hoc networks are detected, only I/OK<CR><LF> is returned.
14
Returns a DHCP server table of MAC and IP addresses of all the stations connected to
iChip.
MAC Address IP Address
<MAC_Address_1> <IP_Address_1>
.
<MAC_Address_n> <IP_Address_n>
I/OK
For example:
MAC Address IP Address
00039406068C 192.168.0.2
000394094D1B 192.168.0.3
I/OK
19
Returns Analog-to-Digital Converter (ADC) pin status report. If the ADCP parameter is
set, the reports returns GPIO pin state. Otherwise, it returns the ADC value only.
ADC value=<level>, GPIO state=<state>
I/OK
where
level is an integer in the range 0-255 representing the input voltage measured on
the ADC pin, calculated as follows: (A/3.3V)*255=level, where A is the analog
input voltage.
state indicates the state of the output GPIO pin: 0 (High) | 1 (Low). GPIO state is
reported only if the ADCL, ADCT and ADCP parameters are set.
For example, if the ADCP parameter is set:
ADC value = 255, GPIO state = 0
I/OK
If the ADCP parameter is not set:
ADC value = 255
I/OK
20
Returns a list of all APs and Ad-Hoc networks available in the surrounding area.
Each line contains the following comma-separated fields:
<SSID>,ADHOC|AP,<BSSID>,<securitytype>,<channel>,<RSSI>
I/OK
where
<security type>=NONE | WEP | WPA | WPA2
<RSSI>=|SNR+NoiseFloor|
For example:
Jetta,AP,06:14:6C:69:4A:7C,WPA,1,25
RTL8186-default,AP,00:E0:4C:81:86:86,NONE,1,77
dlink_test,AP,00:1C:F0:9A:63:7A,NONE,1,68
Guest,AP,00:15:E9:0C:38:F2,WPA2,6,69
ABC,AP,00:1C:F0:40:CC:60,NONE,6,65
Yuval,AP,00:0E:2E:C6:B6:E1,NONE,6,62
GANG_TEST,AP,00:17:3F:9F:89:6E,NONE,7,67
Bora,AP,00:14:78:F7:11:BA,NONE,7,26
3com_test,AP,00:0F:CB:FF:27:8F,NONE,7,81
INET,AP,00:0F:CB:FF:7E:5D,WPA,7,82
Blue-I The Lab,AP,00:1B:2F:57:65:62,WEP,7,45
Mistral,AP,00:11:6B:3B:55:E2,WEP,9,27
Sirocco,AP,00:18:4D:DE:D7:DF,WPA2,11,44
Report Status
AT+i Programmer‘s Manual Version 8.32 4-6
Report Option
Format
Free Public WiFi,ADHOC,D2:B3:5B:06:CA:04,NONE,11,69
BlueI,AP,00:0E:2E:55:39:A6,WEP,11,57
private,AP,00:0E:2E:FD:F0:69,WPA,11,74
I/OK
Table 4-1 Report Status Message Format
Connection
AT+i Programmer‘s Manual Version 8.32 5-1
5 Connection
5.1 +iBDRA Forces iChip into Auto Baud Rate Mode
Syntax:
AT+iBDRA
Forces the iChip into auto baud rate mode. The following A, AT
or AT+i command (in any combination of upper or lowercase)
from the host will synchronize on the host‘s baud rate. iChip
supports auto baud rate detection for the following baud rates:
2400, 4800, 9600, 19200, 38400, 57600, and 115200.
Result code:
I/OK
This result code is sent using the previous baud rate.
Connection
AT+i Programmer‘s Manual Version 8.32 5-2
5.2 +iUP Initiate Internet Session
Syntax:
AT+iUP[:n]
Initiates an Internet session by going online. In a dialup/cellular
environment, a PPP Internet connection is established. Once
online, optionally goes through an IP registration process, as
determined by n.
Parameters:
n=0..1
Default:
n=0
Command Options:
n=0
Go online.
n=1
Go online and carry out the IP registration process according to
the relevant registration option parameters.
Result Code:
I/ONLINE
After successfully establishing an Internet session and completing
the IP registration (if requested).
I/ERROR
If iChip cannot go online and establish an Internet session or
cannot complete the requested IP registration.
Connection
AT+i Programmer‘s Manual Version 8.32 5-3
5.3 +iTUP Triggered Internet Session Initiation
Syntax:
AT+iTUP:<n>
Enter triggered Internet session initiation mode.
This command is relevant in a modem environment only.
Parameters:
n=0..2
Command Options:
n=0
Disable triggered Internet session initiation mode.
n=1
Enter triggered Internet session initiation mode. Upon receiving
a hardware signal trigger (Modem RING or MDSEL signal
pulled low), establish a PPP Internet connection and carry out
the IP registration process according to the relevant registration
option parameters.
If any characters are received on the host port prior to receiving
a hardware signal, iChip exits this mode and functions normally.
In this case, to reinstate this mode, issue AT+iTUP=1 again;
reset iChip by issuing the AT+iDOWN command, or recycle
power.
n=2
Always Online mode. Whenever iChip is offline, it
automatically attempts to establish a PPP Internet connection
and possibly carry out the IP registration process according to
the relevant registration option parameters.
iChip disregards this mode and remains offline until the next SW
or HW reset if:
The MSEL (Mode Select) signal was pulled low (logical 0)
for more than 5 seconds during runtime.
-or-
The host issues the (+++) escape sequence.
Power must be recycled or the AT+iDOWN command issued for
this command to take effect.
If iChip is in Auto Baud Rate mode (BDRF=a) and/or Auto Host
mode (HIF=0), iChip waits for the a character on the host serial
port to resolve the baud rate after rebooting and before activating
the iRouter and going online, or before activating the DHCP
server. Therefore, it is recommended to set a fixed host interface
and a fixed baud rate in this case.
Result Code:
I/OK
If n is within limits
I/ERROR
Otherwise
Connection
AT+i Programmer‘s Manual Version 8.32 5-4
Notes:
1. When going online in one of these modes, iChip activates its web server if the
AWS parameter is set (AWS>0).
2. In this mode, iChip does not go offline after a completion of any successful or
unsuccessful Internet session started by the host, even if the stay online flag is not used.
3. When a Carrier Lost event is detected, iChip automatically retries to establish a
connection (without performing a software reset), with the following exception: If, at the
time of the detection, the host was waiting for a reply from iChip or was in the process of
sending binary data (SSND, FSND, EMB), iChip reports error code 094 as soon as it can
and only then tries to re-establish the connection. In all other cases, iChip gives the host
no indication of losing the carrier. In the event of Carrier Lost, iChip closes any open
TCP active sockets, but leaves UDP sockets and TCP passive (listening) sockets intact
and updates their local IP if a new IP is assigned after establishing a new PPP connection.
iChip does not close any open Internet sessions (FTP/Telnet sessions and so on), nor
releases the handle of the active TCP sockets, thus giving the host a chance to read the
session errors and get buffered incoming data from active TCP sockets.
4. When the PFR is larger than 0 and the PDSn parameters are configured, iChip
verifies that it is online by sending PING messages to the PING destination servers
defined in PDSn at a polling frequency defined by PFR. If both PING destination servers
do not respond, iChip concludes that the Internet connection failed and tries to reestablish
an Internet connection, as described above for the case of a lost carrier signal.
Connection
AT+i Programmer‘s Manual Version 8.32 5-5
5.4 +iDOWN Terminate Internet Session
Syntax:
AT+iDOWN
Performs a software reset. Terminates an ongoing Internet
session, goes offline and returns to Command mode.
This command is useful in a dialup environment following a
command where the stay online flag (!) was specified.
All open sockets are closed and the web server deactivated.
Result Code:
I/OK
Followed by:
I/ERROR
After terminating the current Internet session when the command
caused iChip to abort an ongoing Internet activity or close an
active socket.
-or-
I/DONE
After terminating the current Internet session. Allow a 2.5 sec.
delay for iChip
re-initialization following an Internet mode session. Relevant for
iChip in dial-up mode only.
-or-
I/ONLINE
After terminating the current Internet session.
Connection
AT+i Programmer‘s Manual Version 8.32 5-6
5.5 +iPING Send a PING Request to a Remote Server
Syntax:
AT+iPING:<host>
Sends a two-byte ICMP PING request packet to the remote host
defined by host.
Parameters:
<host>=Logical name of the target host or a host IP address.
Command Options:
<host>
The host name may be any legal Internet server name, which can
be resolved by the iChip‘s DNS (Domain Name Server) settings.
The host name may also be specified as an absolute IP address
given in DOT form.
Result Code:
I/<RTT>
Upon successfully receiving an ICMP PING reply from the host,
the round trip time in milliseconds is returned (RTT). iChip allows
up to <PGT> milliseconds for a PING reply. If a reply is not
received within <PGT> milliseconds, iChip sends two more PING
requests, allowing <PGT> milliseconds for a reply on each of the
requests before reporting an error.
I/ERROR
Otherwise
E-mail Send Commands
AT+i Programmer‘s Manual Version 8.32 6-1
6 E-mail Send Commands
6.1 +iEMA Accept ASCII-Coded Lines for E-Mail Send
Syntax:
AT+i[!]EMA:<text lines>
Defines a plain text e-mail body.
Parameters:
<text lines>
Plain text e-mail body. The e-mail body contains <CR/LF>
terminated ASCII character strings. <text lines> must be
terminated by a dot character (.) in the 1st column of an otherwise
empty line.
Command Options:
<text lines>::={<ASCII text line><CRLF> …}<CRLF>.<CRLF>
Maximum size of <text lines> is limited to 18K, provided that no
additional system resources are in use.
EMA uses the specified SMTP server to send the e-mail message.
When iChip acquires TOD from a network timeserver, outgoing e-
mail messages are time and date stamped.
!
Stay online after completing the command
Result Code:
I/OK
After all text lines are received and terminated by the (.) line.
I/ERROR
If memory overflow occurred before all text lines are received.
Followed by:
I/DONE
After successfully sending the e-mail. Allow a 2.5 seconds delay
for iChip re-initialization following an Internet mode session.
-or-
I/ONLINE
After successfully sending the e-mail, if the stay online flag (!) is
specified.
-or-
I/ERROR
If some error occurred during the send session.
E-mail Send Commands
AT+i Programmer‘s Manual Version 8.32 6-2
6.2 +iEMB Accept Binary Data for Immediate E-Mail Send
Syntax:
AT+i[!]EMB[#]:<sz>,<data>
Defines and sends a MIME-encoded binary e-mail.
Parameters:
<sz>
size of <data> in bytes
<data>
<sz> bytes of binary data
Command Options:
<sz>
0..4GB
<data>
8 bit binary data. Must be exactly <sz> bytes long.
The binary data is encapsulated in a MIME-encoded e-mail
message. The receiving end views the binary data as a standard
e-mail attachment.
Several consecutive +iEMB commands can be issued in
sequence to create a larger aggregate of data to be sent.
The e-mail contents are completed by issuing an AT+iE*
(terminate binary e-mail) command. Following the first +iEMB
command, iChip establishes an Internet connection while the
data stream is being transmitted from the host. Once an SMTP
session is established, iChip maintains a data transmit pipeline
between the host and the SMTP server. iChip converts the
binary data using BASE64 encoding on-the-fly. Following this
command, the Internet session remains active to service
additional +iEMB commands, until the +iE* terminating
command.
EMB uses the specified SMTP server to send the e-mail
message. When iChip acquires TOD from a network
timeserver, outgoing e-mail messages are time and date
stamped.
!
Stay online after completing the command. This flag is
redundant, as the iChip defaults to staying online until the
AT+iE* command is issued.
#
Modem baud rate limit flag. When this character is included in
the command, the iChip baud rate to the modem is limited by
the baud rate from the host. This flag is relevant for serial
modems only and is especially useful in GSM modem
configurations. When this character is not present, the iChip
attempts to lift the baud rate to the modem to its maximal
value.
Result Code:
E-mail Send Commands
AT+i Programmer‘s Manual Version 8.32 6-3
I/OK
If <sz> is within limits and after <sz> bytes have been received
successfully.
I/ERROR
If <sz> is out of bounds, or if a communication error occurred
during the Internet session.
Notes:
If <sz> is larger than 256 bytes, iChip assumes host flow control. Depending on the
setting of the FLW parameter, the flow control mode is either software or hardware.
Under software flow control, the host processor must respond to iChip‘s flow control
characters. The software flow control protocol is detailed in the Host iChip
Software Flow Control section later in this document. When software flow control is
active, it is recommended to set the iChip to Echo-Off mode. Under hardware flow
control, the ~CTS/~RTS RS232 control signals must be connected and the host must
respond to the iChip‘s ~CTS signal. The host may send data only when the ~CTS
signal is asserted (active low). If a transmission error occurs while in hardware flow
control, iChip continues receiving all remaining <sz> bytes before returning the
I/ERROR response.
Some SMTP servers limit e-mail message size to a value that is lower than iChip‘s
limitations.
E-mail Send Commands
AT+i Programmer‘s Manual Version 8.32 6-4
6.3 +iE* Terminate Binary E-Mail
Syntax:
AT+i[!]E*
Terminates the current binary e-mail attachment.
Command Options:
!
Stay online after completing the command
Result Code:
I/OK
If a binary e-mail attachment is in the process of being
defined. The e-mail message is terminated and the SMTP
session is then completed and closed.
I/ERROR
Otherwise
Followed by:
I/DONE
After successfully sending the e-mail. Allow a 2.5 seconds
delay for iChip re-initialization following an Internet mode
session.
-or-
I/ONLINE
After successfully sending the e-mail, if the stay online flag
(!) is specified.
-or-
I/ERROR
If some error occurred during the send session.
E-Mail Retrieve
AT+i Programmer‘s Manual Version 8.32 7-1
7 E-Mail Retrieve
7.1 +iRML Retrieve Mail List
Syntax:
AT+i[!]RML
Retrieves pending e-mail list from current mailbox.
Command Options:
!
Stay online after completing the command
Result Code:
I/OK
To acknowledge successful receipt of the command.
I/ERROR
Otherwise
Returns:
I/MBE
If the mailbox is empty.
Otherwise:
A list of qualifying e-mail message descriptors, separated by
<CR/LF>. An e-mail message descriptor is composed of 5
<TAB> separated fields:
<i><TAB><sz><TAB><date><TAB><sbjct string>
<TAB><type/subtype><CR/LF>
where,
<i> - E-mail message index in mailbox
<sz> - E-mail message size in bytes
<date> - E-mail message date (for the date field format refer
to RFC822)
<sbjct string> - E-mail message subject string (limited to
128 bytes)
<type/subtype> - MIME content type. The literal NONE is
used for non-MIME e-mail messages.
E-mail messages that qualify the E-Mail Delete Filter
(DELF) are not listed.
Followed by:
I/DONE
After successfully retrieving the e-mail list. Allow a 2.5
seconds delay for iChip re-initialization following an
Internet mode session.
-or-
I/ONLINE
After successfully retrieving the e-mail list, if the stay online
flag (!) is specified.
I/ERROR
Otherwise
E-Mail Retrieve
AT+i Programmer‘s Manual Version 8.32 7-2
7.2 +iRMH Retrieve Mail Header
Syntax:
AT+i[!]RMH[:i]
Retrieves header of e-mail message <i> from current mailbox.
Parameters:
i
Optional e-mail message index of a qualifying message. If no
parameter is used, all e-mail headers are retrieved.
Command Options:
i
Optional index of a qualifying message, as reported by
AT+iRML.
!
Stay online after completing the command
Default:
Retrieves headers of all pending qualified mail messages.
Result Code:
I/OK
When command is received and about to be processed.
I/ERROR
Otherwise
Returns:
I/MBE
If the mailbox is empty.
Otherwise:
All header lines of all qualifying e-mail messages. Header
lines are returned as-is. A line containing solely a (.) (period)
in column 1 acts as a separator between the header lines of
each e-mail. The HDL parameter limits the number of header
lines per mail (HDL=0 specifies an unlimited number of lines
per e-mail). Header field syntax is described in RFC822 and
RFC2045.
Followed by:
I/DONE
After successfully retrieving the e-mail headers. Allow a 2.5
seconds delay for iChip re-initialization following an Internet
mode session.
-or-
I/ONLINE
After successfully retrieving the e-mail headers, if the stay
online flag (!) is specified.
-or-
I/ERROR
Otherwise
E-Mail Retrieve
AT+i Programmer‘s Manual Version 8.32 7-3
7.3 +iRMM Retrieve Mail Message
Syntax:
AT+i[!]RMM[:i]
Retrieves contents of e-mail message i from current mailbox.
Parameters:
i
Optional e-mail message index of a qualifying message. If no
parameter is used, all e-mails are retrieved.
Command Options:
i
Optional index of a qualifying message, as reported by
AT+iRML.
!
Stay online after completing the command.
Default:
Retrieves all pending qualified mail messages.
Result Code:
I/OK
When command is received and about to be processed.
I/ERROR
Otherwise
Returns:
I/MBE
If the mailbox is empty.
Otherwise:
For each e-mail part:
(For plain-text e-mails without MIME attachments)
I/PART <text><TAB><plain><TAB><TAB>
<quoted-printable><CR/LF>
-or-
(For e-mails containing MIME attachments)
I/PART <media type><TAB><media subtype><TAB>
<filename><TAB> <encoding method><CR/LF>
-or-
(When XFH transfer e-mail headers is set to YES)
I/RCV
-or-
Followed by:
<e-mail message contents>
If the XFH parameter (transfer e-mail headers) is set to YES,
all e-mail contents are returned as-is. The e-mail‘s headers
followed by the e-mail‘s body are retrieved. MIME
encapsulated e-mail messages are retrieved without BASE64
decoding. It is assumed that when the XFH parameter is set to
YES, the host processor attends to all e-mail field parsing and
contents decoding.
If the XFH parameter is set to NO, only the
E-Mail Retrieve
AT+i Programmer‘s Manual Version 8.32 7-4
email‘s body (contents) are retrieved. If the email message
contains a MIME-encapsulated attachment encoded in
BASE64, iChip performs the decoding and transfers pure
binary data to the host. Binary attachments encoded in a
scheme other than BASE64 are returned as-is.
E-mails that qualify the Delete E-Mail Filter (DELF) are
deleted from the mailbox without being downloaded.
Followed by:
I/EOP
End of Part Message, if message is prefixed with an I/PART
line.
This repeats itself for all e-mail parts.
Followed by:
I/EOM
End of Message
This repeats itself for all qualifying e-mail messages.
When all messages
have been retrieved:
I/DONE
After successfully retrieving the e-mail. Allow a 2.5 seconds
delay for iChip re-initialization following an Internet mode
session.
-or-
I/ONLINE
After successfully retrieving the e-mail, if the stay online flag
(!) is specified.
-or-
I/ERROR
Otherwise
E-Mail Retrieve
AT+i Programmer‘s Manual Version 8.32 7-5
E-Mail Receive (RMM) Flow Diagram
Issue
AT+iRMM
Fetch next
Line
Fetch next
Line
END
END Parse Part
Fields
Binary
Attachment
Part?
Fetch next
line
Line Belongs
to mail
Attachment
Base64
Encoding?
Last 5 Bytes
="I/EOP"
END
I/ERROR I/RCV I/DONE or
I/ONLINE I/PART I/EOM
I/Done Other
Other I/EOP
Yes No
Yes No
YesNo
I/MBE
Mailbox
is empty
Line belongs
to Mail
Receive
Mail
"AS-IS"
I/EOM
Mail
Message
Complete
Fetch Next
By te Receive decoded
binary data Mail Part
Complete
Line belongs
to Mail
Receive
Mail "AS-IS"
wait f or I/OK
Mail
Message
complete
Last 8 Bytes
="I/ERROR("
Yes
Receiv e
"nnn)"
No
Figure 7-1 E-Mail Receive (RMM) Flow Diagram
HTTP Client Interface
AT+i Programmer‘s Manual Version 8.32 8-1
8 HTTP Client Interface
8.1 +iRLNK Retrieve Link
Syntax:
AT+i[!]RLNK[:URL]
Retrieves a file from a URL.
Parameters:
URL = Optional URL address, which specifies the host, path, and
source file to be retrieved.
URL address syntax:
―<protocol>://<host>[[:<port>]/[<abs_link>]/]‖
Command Options:
<protocol>
http or https
<host>
Host name or IP address
<port>
0..65535
If not specified, defaults to 80 for http and 443 for https.
<abs_link>
Path, filename, and file extension of the file to retrieve on the
designated host.
!
Stay online after completing the command.
Default:
Uses the URL address stored in the URL parameter.
Result Code:
I/OK
When command is received and about to be processed.
I/ERROR
Otherwise
Returns:
I/<sz><CR><LF>
Followed by:
<binary data stream>
where,
<sz> is the exact size of the <binary data stream> to follow.
If <sz> is unknown, iChip returns I/0 followed by the data stream.
When this is the case, the host must monitor for a timeout
condition of at least 5 seconds without any data being transmitted
before seeing one of the terminator lines described under
‗Followed by‘.
Followed by:
I/DONE
After successfully retrieving the file. Allow a 2.5 seconds delay
for iChip re-initialization following an Internet mode session.
-or-
I/ONLINE
After successfully retrieving the file, if the stay online flag (!) is
HTTP Client Interface
AT+i Programmer‘s Manual Version 8.32 8-2
specified.
-or-
I/ERROR
Otherwise. (Always preceded by a 5 seconds silence period.)
HTTP Client Interface
AT+i Programmer‘s Manual Version 8.32 8-3
8.2 +iSLNK Submit A POST Request to A Web Server
Syntax:
AT+i[!]SLNK:<text>
Submits a plain text POST request to a web server defined
in the URL parameter. The ―Content-type:‖ field of the
POST request is defined by the CTT parameter.
Parameters:
<text> = Plain text POST request body containing
<CR[LF]> terminated ASCII character strings. <text> must
be terminated by a dot character (.) in the first column of an
otherwise empty line.
Command Options:
<text>
<ASCII text line><CRLF> …<CRLF>.<CRLF>
Maximum size of <text> depends on the amount of memory
available in the specific iChip. SLNK uses the URL address
stored in the URL parameter to send the POST request.
!
Stay online after completing the command.
Result Code:
I/OK
After all text lines are received from the host.
I/ERROR
If a memory overflow occurred before all text lines are
received.
SerialNET Mode Initiation
AT+i Programmer‘s Manual Version 8.32 9-1
9 SerialNET Mode Initiation
9.1 +iSNMD Activate SerialNET Mode
Syntax:
AT+i[! | @]SNMD
Activates SerialNET mode. Instead of using the optional (!)
and (@) flags, you can use the following syntax:
AT+iSNMD=1 is equivalent to AT+iSNMD
AT+iSNMD=2 is equivalent to AT+i!SNMD
AT+iSNMD=3 is equivalent to AT+i@SNMD
AT+iSNMD=4 causes iChip to enter SerialNET-over-
TELNET mode
Command Options:
AT+i!SNMD
-or-
AT+iSNMD=2
Optional Auto-Link mode. When this flag is specified, iChip
immediately goes online when activating SerialNET mode
(even when serial data has not yet arrived). If the LPRT
(Listening Port) parameter is defined, iChip opens the
listening port and awaits a connection. If LPRT is not defined,
but HSRV (Host Server) is defined, iChip immediately opens
a SerialNET socket link to the server.
AT+i@SNMD
-or-
AT+iSNMD=3
Optional Deferred Connection mode. When this flag is
specified, iChip automatically goes online (as in the case of
AT+i!SNMD). However, if the HSRV parameter is defined, a
socket is not opened until data arrives on the local serial port.
If the SerialNET mode listening port is defined (LPRT), iChip
opens a listening socket and waits for a remote connection
during the idle period before data arrives on the local serial
port.
When the SerialNET socket type (STYP) is TCP and serial
data arrives, iChip buffers the data in the MBTB Buffer and
tries to connect to HSR0. If HSR0 does not respond, iChip
tries HSR1, then HSR2. If all three connection attempts fail,
iChip retries them all. After three full retry cycles, iChip
dumps the MBTB buffer and remains idle until new serial
data arrives.
AT+iSNMD=4
Optional SerialNET over TELNET mode. In this mode, iChip
opens a data socket as a TELNET socket, which allows
negotiations of TELNET options over the same socket while
the host is sending and receiving raw data only. This mode
partially supports the RFC2217 standard. For more
information about this mode, refer to the SerialNET over
TELNET description.
SerialNET Mode Initiation
AT+i Programmer‘s Manual Version 8.32 9-2
Note: Before entering SerialNET mode, you must set iChip‘s Host Interface to
USART0 (HIF=1) or USART1 (HIF=2).
Result Code:
I/OK
If all minimum required parameters for SerialNET mode
operation are defined (HSRV or LPRT and, in a modem
environment, also ISP1, USRN, PWD)
I/ERROR
Otherwise
Followed by:
I/DONE
After successfully activating SerialNET mode when using.
Allow a 2.5 seconds delay for iChip re-initialization.
-or-
I/ONLINE
After successfully activating SerialNET mode. Allow a 2.5
seconds delay for iChip re-initialization.
-or-
I/OFFLINE
After successfully activating SerialNET Auto-Link mode (!)
or Deferred Connection mode (@) with LAN
communications, and a LAN link is not detected at the time
that iChip enters the new mode.
Note: To terminate SerialNET mode, issue the ESC sequence (+++),or pull the MSEL
signal low for more than 5 seconds. After exiting SerialNET mode, iChip returns to
normal AT+i command mode.
Web Server Interface
AT+i Programmer‘s Manual Version 8.32 10-1
10 Web Server Interface
10.1 +iWWW Activate Embedded Web Server
Syntax:
AT+iWWW[:n]
Activates iChip‘s internal web server.
Parameters:
<n>=Web browser backlog. n represents the number of browsers
that can connect to iChip‘s internal web server simultaneously at
any given time.
Command Options:
<n>=1..3
Default:
<n>=1
Returns:
I/(<Local IP addr>)
where,
<Local IP addr> is the iChip local IP address.
Note: If the web server is already open, then I/(<Local IP addr>)
is returned without any action taken.
In a dial-up environment, iChip goes online and the <local IP
addr> is assigned dynamically by the ISP.
In an LAN environment, the IP address is assigned by a DHCP
server or configured by the DIP parameter.
I/ERROR
If connection to the Internet failed.
Web Server Interface
AT+i Programmer‘s Manual Version 8.32 10-2
10.2 +iWNXT Retrieve Next Changed Web Parameter
Syntax:
AT+iWNXT
Retrieves the Parameter Tag name and new value of the next
changed application web parameter, which has not been retrieved
since it has been changed by the remote browser.
Returns:
<Parameter Tag>=<New Value> <CR><LF>
When there are no more remaining changed parameters, a blank
<CR><LF> terminated line is returned.
Followed by:
I/O
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-1
11 File Transfer Protocol (FTP)
11.1 +i[@]FOPN FTP Open Session
Syntax:
AT+i[@]FOPN:<server>[,<port>]:<user>,<pass>[,<accnt>]
Opens an FTP link to an FTP server.
Parameters:
<server>
Logical name of the FTP or the server‘s IP address.
<port>
Optional FTP port in the range 0..65535.
<user>
FTP user‘s name
<pass>
FTP user‘s password
<accnt>
Optional FTP account
Command Options:
<server>
The server name may be any legal Internet-server name, which
can be resolved by the iChip‘s DNS (Domain Name Server)
settings. The server name may also be specified as an absolute IP
address given in DOT form.
<port>
Specifies the FTP server‘s listening port. If not specified, port 21
(decimal) is assumed.
<user>
User‘s name string. This must be a registered user on the FTP
server. Some servers allow anonymous login, in which case
user=anonymous.
<pass>
Password to authenticate user. If special characters are used, the
password must be specified within quotes. It is customary that
servers that allow anonymous login request an e-mail address as a
password.
<accnt>
Some FTP servers require an account in order to allow a certain
subset of the commands. In this case, the account name must be
specified when opening the FTP link.
@
The optional @ is used to flag the Force PASV mode. When @ is
specified, iChip only uses the PASV method when opening a data
socket to server for FTP data transfer.
Result Code:
I/<FTP handle>
Upon successfully connecting to the FTP Server and
authenticating the user, a socket handle is returned. The handle
<FTP handle> is used to reference the FTP session in all
following FTP commands.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-2
11.2 +iFDL FTP Directory Listing
Syntax:
AT+iFDL:<F_hn>[,<path>]
Returns a full FTP directory listing.
Parameters:
<F_hn>
An open FTP session handle
<path>
Directory or filename wild card
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode session.
<path>
Optional directory name or filename wild card. If <path> is a
directory, that directory‘s files are listed. If it is a filename wild
card, only matching filenames in the current directory are listed.
If <path> is not specified, the current directory is listed in full.
Result Code:
I/OK
To acknowledge successful receipt of the command.
I/ERROR
If <F_hn> is not an open FTP session or otherwise some error
has occurred.
Returns:
A list of filenames with file attributes. Each file is listed on a
separate line, terminated by <CR/LF>. The file data line syntax
is FTP server-dependant.
Followed by:
I/ONLINE
After successfully retrieving the directory list.
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-3
11.3 +iFDNL FTP Directory Names Listing
Syntax:
AT+iFDNL:<F_hn>[,<path>]
Returns the FTP directory name list.
Parameters:
<F_hn>
An open FTP session handle
<path>
Optional directory or filename wild card
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode session.
<path>
Optional directory name or filename wild card. If <path> is a
directory, that directory‘s files are listed. If it is a filename wild
card, only matching filenames in the current directory are listed.
If <path> is not specified, the current directory is listed in full.
Result Code:
I/OK
To acknowledge successful receipt of the command.
I/ERROR
If <F_hn> is not an open FTP session or otherwise some error
has occurred.
Returns:
A bare list of filenames. Each file name is listed on a separate
line, terminated by <CR/LF>. No attributes are returned in
addition to the filename.
Followed by:
I/ONLINE
After successfully retrieving the directory list.
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-4
11.4 +iFMKD FTP Make Directory
Syntax:
AT+iFMKD:<F_hn>,<path>
Creates a new directory on the FTP server‘s file system.
Parameters:
<F_hn>
An open FTP session handle
<path>
Directory pathname
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<path>
Directory name. A new directory will be created under the
current directory, as indicated by path. If path includes
nonexistent subdirectories, some FTP servers will create them
as well.
Result Code:
I/OK
To acknowledge successful completion of the command.
I/ERROR
If <F_hn> is not an open FTP session or otherwise some error
has occurred.
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-5
11.5 +iFCWD FTP Change Working Directory
Syntax:
AT+iFCWD:<F_hn>,<path>
Changes the current FTP working directory.
Parameters:
<F_hn>
An open FTP session handle
<path>
New directory path name
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode session.
<path>
Absolute or relative path name of the new directory. The special
directory ―..‖ signifies ―one directory up‖.
Result Code:
I/OK
After successfully changing the working directory.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-6
11.6 +iFSZ FTP File Size
Syntax:
AT+iFSZ:<F_hn>,<path>
Reports an FTP file size.
Parameters:
<F_hn>
An open FTP session handle
<path>
File pathname
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<path>
Absolute or relative path name of the remote file.
Result Code:
I/<file size>
iChip reports path‘s file size in bytes if the file exists and the
FTP server supports the file size FTP command. Followed by:
I/OK.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-7
11.7 +iFRCV FTP Receive File
Syntax:
AT+iFRCV:<F_hn>,<path>
Downloads a file from an FTP server.
Parameters:
<F_hn>
An open FTP session handle
<path>
File pathname
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<path>
Absolute or relative path name of the remote file.
Result Code:
I/OK
When command has been received and about to be processed.
I/ERROR
If <F_hn> is not an open FTP session or otherwise some error
has occurred.
Followed by:
I/ERROR
If the FTP RECV command could not be processed.
-or-
I/<sz><CR><LF>
Followed by:
<data stream>
where,
<sz> is the exact size (in bytes) of the <data stream> to follow.
If <sz> cannot be determined, iChip returns I/0 followed by the
data stream. When this is the case, the host must monitor for a
timeout condition of at least 5 seconds without any data being
transmitted before seeing the I/ONLINE to deduce that the
data stream is complete.
If <sz> was reported but a transmission error occurred,
preventing the iChip from returning all <sz> data bytes an
I/ERROR command is issued after a 5 seconds non-
transmission period. See FTP Receive Flow Diagram.
Followed by:
I/ONLINE
After successfully retrieving file contents.
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-8
11.8 +iFSTO FTP Open File for Storage
Syntax:
AT+iFSTO:<F_hn>,<path>[,<sz>]
Opens a remote FTP server file for upload.
Parameters:
<F_hn>
An open FTP session handle
<path>
Destination file pathname
<sz>
Optional size in bytes to reserve for the file on the remote FTP
server
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode session.
<path>
Absolute or relative path name of the remote destination file.
Following this command data is transferred to the remote file
using one or more +iFSND commands. The file transfer is
complete by issuing a +iFCLF (FTP File Close) command.
Result Code:
I/OK
If file <path> was successfully opened for writing on the FTP
server.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-9
11.9 +iFAPN FTP Open File for Appending
Syntax:
AT+iFAPN:<F_hn>,<path>[,<sz>]
Opens an existing remote FTP server file for Append.
Parameters:
<F_hn>
An open FTP session handle
<path>
File pathname
<sz>
Size in bytes to reserve for the file on the server
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<path>
Absolute or relative path name of the remote destination file.
Following this command data is transferred to the remote file
using one or more +iFSND commands. The file transfer is
complete by issuing a +iFCLF (FTP File Close) command.
Result Code:
I/OK
If file <path> was successfully opened for appending on the
FTP server.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-10
11.10 +iFSND FTP Send File Data
Syntax:
AT+iFSND:<F_hn>,<sz>:<stream…>
Uploads data to a remote FTP server file. Valid only after a
successful AT+iFSTO or AT+iFAPN command.
Parameters:
<F_hn>
An open FTP session handle
<sz>
The exact size of the data stream that follows
<stream>
A byte stream of size <sz> composing the remote file contents
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<stream>
An 8-bit byte stream of exactly size <sz>. If <sz> is larger than
256 bytes, iChip assumes host flow control. Depending on the
setting of the FLW parameter, the flow control mode is either
software or hardware. Under software flow control mode, the
host processor must respond to iChip‘s flow control characters.
The flow control protocol is detailed in the ―Host iChip
Software Flow Control‖ section later in this document. When
software flow control is active, it is recommended to set iChip
to Echo-Off mode.
Under hardware flow control, the ~CTS/~RTS RS232 control
signals must be connected and the host must respond to iChip‘s
~CTS signal. The host may send data only when the ~CTS
signal is asserted (active low).
Several consecutive +iFSND commands may be issued in
sequence to create a larger aggregate of data to be sent.
The file transfer is complete by issuing a +iFCLF (FTP Close
File) command.
Result Code:
I/OK
After <sz> bytes have been transferred successfully to the FTP
data socket.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-11
11.11 +iFCLF FTP Close File
Syntax:
AT+iFCLF:<F_hn>
Closes a file downloaded to a remote FTP server. Only valid
after a successful AT+iFSTO or AT+iFAPN command and
optional AT+iFSND commands.
Parameters:
<F_hn>
An open FTP session handle
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
Result Code:
I/OK
After successfully closing the file.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-12
11.12 +iFDEL FTP Delete File
Syntax:
AT+iFDEL:<F_hn>,<path>
Deletes a remote FTP file.
Parameters:
<F_hn>
An open FTP session handle
<path>
File pathname
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
<path>
Absolute or relative pathname of the remote destination file to
delete.
Result Code:
I/OK
After successfully deleting the remote file.
I/ERROR
Otherwise
File Transfer Protocol (FTP)
AT+i Programmer‘s Manual Version 8.32 11-13
11.13 +iFCLS FTP Close Session
Syntax:
AT+i[!]FCLS:<F_hn>
Closes the FTP link.
Parameters:
<F_hn>
An open FTP session handle
Command Options:
<F_hn>
Must have been obtained by a previous execution of an
AT+iFOPN command during the current Internet mode
session.
!
Stay online after completing the command
Result Code:
I/OK
When command has been received and about to be processed.
Followed by:
I/DONE
When the FTP link was the last open socket and after
successfully closing the FTP link. Allow a 2.5 seconds delay
for iChip re-initialization following an Internet mode session.
-or-
I/ONLINE
After successfully closing the FTP link, when additional
sockets are still active or the stay online flag (!) is specified.
-or-
I/ERROR
Otherwise
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-1
12 Telnet Client
12.1 +iTOPN Telnet Open Session
Syntax:
AT+iTOPN:<server>
Opens a Telnet link (socket) to a Telnet server on port 23.
Parameters:
<server>
Logical name of the Telnet server or the server‘s IP address.
Command Options:
<server>
The server name can be any legal Internet Server name that
can be resolved by iChip‘s DNS (Domain Name Server)
settings. The server name may also be specified as an
absolute IP address given in DOT form.
Result Code:
I/OK
Upon successfully connecting to the remote Telnet server.
I/ERROR
Otherwise
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-2
12.2 +iTRCV Telnet Receive Data
Syntax:
AT+iTRCV[:<max>]
Receives data from the Telnet server.
Parameters:
<max>
Optionally specifies the maximum number of bytes to
transfer.
Result Code:
I/ERROR
If no Telnet session is open or otherwise some error has
occurred.
Returns:
I/<sz>[:<binary data stream>]
where,
<sz> is the exact size of the binary data stream to follow.
If the socket input buffer is empty, iChip returns I/O. In this
case the (:) and <binary data stream> are omitted.
<sz> is guaranteed to be equal or less than <max>, when
specified.
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-3
12.3 +iTSND Telnet Send Data Line
Syntax:
AT+iTSND:<data line>
Sends data to the remote Telnet server.
Parameters:
<data line>
A line of data bytes to be sent to the Telnet server. iChip
terminates the <data line> with a <CR><LF> and sends it to
the Telnet server.
Command Options:
<data line>
If the line to be sent incorporates iChip delimiter characters (,
; : ; = ; ~), <data line> must be enclosed in single (‗) or
double (―) quotes. AT+i command‘s terminating <CR> is
considered a terminating quote, as well.
Result Code:
I/OK
After the <data line> has been successfully sent to the Telnet
server.
I/ERROR
Otherwise
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-4
12.4 +iTBSN[%] Telnet Send A Byte Stream
Syntax:
AT+iTBSN[%]:<sz>:<stream>
Sends a byte stream of size <sz> to the Telnet server.
Parameters:
<sz>
The exact size of the byte stream that follows.
<stream>
A byte stream of size <sz> to be sent to the Telnet server.
Command Options:
<sz>
0..4GB
<stream>
An 8-bit byte stream of exactly size <sz>. If <sz> is larger
than 256 bytes, iChip assumes host flow control. Depending
on the setting of the FLW parameter, the flow control mode is
either software or hardware.
Under software flow control mode, the host processor must
respond to iChip‘s flow control characters. The flow control
protocol is detailed in the ―Host iChip Software Flow
Control‖ section later in this document.
Under hardware flow control, the ~CTS/~RTS RS232 control
signals must be connected and the host must respond to
iChip‘s ~CTS signal. The host may send data only when the
~CTS signal is asserted (active low).
%
When the auto-flush (‗%‘) flag is specified, the Telnet socket
is automatically flushed immediately after receiving the
<stream> from the host. Otherwise, data will be transmitted
to the Internet only in integral quantities of the specified
Maximum Transfer Unit (MTU) or when the AT+iTFSH
command is issued.
Result Code:
I/OK
After <sz> bytes have been transferred successfully to the
Telnet socket‘s output buffer.
I/ERROR
Otherwise
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-5
12.5 +iTFSH[%] Flush Telnet Socket’s Outbound Data
Syntax:
AT+iTFSH[%]
Flushes (immediately sends) all the data accumulated in a
Telnet socket‘s outbound buffer.
Command Options:
%
When the flush-and-acknowledge (‗%‘) flag is specified,
iChip flushes and waits for the Telnet server receipt
acknowledgment of all outstanding outbound data.
Result Code:
I/OK
If all outbound data has been received and acknowledged by
the Telnet server.
I/ERROR
Otherwise
Telnet Client
AT+i Programmer‘s Manual Version 8.32 12-6
12.6 +iTCLS Telnet Close Session
Syntax:
AT+i[!]TCLS
Closes the Telnet link.
Command Options:
!
Stay online after completing the command
Result Code:
I/OK
If an active Telnet socket exists.
Followed by:
I/DONE
When the Telnet link was the last open socket and after
successfully closing the Telnet link. Allow a 2.5 seconds
delay for iChip re-initialization following an Internet mode
session.
-or-
I/ONLINE
After successfully closing the Telnet link, when additional
sockets are still active or the stay online flag (!) is specified.
-or-
I/ERROR
Otherwise
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-1
13 Direct Socket Interface
13.1 +iSTCP Open and Connect A TCP Socket
Syntax:
AT+iSTCP:<host>,<port>[,<lport>]
Opens a Transmission Control Protocol (TCP) client socket
and attempts to connect it to the specified <port> on a server
defined by <host>.
Parameters:
<host>
Logical name of the target server or a host IP address
<port>
0..65535, target port
<lport>
Optional local port on iChip
Command Options:
<host>
The server name may be any legal Internet server name that
can be resolved by iChip‘s DNS (Domain Name Server)
settings. The server name can also be specified as an absolute
IP address given in DOT form.
<port>
It is assumed that the server system is listening on the specified
port.
<lport>
Can be optionally specified to force iChip to use lport as the
local port when opening the TCP socket. If unspecified, iChip
allocates a port from its internal pool1.
Result Code:
I/<sock handle>
Upon successfully opening and connecting the TCP socket to
the <host>:<port>, a socket handle is returned. The socket
handle <sock handle> is in the range 0..9 and used to reference
the socket in all following socket commands.
I/ERROR
Otherwise
The Socket Command Abort may be used to abort prematurely.
1Note: iChip uses the port range [1025 .. 2048] when assigning default local ports. The
host should refrain from specifying local ports in this range to ensure that Error 218 is not
generated as a result of requesting local ports that overlap internal assignments.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-2
13.2 +iSUDP Open A Connectionless UDP Socket
Syntax:
AT+iSUDP:<host>,<rport>[,<lport>]
Opens a UDP (User Datagram Protocol) socket and sets the
remote system‘s <host>:<port> address.
Parameters:
<host>
Logical name of the target server or a host IP address, or
0.0.0.0 to open a non-connected socket.
<rport>
Remote port number to send to, or 0 to open a non-connected
socket.
<lport>
Optional local UDP port to use.
Command Options:
<host>
The remote system‘s name may be any legal Internet server
name that can be resolved by iChip‘s DNS (Domain Name
Server) settings. The server name may also be specified as an
absolute IP address given in DOT form. When the <host> is
defined, the resulting UDP socket is created and connected. If
<host>=0.0.0.0, the socket is created but remains unconnected.
The first UDP packet to arrive automatically latches the
sender‘s IP port, in effect connecting the socket.
<rport>
Specifies the remote system‘s port.
<lport>
Specifies the local port to use. If unspecified, iChip allocates a
port from its internal pool.
Result Code:
I/<sock handle>
Upon successfully opening and connecting the UDP socket to
<host>:<port>, a socket handle is returned. The socket handle
<sock handle> is in the range 0..9 and used to reference the
socket in all following socket commands.
I/ERROR
Otherwise
The Socket Command Abort may be used to abort prematurely.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-3
13.3 +iLTCP Open A TCP Listening Socket
Syntax:
AT+iLTCP:<port>,<backlog>
Opens a TCP listening socket on the local IP address and the
specified port <port>. The <backlog> parameter specifies the
maximum number of remote concurrent connections allowed
through the listening socket.
Parameters:
<port>
0..65535
<backlog>
1..10
Command Options:
<port>
Listening port to be used by a remote system when connecting
to iChip.
<backlog>
Specifies the maximum number of active connections that may
be concurrently established through the listening socket.
Once the listening socket is open, it automatically accepts
remote connect requests up to the maximum allowed. When a
remote system connects through the listening socket, a new
TCP socket is spawned internally ready to send and receive
data. See the AT+iLSST command for details on retrieving the
handles of active sockets connected through a listening socket.
When a connected socket is closed by the host using the
AT+iSCLS command, the listening socket allows a new
connection in its place.
Result Code:
I/<sock handle>
Upon successfully opening a TCP listening socket, a socket
handle is returned. The socket handle <sock handle> is in the
range 10..11 and used to reference the socket in all following
socket commands.
I/ERROR
Otherwise
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-4
13.4 +iLSST Get A Listening Socket’s Active Connection Status
Syntax:
AT+iLSST:<hn>
Retrieves handles of active socket connections established
through the listening socket identified by <hn>.
Parameters:
<hn>
A TCP listening socket handle of an open listening socket.
Command Options:
<hn>
Must have been obtained by a previous AT+iLTCP command
during the current Internet session.
Result Code:
I/(<hn1>,…,<hnBacklog>)
A list of active socket handles. The list contains <backlog>
elements, where <backlog> was used when opening the
listening socket identified by <hn>.
Where,
<hni> >=0 : A handle to an active connected socket
=-1 : No connection has been established
I/ERROR
If <hn> is not an open listening socket, or otherwise some
error occurred.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-5
13.5 +iSST Get A Single Socket Status Report
Syntax:
AT+iSST:<hn>
Retrieves a socket status report for a single socket. This is a
subset of the general AT+iRP4 report command.
Parameters:
<hn>
A TCP/UDP socket handle
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP or AT+iSUDP command during the current Internet
mode session. Or a socket accepted by a listening socket.
Result Code:
I/(<sockstat>)
where,
sockstat >=0 Number of bytes pending in socket <hn>‘s input
buffer
sockstat <0 Socket error code
I/ERROR
If some error occurred
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-6
13.6 +iSCS Get A Socket Connection Status Report
Syntax:
AT+iSCS:<hn>
Retrieves a socket‘s connection status report without reporting
the number of buffered characters.
Parameters:
<hn>
A TCP/UDP socket handle
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP or AT+iSUDP command during the current
Internet mode session. Or a socket accepted by a listening
socket.
Result Code:
I/(<sockstat>)
where,
sockstat=000 Socket is connected without any associated
errors.
sockstat<0 Socket error code
I/ERROR
If some error occurred.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-7
13.7 +iSSND[%] Send A Byte Stream to A Socket
Syntax:
AT+iSSND[%]:<hn>,<sz>:<stream>[<checksum>]
Sends a byte stream of size sz to the socket specified by
the socket handle hn.
Parameters:
<hn>
A TCP/UDP socket handle of an open socket
<sz>
The exact size of the byte stream that follows
<stream>
A byte stream of size sz to be sent to the specified
socket. When iChip is in checksum mode (CKSM set to
1), the socket is UDP or when sending data over an SSL
socket, sz is limited to 2048 bytes.
<checksum>
A two-byte checksum. Checksum is calculated by
summing all the characters in stream modulo 65536 and
taking two‘s complement of the result. Checksum is sent
as big-endian. This parameter must be appended by the
host application when iChip is in checksum mode.
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP or AT+iSUDP command during the current
Internet mode session. Or a socket accepted by a
listening socket.
<sz>
Regular TCP socket: 0..4GB
SSL Socket, Checksum mode or UDP: 0..2048
<stream>
An 8-bit byte stream of exactly size sz. If sz is larger
than 256 bytes, iChip assumes host flow control.
Depending on the setting of the FLW parameter, the
flow control mode is either software or hardware.
Under software flow control mode, the host processor
must respond to iChip‘s flow control characters. The
flow control protocol is detailed in the ―Host iChip
Software Flow Control‖ section.
Under hardware flow control, the ~CTS/~RTS RS232
control signals must be connected and the host must
respond to iChip‘s ~CTS signal. The host may send data
only when the ~CTS signal is asserted (active low).
%
When the auto flush (%) flag is specified for a TCP
socket, the socket is automatically flushed immediately
after receiving the stream. Otherwise, data is transmitted
to the Internet only in integral quantities of the specified
Maximum Transfer Unit (MTU) or when the AT+iSFSH
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-8
command is issued. When using a UDP socket, every
SSND command generates and flushes a packet.
Result Code:
I/OK<CR><LF><CR><LF>
After sz bytes have been transferred successfully to the
socket‘s output buffer.
I/ERROR
Otherwise
Note: When iChip is in checksum mode, it calculates the checksum of the data received
from host and compares it with checksum sent by host. If the two match, the result code is
I/OK. Otherwise, I/ERROR (228) is returned and the data discarded. If host attempts to
send more than 2048 bytes, I/ERROR (227) is returned.
The Socket Command Abort may be used to abort prematurely.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-9
13.8 +iSRCV Receive A Byte Stream from A Socket’s Input
Buffer
Syntax:
AT+iSRCV:<hn>[,<max>]
Receives a byte stream from the TCP/UDP socket
specified by the socket handle hn. Received data is
valid only if it already resides in iChip‘s socket input
buffer at the time this command is issued.
Parameters:
<hn>
A TCP/UDP socket handle of an open socket
<max>
Optionally specifies the maximum number of bytes to
transfer. Additional bytes may remain in the socket
input buffer following this command.
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP or AT+iSUDP command during the
current Internet mode session. Or a socket accepted by
a listening socket.
<max>
If <max> is not specified, all available bytes residing
in the socket input buffer are returned.
Returns:
I/<sz>[:<stream>][<checksum>]
where,
sz is the exact size of the binary data stream to follow.
If the socket input buffer is empty, iChip returns
I/O<CR><LF>. In this case, stream is omitted.
sz is guaranteed to be equal or less-than max, when
specified.
checksum is a two-byte checksum. This parameter is
calculated by iChip only when it is in checksum mode
(CKSM set to ‗1‘). checksum is calculated by
summing all the characters in stream modulo 65536
and taking two‘s complement of the result. checksum
is sent as big-endian. The host application is assumed
to calculate its own checksum upon receipt of stream
and compare it against the checksum bytes received
from iChip. If the two checksums don‘t match, the
host can issue an AT+i!SRCV command, which
causes iChip to re-transmit the data. The next
AT+iSRCV command that the host issues causes
iChip to dump all data transmitted to host in the
previous AT+iSRCV command.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-10
I/ERROR
If <hn> is not an open socket, or otherwise some error
occurred.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-11
13.9 +iGPNM Get Peer Name for A Specified Socket
Syntax:
AT+iGPNM:<hn>
Retrieves peer name (<IP>:<Port>) of a remote connection to a
TCP/UDP socket specified by the socket handle <hn>.
Parameters:
<hn>
A TCP/UDP socket handle of an open socket
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP or AT+iSUDP command during the current Internet
mode session. Or a socket accepted by a listening socket.
Result Code:
I/(<IP>:<Port>)
where,
<IP> is the remote peer‘s IP address, and <Port> is the remote
peer‘s port for this connection.
I/ERROR
If <hn> is not an open socket handle, or otherwise some error
occurred.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-12
13.10 +iSDMP Dump Socket Buffer
Syntax:
AT+iSDMP:<hn>
Dumps all buffered data currently accumulated in a TCP
socket‘s inbound buffer. The socket remains open.
Parameters:
<hn>
A TCP socket handle of an open socket
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP command during the current Internet mode
session. Or a socket accepted by a listening socket.
Result Code:
I/OK
If <hn> is a handle to an open socket.
I/ERROR
Otherwise
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-13
13.11 +iSFSH[%] Flush Socket’s Outbound Data
Syntax:
AT+iSFSH[%]:<hn>
Flushes (immediately sends) accumulated data in a TCP
socket‘s outbound buffer.
Parameters:
<hn>
A TCP socket handle of an open socket
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iSTCP command during the current Internet mode session.
Or a socket accepted by a listening socket.
%
When the flush-and-acknowledge (%) flag is specified and
<hn> is a TCP socket handle, iChip flushes and waits for the
peer receipt acknowledgment of all outstanding outbound data.
Common errors associated with this flag are 215 (carrier lost)
and 203 (socket closed by peer in an orderly manner or did not
receive ACK after repeated attempts to retransmit
unacknowledged data).
Result Code:
I/OK
If <hn> is a handle to an open socket and, when <hn> is a TCP
socket handle, all outbound data has been received (and when
(%) flag specified also acknowledged) by peer.
I/ERROR
Otherwise
The Socket Command Abort may be used to abort prematurely.
Direct Socket Interface
AT+i Programmer‘s Manual Version 8.32 13-14
13.12 +iSCLS Close Socket
Syntax:
AT+i[!]SCLS:<hn>
Closes a TCP/UDP socket.
If the socket is the only open socket and the stay online flag (!) is
not specified, iChip terminates the Internet session and goes
offline.
Parameters:
<hn>
A TCP/UDP socket handle of an open socket
Command Options:
<hn>
Must have been obtained by a previous execution of an
AT+iLTCP, AT+iSTCP or AT+iSUDP command during the
current Internet mode session. Or a socket accepted by a
listening socket.
A socket is always flushed before being closed. TCP sockets are
disconnected from the remote host server in an orderly manner.
!
Stay online after completing the command.
Result Code:
I/OK
If <hn> is a handle to an open socket
I/ERROR
Otherwise
Followed by:
I/DONE
After successfully closing the last open socket. Allow a 2.5
seconds delay for iChip re-initialization following an Internet
mode session.
-or-
I/ONLINE
After successfully closing the socket, while additional sockets
are still open or if the stay online flag (!) is specified.
-or-
I/ERROR
Otherwise
Special Modem Commands
AT+i Programmer‘s Manual Version 8.32 14-1
14 Special Modem Commands
14.1 +iMCM Issue Intermediate Command to Modem
Syntax:
AT+iMCM[:<AT command>]
Sends a single AT command to the modem during an internet
session or enters Modem Command mode.
Parameters:
<AT command>
Optional single AT command to be sent to modem.
Command Options:
<AT command>
iChip puts the modem in command mode by issuing the (+++)
escape sequence and then sends <AT command> to the modem,
followed by a <CR>. <AT command> must include the AT prefix.
After receiving the modem‘s response, iChip restores the modem
to online operation mode by issuing the ATO command.
If <AT command> is not specified, iChip enters Modem
Command mode. In this mode, all following commands are
transferred as-is to the modem. Modem replies are relayed back to
the host processor. iChip does not translate the commands.
Modem Command mode is exited after the host issues the ATO
command. iChip transfers the ATO command to the modem and
relays the modem‘s response back to the host.
Returns:
Modem‘s responses including command echo, if enabled.
Followed by:
I/OK
When the modem successfully returns online.
I/ERROR
If modem was unable to go back online.
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-1
15 Wireless LAN Mode
The iChip includes a Wireless LAN driver for the Marvell 88W8686 802.11b/g WiFi
chipset. In addition, the iChip firmware contains WEP and WPA encryption of
WPA-PSK with TKIP and WPA2-PSK with AES for this chipset.
WPA security requires a parameter that contains the Personal Shared Key (PSK),
sometimes referred to as the passphrase. The Wireless LAN Passphrase (WLPP)
parameter is used to set the passphrase. When passphrase contains a value, iChip uses
WPA security when connecting to an Access Point (AP). Note, however, that for
WPA-PSK to be active, an SSID (+iWLSI parameter) must also be defined. This
parameter has precedence over WEP parameters. In other words, when WLPP contains a
value (and WLSI is defined) WPA is used even if WEP parameters are defined. The
maximum allowable wireless LAN transmission rate is determined by the WLTR
command.
The type of WPA protocol to be used is determined by the value of the WSEC parameter:
a ‗0‘ value means the WPA-TKIP protocol will be used, whereas a ‗1‘ value specifies the
WPA2-AES protocol.
Several commands, listed below, enable iChip to control the operation of the Marvell
WiFi chipset.
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-2
15.1 +iWLTR Wireless LAN Transmission Rate
Syntax:
AT+iWLTR=<tr>
Sets the maximum allowable wireless LAN transmission
rate.
After a SW reset, WLTR returns to its default value
(54 Mbps).
Parameters:
tr=0..13
Command Options:
tr=0
Maximum supported transmission rate (54 MBps)
tr=1
Limited to 1 Mbps
tr=2
Limited to 2 Mbps
tr=3
Limited to 5.5 Mbps
tr=4
Limited to 11 Mbps
tr=5
Reserved
tr=6
Limited to 6 Mbps
tr=7
Limited to 9 Mbps
tr=8
Limited to 12 Mbps
tr=9
Limited to 18 Mbps
tr=10
Limited to 24 Mbps
tr=11
Limited to 36 Mbps
tr=12
Limited to 48 Mbps
tr=13
Limited to 54 Mbps
Default:
0 (Maximum transmission rate)
Result Code:
I/OK
If tr=0..13
I/ERROR
Otherwise
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-3
15.2 +iWLPW Set WLAN Tx Power
Syntax:
AT+iWLPW=<n>
Sets the transmission power of the Marvell WLAN
chipset.
Parameters:
n=0-20
n=0
Use Marvell‘s automatic power level adaptation scheme.
n=1-20
Set a fixed transmission power level.
Default:
n=0
Result Code:
I/OK
If power set succeeded
I/ERROR (042)
-or-
I/ERROR (402)
If n is an illegal value
If power set failed
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-4
15.3 +iWRFU WLAN Radio Up
Syntax:
AT+iWRFU
Turns on radio transmission of the Marvell WLAN
chipset.
Parameters:
None
Result Code:
I/OK
If operation succeeded
I/ERROR (403)
Otherwise
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-5
15.4 +iWRFD WLAN Radio Down
Syntax:
AT+iWRFD
Turns off radio transmission of the Marvell WLAN
chipset.
Parameters:
None
Result Code:
I/OK
If operation succeeded
I/ERROR (403)
Otherwise
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-6
15.5 +iWRST Reset WLAN Chipset
Syntax:
AT+iWRST
Performs a hardware reset of the Marvell WLAN chipset.
Parameters:
None
Result Code:
I/OK
If operation succeeded
I/ERROR (404)
Otherwise
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-7
15.6 +iWLBM WLAN B Mode
Syntax:
AT+iWLBM
Sets the Marvell WLAN chipset to 802.11/b mode.
Allowable Tx transmission rates for this mode are: 1, 2,
5.5 and 11 Mbps.
Parameters:
None
Result Code:
I/OK
Always
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-8
15.7 +iWLGM WLAN G Mode
Syntax:
AT+iWLGM
Sets the Marvell WLAN chipset to 802.11/g mode.
Allowable Tx transmission rates for this mode are: 6, 9,
12, 18, 24, 36, 48 and 54 Mbps.
Parameters:
None
Result Code:
I/OK
Always
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-9
15.8 Roaming Mode
When set to operate in Roaming mode, iChip can roam seamlessly among Access Points
(APs) sharing the same SSID and the same security configuration without interrupting its
IP connectivity. iChip also has a monitoring mechanism that is sensitive to drops in AP
signal strength. When iChip detects such a drop, it automatically starts searching for APs
in its vicinity that have a stronger signal, while remaining connected to the current AP.
The following parameters are required to set iChip to Roaming mode:
WROM Enables Roaming mode.
WPSI Sets the time interval between consecutive scans that iChip performs for
APs in its vicinity.
WSRL Sets a low SNR threshold for iChip in Roaming mode.
WSRH Sets a high SNR threshold for iChip in Roaming mode.
In addition, two reports provide useful information pertaining to the Roaming feature:
AT+i!RP10 Returns a report of the current WLAN connection.
AT+iRP20 Returns a list of all APs and Ad-Hoc networks available in the vicinity.
15.8.1 iChip Behavior Following a Hardware or Software Reset
After power-up, hardware or software reset, iChip starts scanning for APs in its vicinity
at intervals set by the WPSI parameter. iChip reads the value set in the WLSI parameter
and acts accordingly:
If WLSI refers to an AP, iChip scans for all APs in its vicinity. iChip attempts to
connect to an AP whose SSID is listed first in the WSIn parameter. If several APs
having that same SSID exist, iChip attempts to connect to the one having the
strongest signal. If association succeeds, iChip stops scanning and activates its DHCP
client. It then monitors the SNR level of the AP it is associated with.
If WLSI refers to an Ad-Hoc network, iChip scans for all Ad-Hoc networks in its
vicinity. iChip attempts to join an Ad-Hoc network whose SSID is listed first in the
WSIn parameter. If no such network is found, iChip creates its own network and
stops scanning.
If WLSI is set to (*), iChip stops scanning and remains disconnected.
15.8.2 iChip Behavior when AP Signal Becomes Weak
When the beacon signal of the AP with which iChip is associated becomes weak (SNR
drops below the level set by the WSRL parameter), iChip starts its periodic scan for APs
having SNR above the threshold set by the WSRH parameter.
iChip attempts to connect to the AP that appears first on the list of SSIDs specified in the
WSIn parameter, while remaining connected to the current AP. If association with the
new AP fails, iChip continues scanning until it succeeds connecting to an AP with a
stronger signal.
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-10
When in Roaming mode, iChip does not restart its DHCP client process for new
connections.
When iChip is not in Roaming mode, iChip remains connected to an AP as long as it has
an open active socket, or until triggered by a Link Lost event. When not in Roaming
mode, iChip ignores any decrease in AP signal strength while having open active sockets.
When iChip is not in Roaming mode and no active sockets are open, iChip starts periodic
scanning for APs having an SNR level above the WSRH threshold. iChip attempts to
connect to the AP that has the highest priority. After associating with an AP, iChip starts
its DHCP client and monitors the SNR level of the AP it is associated with.
15.8.3 iChip Behavior in the Event of a Lost Link
If the connection is not active, iChip starts periodic scanning for APs and attempts to
connect to an AP having the highest priority. After associating to an AP, iChip starts its
DHCP client and monitors the SNR level of the AP it is associated with.
If the connection is active, iChip waits for an IP activity command from the host. When
such a command is sent, iChip performs a software reset and starts scanning for APs.
iChip responds with ERROR (074) to indicate that the current connection has been lost.
15.9 Multiple SSIDs
The Multiple SSIDs feature allows you to define an ordered list of SSIDs of Access
Points (APs) or Ad-Hoc networks with which iChip attempts to connect upon power-up.
Each SSID listed can have one of the following security types:
WEP-64
WEP-128
WPA-TKIP
WPA2-AES
No security
The following parameters allow you to define multiple SSIDs:
WSIn Defines an ordered list of allowable SSIDs.
WPPn Sets the Wireless LAN PSK passphrase for WPA and WPA2 encryption for
each individual SSID on the list.
WKYn Sets the Wireless LAN WEP key for each individual SSID on the list.
WSTn Sets the Wireless LAN security type for each individual SSID on the list.
Wireless LAN Mode
AT+i Programmer‘s Manual Version 8.32 15-11
15.10 iChip Power Save Mode
iChip has a Power Save mode for achieving energy savings. You enable Power Save
mode by setting the PSE parameter to any value n between 1 and 255 seconds. When n
seconds have elapsed without any activity on the host or modem serial ports, iChip shuts
down most of its circuits. Renewed activity on the serial ports, or incoming data from the
LAN, restores iChip to full operational mode.
If, in addition, the WLPS parameter is set to any value m between 1 and 5, iChip can
force the Marvell WiFi chipset into either Power Save or Deep Sleep mode:
If iChip is currently associated with an AP, or is configured to operate in Ad-Hoc
mode, iChip will force the Marvell chipset into Power Save mode. In Power Save
mode, the Marvell chipset will go to sleep for m beacon periods when no
communication has taken place (command, Tx, or Rx activity) for one full beacon
period.
If iChip is not associated with an AP, iChip will force the Marvell chipset into Deep
Sleep mode. iChip will perform a periodic scan every p seconds, as set by the WPSI
parameter, for APs in its vicinity. If it fails to locate and associate with an AP, it will
wait for n seconds, as set by the PSE parameter, before forcing the Marvell chipset
back to Deep Sleep.
IP Registration
AT+i Programmer‘s Manual Version 8.32 16-1
16 IP Registration
When iChip goes online in a dial-up environment, it is normally assigned a dynamic IP
address during PPP establishment. Since a different IP address is usually assigned every
session, it is not practical to use iChip as a server, since the clients do not know what IP
address to use. Furthermore, under these restrictions, there is no practical way to know
whether a specific system is online or offline. A similar problem occurs when using the
iChip LAN, which is configured to use a DHCP server. In this environment, a different IP
address is usually assigned every time the iChip LAN boots and connects to the LAN.
To overcome this problem, iChip incorporates built-in procedures designed to register its
IP address on a server system each time it goes online. Once registered, client systems
may interrogate the servers in order to verify the online status of a specific system and
retrieve its currently assigned IP address. The IP registration process is governed by
several AT+i parameters. Once these parameters are configured, iChip registers its IP
address accordingly when it goes online as a result of an explicit AT+i command
(AT+iUP) or as a result of automated Internet session establishment procedures, such as a
triggered Internet session or when going online as a SerialNET mode server.
In cases where iChip uses a NAT gateway to the Internet, it can be configured to register
the NAT‘s IP address and a special port that is linked to iChip in the NAT‘s
configuration. See details in the RRRL parameter description. When this is the case, the
RRRL parameters (IP and port) are used instead of the local IP and port values that iChip
is assigned, in all registration methods (RRMA, RRSV, and RRWS).
iChip includes several IP registration methods, as described below.
16.1 E-Mail Registration
iChip registers itself by sending an e-mail that contains its ID information and current IP
address. When the RRMA parameter contains an e-mail address, iChip sends an e-mail
containing its current IP address or its RRRL to the address defined in RRMA during the
registration procedure. The syntax of the e-mail body is:
<BDY parameter contents>
iChip-<D/L/S> S/N:<RP5> Version:<RP1> HN:<HSTN> IP:<IPA or RRRL>
Port:<LPRT or 80 or 0> http:// <IPA or RRRL><CR><LF>
The subject line of the e-mail is:
"RING RESPONSE LINK From: iChip-<D/L/S> S/N:<RP5> Version:<F/W ver>
HN:<HSTN> IP:<IPA or RRRL> Port:<LPRT or 80 or 0>"
where,
Port is LPRT if in SerialNET mode; 80 if not in SerialNET mode and AWS is enabled,
and 0 if not in SerialNET mode and AWS=0. The receiving end may refer to the contents
of the subject line to filter out this e-mail message.
IP Registration
AT+i Programmer‘s Manual Version 8.32 16-2
16.2 Socket Registration
iChip registers itself by opening a socket to a registration server and sending its ID
information and current IP address. When iChip‘s RRSV parameter contains a value,
iChip establishes a socket to the server defined in RRSV during the registration
procedure. When a socket is established, iChip transmits its ID information and current IP
address (or the RRRL) in the following format:
“iChip-<D/L/S> S/N:<RP5> version: <RP1> HN:<HSTN> IP:<IPA or RRRL>
Port:<LPRT or 80 or 0>”
The registration socket is then closed.
16.3 Web Server Registration
iChip registers itself by surfing to a web server with its ID information and current IP
address as parameters.
If the RRWS parameter contains a URL (of a registration web server), iChip registers its
ID information and IP using the URL by issuing a GET command along with a fixed
format parameter line:
“<RRWS path>?SN=<RP5>&IP=<IPA or RRRL>&WPt=<0 or the port defined in
RRRL>&HN=<HSTN>”.
The web server must contain a CGI, .asp page, exe, etc., which make use of these
parameters to register the iChip.
If several registration parameters are configured, iChip goes through multiple registration
processes. If more than one registration process fails, iChip returns an I/ERROR
describing the first failure encountered. If all registrations fail, iChip returns
I/ERROR(90).
DHCP Client
AT+i Programmer‘s Manual Version 8.32 17-1
17 DHCP Client
A DHCP client component in iChip in LAN mode supports IP and server name
acquisition from a standard DHCP Server. The iChip device attempts to contact and
acquire server names from a DHCP server if and when its DIP (Default IP) parameter
contains the special value 0.0.0.0.
When the DHCP acquisition procedure is successful, the iChip‘s IPA (IP Address)
parameter contains the assigned IP address retrieved from the DHCP server. In addition,
server names relevant to iChip parameters are retrieved from the DHCP server, if and
only if they contain empty values at power-up (see table below). Parameters that contain
non-empty values retain those values. In addition, DNS values retrieved from the DHCP
server are retained as additional alternative DNS addresses when DNSn contain user-
defined values.
Parameter Name
Function
Empty Value
IPG
Gateway
0.0.0.0
SNET
Subnet Mask
0.0.0.0
DNS1
Primary Domain Name Server
0.0.0.0
DNS2
Secondary Domain Name Server
0.0.0.0
SMTP
Email Send Server
‗‘ (Empty String)
POP3
Email Receive Server
‗‘ (Empty String)
Table 17-1: Server Names Acquired from DHCP Server
All values acquired from the DHCP server are not retained as nonvolatile values. New
values shall be acquired during the next DHCP session, which will be activated during
the next iChip power-up, following a soft or hard reset or after the DHCP lease expires.
The DHCP client has two associated points in time when the DHCP server is contacted
for additional negotiations. At T1 (usually after half the original lease period), iChip
attempts to renew the lease period. If the renewal procedure fails, at T2 (usually after 7/8
the original lease period) iChip attempts to re-negotiate the lease. If the procedures at T1
and T2 fail and the lease expires, iChip continuously tries to locate a DHCP server for re-
negotiation. When this is the case, iChip stores 0.0.0.0 in the IPA parameter and cannot
communicate on the LAN until a DHCP server is found and IP and server names are
acquired.
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 18-1
18 DHCP Server
iChip‘s DHCP server allows it to assign IP addresses and manage a network segment
when no DHCP server is available. iChip‘s DHCP server can handle a pool of up to 255
IP addresses concurrently. This may be usefull, for example, when iChip is configured to
operate in iRouter mode and provides access to the public internet via its modem
connection.
Two parameters govern DHCP server functionality:
DPSZ: The DHCP pool size parameter determines the range of IP addresses that
iChip allocates for its clients.
DSLT: The DHCP server lease time determines the lease time that iChip grants when
assigning IP addresses.
The DHCP server is activated under the following conditions:
An IP address is defined by the DIP parameter.
The DPSZ parameter is set to a value greater than 0.
Following a software reset (AT+iDOWN).
When activated, iChip‘s DHCP server assigns IP addresses starting from DIP+1 up to
DIP+DPSZ. In addition, the DHCP server offers the IP address stored in the IPG
parameter as a gateway to clients, and the mask address stored in its SNET parameter as a
Sub-Net. The assignment policy of iChip is as follows:
1. iChip attempts to assign the same IP for the same MAC address.
2. iChip starts re-using addresses only after using all the addresses in the pool.
3. iChip attempts to re-use the oldest expired address first.
4. iChip attempts to ping the address it is about to assign in order to avoid assigning
an address already used.
5. iChip offers its SNET parameter as a Sub-Net. If SNET is 0.0.0.0, iChip
calculates a new one according to address class.
6. iChip offers its IPG parameter as a gateway. If IPG is 0.0.0.0, iChip offers its IP
address as a gateway.
7. iChip offers the primary IP address of the Domain Name Server stored in its
DNS1 parameter to the client, provided it is not 0.0.0.0.
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 19-2
19 iRouter Mode
19.1 Introduction
iChip‘s iRouter mode is used to provide a gateway to a multitude of LAN or WiFi
devices through a single dialup or cellular link. In this configuration, iChip‘s DHCP
server may be used to assign IP addresses to the local hosts on the LAN/WiFi side. iChip
also uses a Network Address Translator (NAT) to translate between local and public IP
addresses.
While routing IP packets, iChip also accepts AT+i commands, as during normal
operation. The CPF (Communication Platform) parameter selects which interface to use
for Internet-related AT+i commands.
The following parameters and commands are used to configure iRouter mode behavior:
Automatic Router Start (ARS) parameter When set to 1, this parameter causes
iChip to go online in iRouter mode upon power-up and start routing packets.
Inactivity Timeout (IATO) parameter When in iRouter mode, if no routing activity
is detected for the period of time specified by this parameter, iChip disconnects its
modem/cellular side and goes offline. After going offline and if ARS=1, iChip will go
online and continue routing when the next packet that requires routing arrives.
Start Router (STRR) command Causes iChip to enter iRouter mode, go online on
the dialup/cellular side, and start routing packets.
Stop Router (STPR) command Causes iChip to exit iRouter mode, go offline on
the dialup/cellular side, and stop routing packets.
19.2 Establishing iRouter mode
iChip can be entered into iRouter mode using one of two possible methods:
When the ARS parameter is set to 1, automatically and immediately after power-up
and after every soft reset induced by AT+iDOWN.
By issuing the AT+iSTRR (Start Routing) command.
Upon entering iRouter mode, iChip immediately goes online on the dialup/cellular side.
Packets are not buffered during dialup/cellular connection establishment. After
establishing the connection, iChip starts the routing service.
19.3 Basic Routing
When iChip is in iRouter mode, it routes packets between its two communication
platforms utilizing a Network Address Translator (NAT) to translate between the internal
IP address space used on the LAN/WiFi side and the real IP address used on the
dialup/cellular side.
The NAT translates internal IP addresses of outgoing packets to the real IP address space
and makes the reciprocal translation of packets received in response.
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 19-3
Note: When using an FTP client to connect to an external FTP server through the
iRouter, you must use the FTP client in passive mode. For example, if the FTP client is
an iChip, you must open the FTP session using AT+i@FTP.
19.4 Terminating iRouter Mode
iRouter mode is terminated by any of the following occurrences:
By issuing the AT+iSTPR (Stop Routing) command. When iChip receives this
command, routing services are stopped and iChip goes offline on the dialup/cellular
side. If ARS=1 (Auto Routing), iChip automatically goes online and restores routing
services when the next packet arrives.
Automatically after an idle time period (with no routing activity) has passed. The idle
time period is defined in the IATO (Inactivity Timeout) parameter. Idle time
terminates routing only if IATO has a positive value larger than 0. When IATO=0,
idle time termination is effectively disabled. If ARS=1 (Auto Routing), iChip
automatically goes online and restores routing services when the next packet arrives.
By issuing the (+++) ESC string. iChip terminates iRouter mode and goes offline on
the dialup/cellular side. Following an ESC sequence termination, iChip does not
restore routing services even if ARS=1. To restore routing, either issue the
AT+iSTRR command or, alternatively, if ARS=1 issue AT+iDOWN.
19.5 Configuring iChip when in iRouter Mode
While in iRouter mode, iChip can be configured using the same methods for iChip in
general:
Assuming iChip‘s website is enabled on the LAN/WiFi end, iChip‘s internal
configuration website can be accessed by any browser that is connected to the same
LAN/WiFi network.
Assuming iChip‘s website is enabled on the dialup/cellular side, iChip‘s internal
configuration website can be accessed by any remote browser connecting to iChip‘s
port 80 over its public IP address.
AT+i commands coming from the host application.
(cellular)
Modem
iChip
Internet
LAN
Device
LAN
Device
LAN
Device
NAT
AT+i commands
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 19-4
19.6 AT+i Interface to iChip
In addition to configuring the iChip, AT+i commands can also be used to perform
operations on either the LAN/WiFi or dialup/cellular communication platform.
Using the CPF (Communication Platform) parameter, you can select either one of the
communication platforms. When CPF=0, AT+i commands are directed towards the
dialup/cellular side; when CPF=1, they are directed towards the LAN/WiFi side. While
processing AT+i commands, iChip continues to route packets seamlessly between the
two platforms.
iChip‘s responses to AT+i commands depend on the CPF value, as well. For example, the
IP returned by AT+iIPA? command while CPF=1 is the LAN-side IP.
19.7 Baud Rate Settings and Auto Baud Rate
iRouter mode supports all host and modem baud rates supported by iChip. However,
when auto routing is set (ARS=1), iChip does not support Auto Baud Rate. This is due to
the fact that in iRouter mode, iChip starts routing packets immediately after power-up,
and skips auto baud rate determination.
Therefore, when configuring iChip for auto routing (ARS=1), you must set a fixed baud
rate in the BDRF parameter.
19.8 iRouter and Power Save Mode
iChip can be configured for Power Save mode while acting as a router. Note, however,
that there is no buffering of packets in iRouter mode. The first packet arriving to iChip
while in Power Save mode triggers iChip to wake up and go online on the cellular or
dialup modem. Only after establishing a connection, does iChip start routing packets. The
packets received during connection establishment are lost.
GPRS
Modem
iChip
Internet
LAN
Device
LAN
Device
LAN
Device
NAPT
AT+i commands
CPF parameter selects
platform
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 19-5
19.9 +iSTRR Start Router
Syntax:
AT+iSTRR
Causes iChip to immediately enter iRouter mode.
Upon entering iRouter mode, iChip immediately goes
online on the dialup/cellular side. Packets are not
buffered during dialup/cellular connection
establishment. After establishing the connection, iChip
starts the routing service.
Result Code:
I/OK
When command is received and about to be processed.
Followed by:
I/ONLINE
After successfully going online on the dialup/cellular
side.
I/ERROR
Otherwise
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 19-6
19.10 +iSTPR Stop Router
Syntax:
AT+iSTPR
Causes iChip to exit iRouter mode, go offline on the
dialup/cellular side, and stop routing packets.
If ARS=1 (Auto Routing), iChip automatically goes
online and restores routing services when the next packet
arrives.
Result Code:
I/OK
When command is received and about to be processed.
Followed by:
I/ONLINE
After terminating the connection on the dialup/cellular
side when CPF=1.
-or-
I/DONE
After terminating the connection on the dialup/cellular
side when CPF=0.
-or-
I/ERROR
Otherwise
Ad-Hoc Networks
AT+i Programmer‘s Manual Version 8.32 20-1
20 Ad-Hoc Networks
An Ad-Hoc network is a Wireless Local Area Network (WLAN) in which some of the
stations are part of the network only for the duration of a communications session or, in
the case of mobile or portable devices, while in some close proximity to the rest of the
network.
Ad-hoc networks do not require an Access Point (AP) to enable communication among
stations. Each station can create a new Ad-Hoc network or join an existing one. Networks
can freely merge into a single network or split into smaller ones, thus adapting to
changing conditions such as topology, signal strength, and proximity to nearby Ad-Hoc
networks. Combined with an iChip configured as an iRouter, an Ad-Hoc network can
connect to the Internet through a dial-up or GPRS modem.
20.1 Configuration
Configuring the iChip to operate as a station in an Ad-Hoc network requires setting the
following parameters:
WLSI must be set to either ‗!‘ or ‗!<SSID>‘. When it is set to ‗!‘, iChip continuously
searches for existing Ad-Hoc networks in its vicinity and joins the one having the
strongest signal. When it is set to ‗!<SSID>‘, iChip searches for an Ad-Hoc network
having the specified Service Set IDentifier (SSID). If it finds one it joins it, otherwise
it creates a new network with this SSID.
WLCH must be set to a default value. This value indicates the communication
channel (1-13) to be used for beacon transmission in the Ad-Hoc network. When
iChip joins an already existing network, it adopts the channel used by that network. If
WLSI=!<SSID> and WLCH=0, iChip will only join an already existing network.
20.2 iChip Behavior in Ad-Hoc Mode
20.2.1 Automatic Scanning for Existing Ad-Hoc Networks
After power-up, iChip automatically attempts to locate and connect to an Ad-Hoc
network, unless the WLSI parameter (SSID) is set to (*).
If the WLSI parameter contains an SSID string preceded by (!) or set to (!), iChip scans
for Ad-Hoc networks only.
20.2.2 Creating a New Ad-Hoc Network
If iChip does not detect any Ad-Hoc networks in its vicinity, and the WLSI parameter
contains an SSID, iChip creates a new Ad-Hoc network with its own BSSID.
20.2.3 Joining an Existing Ad-Hoc Network
If iChip detects Ad-Hoc networks in its vicinity and the WLSI parameter is set to (!),
iChip joins the network having the strongest signal. Otherwise, iChip joins the network
whose SSID is set by the WLSI parameter.
iRouter Mode
AT+i Programmer‘s Manual Version 8.32 20-2
20.2.4 Merging Ad-Hoc Networks
When iChip is configured to operate in Ad-Hoc mode it performs a periodic scan for
other Ad-Hoc networks in the vicinity having the same SSID but a different BSSID. If a
scan indicates the existence of such an Ad-Hoc network, it initiates a procedure for
merging the networks. Networks will merge into one, provided they operate on the same
channel.
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-1
21 Secure Socket Protocol
iChip supports the SSL3/TLS1 secure socket protocol, based on RFC2246. iChip
supports the following Cipher suites:
SSL_RSA_WITH_RC4_128_MD5
SSL_RSA_WITH_RC4_128_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA
TLS_RSA_WITH_AES_256_CBC_SHA
21.1 Establishing An SSL3/TLS1 Socket Connection
iChip supports a single SSL3/TLS1 TCP/IP active socket connection. Opening a secure
socket on iChip involves two steps:
1. Open a standard TCP/IP socket to a secure server.
2. Initiate an SSL3/TLS1 handshake over the open socket to establish a secure session.
SSL3/TLS1 handshake negotiations are initiated using the AT+iSSL command.
iChip negotiates the secure connection based on several security-related parameters. It
authenticates the remote secure server by verifying that the server‘s certificate is signed
by a trusted Certificate Authority (CA). The trusted CA‘s certificate is stored in iChip‘s
CA parameter. Following a successful SSL3/TLS1 handshake, iChip encrypts all data
sent across the socket according to the cipher suite and keys agreed upon during the
handshake. Data received on the socket is decrypted by iChip prior to making it available
to the host processor.
21.2 Sending and Receiving Data over An SSL3/TLS1 Socket
The AT+iSSND command is used to send data over an SSL3/TLS1 socket, using the
same syntax as for non-secure sockets:
AT+iSSND[%]:<hn>,<size>:<data>
However, the size parameter is interpreted as the size of the data packet to encrypt. It is
limited to 2K. Receiving data on an SSL3/TLS1 socket is carried out using the
AT+iSRCV command. iChip automatically decrypts data that arrives on the secure
socket. The data transferred to the host is always decrypted data.
21.3 SSL3/TLS1 Handshake and Session Example
Take for example an SSL3/TLS1 server at secure.sslserver.com running a secure
application on port 1503. Using iChip, the following sequence opens a secure
SSL3/TLS1 socket to that application and exchanges data securely. For clarity,
commands sent to iChip appear in bold and iChip replies appear in italics.
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-2
AT+iSTCP:secure.sslserver.com,1503
Open a TCP/IP socket to a
secure application.
I/000
iChip opens socket and returns
handle 0.
AT+iSSL:0
iChip is instructed to negotiate
an SSL3/TLS1 connection on
socket handle 0.
I/OK
SSL3/TLS1 handshake was
successful. SSL3/TLS1
connection established on socket
handle 0.
AT+iSSND%:0,323:<…323 bytes of plain text data>
Host sends 323 bytes of plain
text data via SSL3/TLS1 socket.
iChip encrypts data and sends
cipher text over the Internet. The
‗%‘ attribute indicates
immediate flush.
I/OK
iChip encrypted and sent data.
AT+iRP4
Request socket status
I/(1267,-200,-200,-200,-200,-200,-200,-200,
-200,-200)
Socket 0 has 1267 plain text
bytes buffered. The data was
originally sent encrypted by the
server. iChip decrypted the
cipher text in the background.
AT+iSRCV:0
Command to retrieve buffered
plain text.
I/1267:<…1267 bytes of plaintext data…>
iChip transmits buffered data to
host.
AT+iscls:0
Close socket handle 0
I/OK
SSL3/TLS1 socket is closed
I/DONE
iChip is offline
21.4 Secure FTP Session on iChip
iChip supports a secure FTP session using SSL3/TLS1 sockets for both the FTP
command and FTP data channels. The command used for opening a secure FTP session is
AT+iFOPS.
Secure FTP implementation in iChip is based on RFC 2228 (FTP security extensions) and
the IETF Internet draft ―Securing FTP with TLS‖ (draft-murray-auth-ftp-ssl-16.txt).
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-3
When the AT+iFOPS command is used to initiate a secure FTP session, iChip performs
the following operations:
1. Opens an FTP control socket.
2. Sends AUTH TLS.
3. Performs the SSL3/TLS1 handshake.
4. Sends USER command.
5. Sends PASS command.
6. Sends PBSZ 0, followed by PROT P.
Once the data channel TCP socket is established, all subsequent data connections (send or
retrieve files as well as directory listings) start with an SSL3/TLS1 handshake. When a
data socket is re-opened for another FTP command, iChip attempts a quick re-negotiation
using the previous SSL3/TLS1 session parameters.
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-4
21.5 +iSSL Secure Socket Connection Handshake
Syntax:
AT+iSSL:<hn>
Negotiates a secure SSL3/TLS1 connection over an open
TCP/IP socket.
Parameters:
<hn> = A previously open TCP/IP socket handle.
Command Options:
<hn>
Must be obtained using the AT+iSTCP command during the
current Internet mode session. Or a socket accepted by a
listening socket.
When a Network Time Server is defined and NTOD is set to
1, iChip confirms the server‘s certificate date validity using
the retrieved network time. If, for some reason, the network
time is not retrieved successfully, iChip does not accept the
certificate until the time is retrieved successfully.
Result Code:
I/OK
If the SSL3/TLS1 negotiation is successful.
I/ERROR
Otherwise
Secure Socket Protocol
AT+i Programmer‘s Manual Version 8.32 21-5
21.6 +i[@]FOPS Secure FTP Open Session
Syntax:
AT+i[@]FOPS:<server>[,<port>]:<user>,<pass>[,<accnt>]
Opens a secure FTP link to a secure FTP server.
Parameters:
<server>
Logical name of the FTP server or the server‘s IP address.
<port>
Optional FTP port in the range 0-65535
<user>
FTP user‘s name
<pass>
FTP user‘s password
<accnt>
Optional FTP account
Command Options:
<server>
The server name may be any legal Internet server name that
can be resolved by iChip‘s Domain Name Server (DNS)
settings. The server name may also be specified as an
absolute IP address given in DOT form.
<port>
Specifies the FTP server‘s listening port. If not specified,
port 21 (decimal) is assumed.
<user>
User‘s name string. This must be a registered user on the
FTP server. Some servers allow anonymous login, in which
case user=anonymous.
<pass>
Password for user authentication. If special characters are
used, the password must be specified within quotes. It is
customary that servers that allow anonymous login request
an e-mail address as a password.
<accnt>
Some FTP servers require an account in order to allow a
certain subset of the commands. In this case, the account
name must be specified when opening the FTP link.
@
The optional @ is used to flag the Force PASV mode. When
@ is specified, iChip uses only the PASV method when
opening a data socket to server for FTP data transfer.
Result Code:
I/<FTP handle>
Upon successfully connecting to the FTP server and
authenticating the user, a socket handle is returned. The
handle <FTP handle> is used to reference the FTP session
in all subsequent FTP commands.
I/ERROR
Otherwise
Network Time Client
AT+i Programmer‘s Manual Version 8.32 22-1
22 Network Time Client
iChip incorporates a Simple Network Time Protocol (SNTP) client. With this protocol
support, iChip can be configured to check SNTP servers for current time and date each
time it goes online. iChip is configured to retrieve time data from a Network Time Server
each time it goes online with the NTOD parameter. After updating its internal Time-Of-
Day (TOD) registers at least once, iChip continues to keep track of time independently,
even after it goes offline.
When iChip contains real TOD data, e-mails sent are automatically stamped with Time
and Date of delivery, according to RFC (822) definition for the date header field. In
addition, the AT+iRP8 report returns the current time and date.
iChip also contains parameters to configure local GMT offset and a DSTD (Daylight
Savings Time) rule. These parameters allow iChip to determine the local TOD. When
iChip is configured for TOD retrieval from a Network Time Server, iChip automatically
retrieves an updated time reading every two hours while online. This configuration
improves the long-term accuracy of its internal time management.
MIME Encapsulated E-Mail Messages
AT+i Programmer‘s Manual Version 8.32 23-1
23 MIME Encapsulated E-Mail Messages
23.1 iChip-Generated Binary Message Formats
Binary e-mail messages are sent via iChip using one or more AT+iEMB commands. The
message format is limited to an optional body of text and a single attachment.
The following fields are added by iChip to the main message header:
X-Mailer: iChip <software version>
Message-ID: <Unique #>@iChip
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=CONE-iChip-<software version>”
The message‘s preface contains the following text:
This MIME message was coded by iChip.
If the host application includes a text body for the message, it also contains the following
lines in its header:
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-iCoverpage: Email
When no textual body contents are included this section is omitted.
The binary attachment section follows, beginning with a MIME attachment header
containing the following fields:
Content-Type: <User defined media type>/<User defined media subtype>;
name=<User defined attachment filename>
Content-Transfer-Encoding: base64
where,
<media type> := ―text‖ / ―image‖ / ―audio‖ / ―video‖ / ―application‖
<media subtype> := <A publicly-defined extension token.>
<filename> := <User-defined name (including extension)> or
<unique filename>
<media type> defaults to ―application‖ when otherwise not defined.
<media subtype> defaults to ―octet-stream‖ when otherwise not defined.
Following the header, a base 64-encoded data stream includes the entire binary data
transferred to iChip from the host.
23.2 MIME-Related AT+i Commands and Parameters
Binary images are transferred to iChip for MIME message encapsulation via one or more
AT+iEMB commands. An AT+iEMB command sequence must be terminated by the
AT+iE* command, indicating the end of the binary e-mail message.
When several consecutive AT+iEMB commands are used, the host must issue the
commands with an inter-command delay, which does not violate the SMTP server‘s
timeout constraints. Otherwise, the SMTP server will timeout and abort the session.
Average SMTP servers allow for delays in the range of 30 to 120 seconds. Additional
MIME Encapsulated E-Mail Messages
AT+i Programmer‘s Manual Version 8.32 23-2
AT+i commands may be interlaced within a sequence of AT+iEMB commands, except
for the following AT+i commands: AT+iEMA, AT+iRML, AT+iRMH, AT+iRMM,
AT+iRFU, AT+iRLNK, AT+iBDRA, and AT+iSNMD.
iChip does not limit the size of the binary attachment. However, ISPs do have limitations.
An Internet connection is initiated immediately after the first AT+iEMB command, while
the rest of the command is received. Once the connection to the SMTP server has been
established, iChip acts as a pipeline, receiving binary info from the host, encoding it, and
transmitting it to the Internet on-the-fly. Following the AT+iE* command, the e-mail is
terminated and the Internet connection closed.
The escape sequence command (+++) is allowed within an AT+iEMB command,
provided there is a half-second silence period before the (+++) is sent. Upon receiving the
escape sequence, iChip aborts and orderly closes the Internet session. The partial mail
message is not sent to the destination.
23.2.1 Binary Attachment Parameters
Parameter
Default
Description
MT
4 (application)
Media Type:
0 Text; 1 Image ; 2 Audio ; 3 Video ;
4 Application
MST
octet-stream
Media Subtype String. For a list, see Appendix A.
FN
None
Attachment File Name (inc. extension). If a file name is
not defined, iChip generates a unique filename without an
extension.
BDY
None
ASCII text to be included in the e-mail‘s body in addition
to the attachment. (Multiple lines allowed).
Table 23-1 Binary Attachment Parameters
23.2.2 Defining A Textual Body for Binary Messages
1. Permanent textual body contents:
AT+iBDY:<text lines> … <CR>.<CR>
The maximum fixed body size allowed is 96 characters (including embedded
<CR><LF>). The text body is included in all future binary messages. In addition, the
textual contents are committed to non-volatile memory on board the iChip.
2. Single session textual body contents:
AT+iBDY~<text lines> … <CR>.<CR>
The maximum temporary body size allowed is 1K characters (including embedded
<CR><LF>). The text body is included in the next session binary message and then
purged.
MIME Encapsulated E-Mail Messages
AT+i Programmer‘s Manual Version 8.32 23-3
23.3 MIME-Encapsulated E-Mail Message Format
Note: Bold lines are added by iChip.
Received: from JFK by FTGate SmartPop;
Tue, 23 Nov 1999 09:26:21 +0200
Received: from mail.inter.net.il (hrz-153-147.access.net.il
[212.68.153.147])
by mail.inter.net.il (8.9.3/8.8.6/PA) with SMTP id OAA11594;
Mon, 22 Nov 1999 14:18:03 +0200 (IST)
Date: Mon, 22 Nov 1999 14:18:03 +0200 (IST)
From: lims@connectone.com
To: lims@connectone.com
To: connect1@inter.net.il
To: gadyl@netvision.net.il
X-Mailer: iChip ic401d05
X-Serial: 123456
Return-Receipt-To: lims@connectone.com
Message-ID: <15322@iChip>
Subject: iChip binary message via iModem
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=”CONE-iChip-ic401d05”
X-UIDL: ad0c01ac458208bedea8b8522012e4b6
This MIME message was coded by iChip.
--CONE-iChip-ic401d05
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Coverpage: Email
.
<Textual body, here>
.
.
--CONE-iChip-ic401d05
Content-Type: image/tiff; name="FaxImage.tif"
Content-Transfer-Encoding: base64
.
.
.
<Binary Base64-encoded data, here>
.
.
.
--CONE-iChip-ic401d05
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-1
24 Flow Control
24.1 Host iChip Software Flow Control
When issuing an AT+iEMB command to generate a binary e-mail, an AT+iSSND
command to transfer data to a socket, an AT+iTBSN to send a binary stream to a Telnet
server, or an AT+iFSND command to transfer a file, the host transfers a binary data
stream to iChip. At times, this stream may be very large.
Once iChip establishes a connection, it acts as a pipeline, transferring data received from
the host to the Internet. However, the data rates at the host and Internet ends are not
always balanced. This happens for several reasons:
While iChip logs onto the Internet and establishes a connection, the host proceeds to
send its data stream to iChip. During this time iChip receives data from the host, but
cannot send it out.
When sending MIME attachments, iChip encodes the binary data using base 64. This
roughly inflates binary data by 30%. Thus, more data needs to be transmitted than is
received from the host.
When using a TCP/IP socket, iChip might need to re-transmit packets.
The amount of buffer space available in the iChip to accommodate for this imbalance is
limited. Therefore, a flow control scheme is required to regulate hostiChip
communications. The FLW parameter is set to reflect the preferred flow control mode.
The software-driven flow control protocol is defined as follows:
1. While the host is transferring the binary stream,following the +iEMB, +iSSND, or
+FSND prefixes, iChip issues a ‗WAIT‘ control character when it needs to pause the
host. The host application is required to monitor its serial receive line and pause the
transmission when a ‗WAIT‘ control character is received.
2. To resume the host transmission, iChip issues a ‗CONTINUE‘ control character. The
host is required to monitor its receive line after being paused in anticipation of this
control character. Once received, the host might continue to transfer the data stream.
3. If an error occurs during the Internet session while the host is transferring the data
stream (or while paused), iChip issues an ‗ERROR‘ control character if some error
occurred. Immediately after issuing this control character, iChip aborts the Internet
session and issues an ‗I/ERROR (error number)‘ string. The host must cease
transmitting the data stream when the ‗ERROR‘ control character is received.
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-2
The control characters are defined as:
Control
ASCII Dec
ASCII Hex
Mnemonic
WAIT
22
0x16
SYN
CONTINUE
24
0x18
CAN
ERROR
5
0x5
ENQ
Table 24-1 Software Flow Control Characters
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-3
24.2 Software Flow Control Diagram in Binary E-Mail Send
Figure 24-1 Software Flow Control in Binary E-Mail Send
SZ>256
END
Send Next Byte
Byte Received from
iChip?
Wait code?
Byte Received
from iChip?
Send <sz> Bytes
Wait for I/
OK
Yes
No
No
Yes
No
Yes
No
No
ISSUE AT+iEBA, <sz>
Yes
Error code?
Wait for I/
Error(nnn)
Yes
Yes
Yes
Continue
code?
No
No
Error code?
Yes
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-4
24.3 Software Flow Control During A Socket Send
When a WAIT control is sent to the host during a socket send (AT+iSSND) command, it
is automatically followed by an RP4 socket status report in the following syntax:
I/(<sock0sz>, <sock1sz>, … ,<sock9sz>)<CR/LF>
See the AT+iRP command for a full description.
While the host is waiting for the CONTINUE control, it may analyze the sockets‘ input
buffer status. If the host detects a need to execute a socket receive command to empty one
or more socket input buffers, it may escape the current SSND command by issuing a
Pause’ sequence immediately after receiving the ‗CONTINUE‘ control.
The ‗Pause’ sequence is defined as: half a second of silence followed by (---) (three
consecutive minus sign characters). iChip responds by prematurely terminating the SSND
command, including flushing the current socket if the (%) flag is specified. Following
this, the I/OK message is issued and the host may issue the required SRCV command in
addition to any other operations it needs to execute. The host may return to the pre-
empted socket at any time and issue a new SSND command to send out the balance of
data.
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-5
24.4 Software Flow Control Diagram in Socket Send
Figure 24-2 Software Flow Control in Socket Send
SZ>256
END
Send Next
Byte
Byte Received from
iChip
?
Wait code?
Byte
Received
from iChip?
Send <sz>
Bytes
Wait for I/OK
Yes
No
No
Yes
No
Yes
No
No
ISSUE
AT+iSSND:<hn>,<sz>:
Yes
Error code?
Wait for
I/Error(nnn)
Yes
Yes
Yes
Continue
code?
No
No
Error code?
Yes
Wait for
RP4 reply
Pause?
Yes
No
Issue "- - - "
End
Flow Control
AT+i Programmer‘s Manual Version 8.32 24-6
24.5 Host iChip Hardware Flow Control
As an alternative to the software flow control method, which requires some software
attention on behalf of the host, iChip offers a hardware flow control mode.
This mode is selected by setting iChip‘s FLW parameter Bit 0, using the AT+iFLW
command. Note that to set FLW Bit 0, the ~CTSH signal needs to be LOW (enabled),
otherwise iChip returns I/ERROR (063). This convention safeguards iChip from lockup,
which may arise if FLW Bit 0 is set while the ~CTSH signal is constantly HIGH.
For hardware flow control to operate properly, the ~CTS and ~RTS signals between the
host and iChip UARTS must be interconnected.
The iChip ~CTSH and ~RTSH signals can be shorted to circumvent hardware flow
control.
Under this mode, iChip assumes that the host transmission might be paused by de-
asserting the ~CTS signal. The host must adhere to this convention. Most UARTs support
hardware flow control. However, if this is not the case, iChip‘s ~CTS signal must be
monitored by the host software on a general purpose I/O.
The host can also pause iChip by de-asserting its ~CTS signal.
If a transmission error occurs during processing of a send command (EMB, SSND,
TBSN, FSND), iChip accepts all remaining characters pertaining to the current command
(as specified by the <sz> parameter) before returning the relevant I/ERROR response.
Figure 24-3 Minimum Hardware Flow Control Connections
HOST
iChip
~CTS
~RTS
~Tx
~Rx
~CTSH
~RTSH
~Tx
~Rx
Remote Firmware Update
AT+i Programmer‘s Manual Version 8.32 25-1
25 Remote Firmware Update
25.1 Introduction
iChip accepts remote firmware updates from an HTTP or FTP server. The firmware
update is stored as an .imz file on the host server and downloaded by iChip acting as a
client. iChip replaces its existing firmware with the new one through a special application
that is part of the .imz file. This method is especially convenient when managing
firmware updates in a globally distributed install base of internet-enabled devices.
25.2 Updating Firmware from a Remote Server
This method involves placing the firmware update .imz file on an HTTP or FTP server.
iChip has the provisions to use its respective HTTP or FTP client to download the
firmware update file and perform the update process.
Before the actual remote firmware update command can be issued, the following
parameters must be set:
USRV Defines the protocol to be used (HTTP or FTP), and the name of the host
on which one or more .imz files are stored.
UUSR Defines FTP user name (FTP only).
UPWD Defines FTP user password (FTP only).
UEN This flag indicates whether iChip updates to a firmware version that is newer
than the currently installed one only, or to any firmware version it finds.
In addition, an appropriate .imz firmware update file must be placed on the remote server
at the location specified by the USRV parameter.
Once the above parameters are defined, the firmware update process can be initiated by
sending the following command to iChip:
AT+iRFU
iChip returns I/OK to acknowledge receipt of the command. As the update process may
take up to 4 minutes to complete, iChip issues an I/UPDATE message to notify the host
that it is in the process of updating its firmware. The host must allow for an extended
delay period until iChip completes the process. Once completed, iChip re-boots the new
firmware and issues an I/DONE message when in dialup mode, or an I/ONLINE in
LAN mode.
Several safeguards have been instated to ensure a successful firmware update. The
firmware update file is structured by Connect One in a specific format, which allows
iChip to authenticate its origin as a legal firmware image. iChip also verifies that the
firmware update is the correct version for its hardware environment. iChip rejects an
update file if it contains an image that is identical to the one already installed.
The remote firmware update procedure is detailed below:
1. iChip downloads the new firmware imz file.
Remote Firmware Update
AT+i Programmer‘s Manual Version 8.32 25-2
2. If the download fails, iChip returns an error message and continues to work as before.
3. If during the download iChip is going over a reset cycle (SW or HW), iChip re-boots
and executes the old firmware.
4. If the download is successful, iChip authenticates the firmware image file.
5. iChip replaces the old image with the new image.
6. If the replacement process fails, for example due to power failure, iChip re-boots
from boot loader in the flash memory and re-tries the replacement process until
successful.
7. If the replacement process is successful, iChip re-boots and executes the new
firmware.
Remote Firmware Update
AT+i Programmer‘s Manual Version 8.32 25-3
25.3 +iRFU Remote Firmware Update
Syntax:
AT+iRFU
Downloads and updates iChip firmware from a remote
HTTP or FTP server. The value of the USRV parameter is
used to determine the remote server from which to
download the firmware. The value of the UEN flag is used
to determine whether to update any firmware version or
only a version that is newer than the one already installed.
In addition, if an FTP server is specified for download, the
UUSR and UPWD parameter values are used to determine
FTP user name and password.
Result Code:
I/OK
To acknowledge successful receipt of the command
I/ERROR
Otherwise
Followed by:
I/UPDATE
If a qualifying firmware update .imz file is found
I/ERROR
Otherwise
Followed by:
I/DONE
After successfully updating new firmware in dialup mode
I/ONLINE
After successfully updating new firmware in LAN mode
I/ERROR
Otherwise
iChip Parameter Update
AT+i Programmer‘s Manual Version 8.32 26-1
26 iChip Parameter Update
26.1 Introduction
The iChip remote parameter update file allows users to remotely modify various non-
volatile parameters in iChip products. The file is an ASCII-formatted text file, edited by
the user or created by a dedicated application. The file‘s size must not exceed 10k.
The remote parameter file (RPF) naming convention is <filename>.rpf. If a parameter is
assigned a legal value within the file, that value replaces the current value in iChip‘s non-
volatile parameter database. A parameter value that is not referred to in the file, or that is
not defined using the correct syntax rules, specified below, does not affect the current
parameter value.
26.2 Remote Parameter File (RPF) Structure
The RPFfile must include the letters ―RP_‖ as its first 3 characters, and can include
additional header lines (defined below), as well as various parameter assignments.
Assignments follow the rules defined for parameter settings, but excluding the AT+i
prefix. For example, to assign the value myname to the POP3 mailbox name parameter,
the correct assignment is MBX=myname This is equivalent to the host sending
AT+iMBX=myname to iChip. Each line, terminated with <CR>/<LF>, can contain one
assignment only. The order of assignments is not important, except for the RPF header
parameters, which must be first and must follow the header definitions below. After the
first non-RPF header parameter, additional header parameters are ignored.
Comment lines can appear anywhere in the file. Comment line syntax is defined as:
#<anything>CR/LF
The first line in the file that is not a comment line is considered the authentication header
line and must have the following syntax:
RP_[GROUP=<string><space_character>][RP_DEST=<string>]CR/LF
The remainder of the header must contain lines with the following syntax:
<header_parameter_name>=<general_parameter_value>CR/LF
iChip Parameter Update
AT+i Programmer‘s Manual Version 8.32 26-2
26.3 Header Parameter Names and Values
Name
Value
Default
RP_DEST
Single
string, no
space
characters
NONE
RP_GROUP
NONE
RP_START_FROM_FACTORY_DEFAULTS
YES/NO
NO
Table 26-1 Header Parameter Names and Values
RP_GROUP If the RPF Group Name parameter contains a value, the RPF file
must include an RP_GROUP definition and its value must be identical to the RPF
value. Otherwise, the parameter update file will be rejected. Nevertheless, if the RPF
parameter is set to the special value (*) (match any), the RPF file will be accepted
with any value of RP_GROUP, as well as without any value at all. The RPF Group
Name parameter can be viewed and changed by sending an AT+iRPG? command to
iChip.
RP_DEST If the RPF file contains this parameter, the parameter update file will
be rejected unless the value given in this parameter is identical to the unique ID of the
iChip it was sent to. The unique ID can be viewed by sending an AT+iRP5 command
to iChip, but cannot be changed. This feature facilitates sending a parameter update to
a specific iChip controller only.
RP_START_FROM_FACTORY_DEFAULTS This flag defines the initial
value of parameters. A YES value will initially restore all iChip parameters to their
factory default values before processing the new RPF file values.
iChip Parameter Update
AT+i Programmer‘s Manual Version 8.32 26-3
26.4 Uploading A Parameters Update File to iChip
By default, receiving and processing a parameters update file is disabled in the iChip. To
enable this option, the RPG parameter must be set to some value. If a value other than (*)
is set, the value must match the parameters update file RP_GROUP value. This feature
facilitates group updates, and can be used as a password to secure parameter updates.
A remote parameters update file can be uploaded to iChip using iChip‘s internal
configuration site.
The nonvolatile parameter RPG controls the parameter update. If it does not contain a
value, the update process is effectively disabled. If it contains an (*), it is fully enabled. If
it contains a value, the update process is restricted to RPF files containing that value in
the RP_GROUP header parameter.
Note: See Appendix B for a sample RPF file.
iChip Embedded Web Server
AT+i Programmer‘s Manual Version 8.32 27-1
27 iChip Embedded Web Server
27.1 Introduction
iChip includes a web server that handles HTTP 1.0/1.1 web interactions independently of
its host processor. It allows system designers to build web-based products, which can be
remotely monitored, configured, and managed via the Internet using a standard web
browser interface.
iChip devices host two on-chip websites stored in non-volatile memory. One website is
inherent to the iChip firmware and dedicated to iChip configuration and maintenance.
The second site is uploaded to iChip for device application use. This website can include
multiple linked HTML pages, links to external pages, images, graphics, Java applets,
WAP pages, and more. A special facility allows the web pages to include references to
the embedded application‘s variables.
iChip‘s embedded web server is designed to integrate with the existing iChip-to-host API
methodology based on Connect One‘s AT+i command interface.
27.2 Features
Responds to standard web browser GET and POST commands issued on port 80.
Supports up to three concurrent remote browsers.
Serves on-chip HTML pages stored in non-volatile memory.
Can incorporate WAP pages to allow browsing iChip‘s website using an Internet-
enabled cellular handset.
The internal iChip configuration website supports remote iChip parameter
configuration, remote iChip firmware upload, and remote application website upload.
This is achieved using a standard web browser. Configuration access is protected by
an SHA1-encrypted password mechanism.
Supports monitoring and controlling the host device using a pre-defined set of
parameters embedded within the application website (also SHA1 password
protected).
Allows OEMs to design their own embedded website using standard web authoring
tools along with Connect One‘s windows-based website packing utility.
iChip Embedded Web Server
AT+i Programmer‘s Manual Version 8.32 27-2
27.3 Web Server Modes
Two web server modes are defined as (see figure below):
iChip configuration mode
Host interaction mode
Each of these modes is supported by a dedicated website and a parameter access
password.
The iChip configuration mode allows remote iChip configuration. It encompasses web
interactions between iChip and a remote browser to carry out iChip parameter
maintenance and iChip firmware and application website uploads. The host processor
does not take part in the interactions under this mode. Moreover, the host processor is not
required at all for this mode to operate. Once an iChip is online and in possession of an IP
address, any remote browser may surf to the iChip and update its non-volatile parameters
without the host‘s involvement. The iChip configuration site is located at:
HTTP://<iChip_IP_Address>/ichip/
In Host interaction mode, iChip is used to host, serve, and manage web interactions with
a remote web browser on behalf of the embedded device‘s host processor. The host gains
access to the web-based parameters via AT+i commands sent to iChip through the serial
connection.
Figure 27-1: iChip Web Server Modes
27.4 The Application Website
The application website is stored in non-volatile memory. It consists HTML code, which
can include links to local or remote web pages, graphic images, text files, Java applets,
WAP pages, and more.
Device manufacturers can design their own embedded website using any web authoring
tool. The iChip implementation supports a maximum website size of 64K. The site is
uploaded to iChip through the serial connection, or through iChip‘s configuration
website.
Host Interaction Mode
iChip Configuration Mode
HOST
iChip
Modem/
LAN
Internet
Browser
Embedded System
iChip Embedded Web Server
AT+i Programmer‘s Manual Version 8.32 27-3
27.5 Parameter Tags
iChip and host real-time parameters can be referred to in the embedded websites through
the use of Parameter Tags. When Parameter Tags are placed in an HTML web page,
actual values are sent by iChip‘s web server component when the page is served out.
Parameter Tags are also used to change corresponding parameter values from a remote
web browser. Syntactically, Parameter Tags are parameter names enclosed between two
(~) characters. If the (~) character needs to be included in a Web page, two consecutive
(~) characters must be used (~~).
The iChip Internet configuration parameters defined in the AT+i API retain their name
when used as Parameter Tags. For example, the value of the TOA AT+i parameter (Send
to E-Mail Address) may be referenced in the website by ~TOA~.
Host Parameter Tags defined by the parameter name <param>, may be referenced in the
website using ~<param>~. <param> can be any freeform parameter name consisting of a
single word that does not include blanks or iChip delimiters. For example, a parameter
reflecting a temperature reading can be called temperature and referenced in the website
as ~temperature~.
27.6 iChip Configuration Mode
iChip configuration entails monitoring and updating iChip parameter values. By making
use of iChip‘s inherent configuration website, an iChip device can be configured
remotely using a standard web browser in addition to being configurable locally using the
Ymodem protocol over the serial link, via PSTN in a modem environment, or remotely
via e-mail. The iChip RPG parameter is used to password-protect remote iChip parameter
updates. See Security and Restrictions.
The configuration site includes web forms to monitor and update most iChip parameters
and an upload page consisting of file upload forms. Note that, the following iChip
parameters cannot be configured remotely and are therefore not displayed on iChip‘s
configuration website:
WiFi security parameters
Fast USART parameter (BDRD)
Analog-to-digital converter (ADC) parameters
Each upload form allows file uploading using the POST method for a single file. The
forms support uploading the following files:
Firmware update *.imz file
Parameters update *.rpf file
Packed application website *.img file
When new firmware (*.imz file) is uploaded to iChip, iChip submits an acknowledgment
page to the browser, after receiving the complete *.imz file, and then goes offline and
updates its firmware.
In some rare cases, iChip‘s internal configuration website may be accidentally corrupted.
This happens when iChip fails to complete a remote firmware update process via web. To
iChip Embedded Web Server
AT+i Programmer‘s Manual Version 8.32 27-4
resolve this problem, iChip includes a recovery website. This website allows a user at the
remote browser end to upload the .imz file again in order to restore iChip‘s internal
website.
iChip‘s configuration site is located at:
HTTP://<iChip_IP_Address>/ichip/
27.7 Host Interaction Mode
Host Interaction mode allows OEMs to design and implement a product-related
embedded website that is managed by iChip on behalf of the host. The host-defined
embedded website supports live host parameter monitoring and updating by a remote
browser. This is achieved by a dynamic AT+i layer implemented across the serial link
between the host and iChip.
The application developer creates a website using conventional web authoring tools. The
HTML or WAP files can then be edited to contain Parameter Tags. Parameter tags are
regarded as placeholders in HTML or WAP files. They are replaced on-the-fly with real-
time values as the page is served to the browser. Browsers may also change values of
Parameter Tags in order to submit