21.11.2014 Views

iChip SerialNET Configuration 1_00 - Connect One

iChip SerialNET Configuration 1_00 - Connect One

iChip SerialNET Configuration 1_00 - Connect One

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>iChip</strong> <strong>SerialNET</strong><br />

Quick <strong>Configuration</strong> Guide<br />

Version 1.<strong>00</strong><br />

April 2<strong>00</strong>9


<strong>Connect</strong> <strong>One</strong><br />

<strong>SerialNET</strong> Quick <strong>Configuration</strong> Guide<br />

General<br />

<strong>iChip</strong>’s <strong>SerialNET</strong> mode extends the local host interface to a TCP socket or a UDP<br />

socket across a LAN or Internet. The host interface can be asynchronous serial or<br />

USB. Its main purpose is to allow devices, which normally interact over the host<br />

interface, to interact in a similar fashion across a network, without requiring software<br />

changes. In order to achieve this, <strong>SerialNET</strong> mode defines a set of associated<br />

operational parameters, which determine the nature of the desired network<br />

connection. When <strong>iChip</strong> is put in <strong>SerialNET</strong> mode, it acts as a transparent bridge<br />

between the device and the network.<br />

<strong>SerialNET</strong> mode can be configured for server applications as well as for client<br />

applications. All the supported communication platforms that are supported by <strong>iChip</strong><br />

can be used: LAN, Wireless LAN, dial-up modem or cellular modem. <strong>SerialNET</strong> can<br />

also be configured for Telnet sockets as defined in RFC 2217 (partially implemented).<br />

This manual describes some of the common configuration options used in <strong>SerialNET</strong><br />

mode. For full description of the <strong>SerialNET</strong> feature please refer to the relevant<br />

chapters in the AT+i Programmer’s Manual:<br />

• <strong>SerialNET</strong> Theory of Operation<br />

• <strong>SerialNET</strong> Mode Initiation<br />

• <strong>SerialNET</strong> Mode Parameters<br />

<strong>SerialNET</strong> Mode Activation<br />

• AT+iSNMD=1 or AT+ iSNMD<br />

• AT+iSNMD=2 or AT+i!SNMD<br />

• AT+iSNMD=3 or AT+i@SNMD<br />

• AT+iSNMD=4<br />

Additional methods of activation include:<br />

• <strong>Connect</strong>ing to the Remote AT+i Service port defined by the parameter LATI and<br />

issuing one of the above AT+i commands.<br />

• <strong>Connect</strong>ing to the embedded configuration website, navigating to the <strong>SerialNET</strong><br />

tab and clicking on one of the links to initiate <strong>SerialNET</strong>.<br />

Upon initiation of <strong>SerialNET</strong> mode, the <strong>iChip</strong> will reboot. Once in <strong>SerialNET</strong> mode,<br />

no additional AT+i commands can be sent, as the host interface link will be dedicated<br />

to raw local-device data. <strong>SerialNET</strong> mode extends across power-down.<br />

Activation of <strong>SerialNET</strong> mode is allowed if at least the following parameters are set<br />

with non-zero values: HIF and HSRV, or HIF and LPRT.<br />

<strong>SerialNET</strong> Mode Termination<br />

<strong>SerialNET</strong> mode can be terminated in the following methods:<br />

• Applying power to the <strong>iChip</strong> with the MSEL signal pulled low for less than 5<br />

seconds.<br />

• Pulling low the MSEL signal for more than 5 seconds during runtime.<br />

2


<strong>Connect</strong> <strong>One</strong><br />

<strong>SerialNET</strong> Quick <strong>Configuration</strong> Guide<br />

• Issuing the “Escape Code Sequence”, defined as half a second delay followed by<br />

“+++” (three ‘+’ characters), through the host interface. Bit #3 of the SDM<br />

parameter must be zero.<br />

• Issuing a BREAK signal on the UART. Bit #4 of the SDM parameter must be set<br />

to 1 and HIF must be 1, 2, or 3.<br />

• <strong>Connect</strong>ing to the Remote AT+i Service port defined by the parameter LATI and<br />

issuing the “Escape Code Sequence” +++.<br />

• <strong>Connect</strong>ing to the embedded configuration website, navigating to the <strong>SerialNET</strong><br />

tab and clicking on the link to terminate <strong>SerialNET</strong>.<br />

When one of these occurs, <strong>iChip</strong> terminates <strong>SerialNET</strong> mode and reboots. Afterwards<br />

<strong>iChip</strong> will respond to AT+i commands.<br />

Socket <strong>Configuration</strong><br />

• AT+iSTYP<br />

Select between UDP, TCP or SSL.<br />

• AT+iHSRV<br />

Address of a remote server on the LAN or Internet. Two additional addresses can<br />

be configured as back up using the parameters: HSR1 and HSR2.<br />

• AT+iLPRT<br />

Local listen port number.<br />

Flush Conditions<br />

A combination of several parameters determines the timing and the size of outgoing<br />

data packets:<br />

• AT+iMTTF<br />

Set maximum timeout in seconds to transmit accumulated outgoing data.<br />

• AT+iMCBF<br />

Set minimum amount of bytes per outgoing packet.<br />

• AT+iFCHR<br />

Set a character or hexadecimal byte value to signal the <strong>iChip</strong> to send out a packet.<br />

Buffering outgoing data<br />

• AT+iMBTB<br />

Set maximum amount of bytes to be saved in local memory while connection to<br />

the remote server has not yet been established.<br />

Disconnecting active connections<br />

• AT+iDSTR<br />

An open socket connection will be closed if the specified string will be issued by<br />

the host controller.<br />

3


<strong>Connect</strong> <strong>One</strong><br />

<strong>SerialNET</strong> Quick <strong>Configuration</strong> Guide<br />

• AT+iIATO<br />

An idle open socket connection will be closed if the specified timeout has elapsed.<br />

• AT+iSNRD<br />

An amount of time in seconds that <strong>iChip</strong> will remain unconnected before reinitializing<br />

<strong>SerialNET</strong> mode after a connection was terminated.<br />

Host Interface <strong>Configuration</strong><br />

• AT+iSNSI<br />

Settings of the local asynchronous serial link to the host controller:<br />

,,,,<br />

• AT+iHIF<br />

Set the host interface as one of the UARTS or USB interfaces.<br />

• AT+iMIF<br />

Set the interface to the modem.<br />

Additional Features<br />

Additional features can be configured to be active in <strong>SerialNET</strong> mode:<br />

• Embedded Web Server<br />

• IP Registration<br />

• RAS<br />

• Wake up procedure of a remote <strong>SerialNET</strong> Server<br />

• Filter outgoing packets<br />

<strong>SerialNET</strong> Error Management<br />

Following is a list of the error codes that can be received in response to <strong>iChip</strong><br />

<strong>SerialNET</strong> commands:<br />

115 <strong>SerialNET</strong> could not be started due to missing parameters<br />

122 <strong>SerialNET</strong> mode error: Host interface undefined (HIF=0)<br />

123 <strong>SerialNET</strong> mode error: Host baud rate cannot be<br />

determined<br />

124 <strong>SerialNET</strong> over TELNET error: HIF parameter must be<br />

set to 1 or 2<br />

561 Remote peer closed the <strong>SerialNET</strong> socket.<br />

4


<strong>Connect</strong> <strong>One</strong><br />

<strong>SerialNET</strong> Quick <strong>Configuration</strong> Guide<br />

Examples<br />

Following are a few examples of configuration of <strong>SerialNET</strong> mode. Prior to activating<br />

<strong>SerialNET</strong> mode, it is essential to set up the network parameters for the active<br />

Ethernet, WiFi or modem connection.<br />

Example 1:<br />

Scenario: A client device which is always connected to the server by LAN (Ethernet<br />

or WiFi)<br />

AT+iHSRV=172.20.0.1:3<strong>00</strong>1<br />

I/OK<br />

AT+iMCBF=15<br />

I/OK<br />

AT+iMBTB=512<br />

I/OK<br />

AT+iSTYP=0<br />

I/OK<br />

AT+iHIF=1<br />

I/OK<br />

AT+iSNSI=”9,8,N,1,1”<br />

I/OK<br />

AT+iAWS=1<br />

I/OK<br />

AT+i!SNMD<br />

I/OK<br />

I/ONLINE<br />

Address of the remote server<br />

Outgoing packets should be of size 15 Bytes<br />

Smaller packets will not be sent<br />

Save up to 512 bytes in local buffer in case<br />

data is sent by the host but server is offline<br />

TCP socket<br />

Interface to the host is UART0<br />

Set baud rate to 1152<strong>00</strong>bps, 8 data bits, No<br />

Parity, 1 Stop bit, Flow Control signals enabled<br />

The embedded website will be active<br />

Activate <strong>SerialNET</strong> in mode 2. The TCP<br />

socket will always be connected to the server<br />

5


<strong>Connect</strong> <strong>One</strong><br />

<strong>SerialNET</strong> Quick <strong>Configuration</strong> Guide<br />

Example 2:<br />

Scenario: A server device which is connected to the LAN (Ethernet or WiFi)<br />

AT+iLPRT=55<strong>00</strong><br />

I/OK<br />

AT+iFCHR=\x0A<br />

I/OK<br />

AT+iMTTF=1<strong>00</strong>0<br />

I/OK<br />

AT+iIATO=60<br />

I/OK<br />

AT+iSTYP=0<br />

I/OK<br />

AT+iHIF=1<br />

I/OK<br />

AT+iSNSI=”9,8,N,1,1”<br />

I/OK<br />

AT+iAWS=1<br />

I/OK<br />

AT+iRRMA=user@webmail.net<br />

I/OK<br />

AT+iSNMD=1<br />

I/OK<br />

I/ONLINE<br />

Set the port number of the TCP listen socket<br />

Outgoing packets usually end with Line Feed<br />

character<br />

Accumulate data for 1<strong>00</strong>0 milliseconds<br />

before sending out a packet<br />

Actively disconnect a client which is idle<br />

for 60 seconds<br />

TCP socket<br />

Interface to the host is UART0<br />

Set baud rate to 1152<strong>00</strong>bps, 8 data bits, No<br />

Parity, 1 Stop bit, Flow Control signals enabled<br />

The embedded website will be active<br />

Email recipient for a registration message<br />

Activate <strong>SerialNET</strong> in mode 1. The TCP listen<br />

socket will always be available for a remote<br />

client to connect.<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!