AutoTCP setup for M110
AutoTCP setup for M110
Prerequisites
You need to install any terminal program (such as HyperTerminal, TeraTerm, Falcom Workbench, Smart Terminal, etc.) that allows you to send AT commands over the serial port to your modem. For the AutoTCP Server mode, a SIM card with public IP address will be required. Otherwise, the SIM card will need to be inside a private APN so it can be reached over a private tunnel.
Setting up AutoTCP Client
Send following AT commands to your modem in order to configure the AutoTCP functionality on client mode:- AT#IPCELLULAR to configure APN, user and password for SIM card, for example AT#IPCELLULAR=1,"APN","user","pass"
- AT#IPTCP to define the TCP server settings to which the modem should connect, for example, AT#IPTCP=1,'C',"<ip_address>",1
- AT#AUTOTCP=1 to activate the TCP function.
- AT#RESET to restart the modem.
- A few second after the modem is started, it will show the text CONNECT meaning that it has established the connection against the remote TCP server.
AT#IPTCP=1,60000,'C',"162.242.170.49",1
AT#AUTOTCP=1
AT#IPCELLULAR=1,"internet.lte.cxn","a","b"
AT#RESET
After restarting, the modem connects automatically to the remote TCP server and displays the string "CONNECT" to indicate that has entered data mode. Upon sending the string @test!, the remove server replies back with @test,OK! showing that there is a two-way communication between the modem and the server. It is possible to break the data mode and go back to the command mode by sending +++.
Setting up AutoTCP Server
Send following AT commands to your modem in order to configure the AutoTCP functionality on server mode:- AT#IPCELLULAR to configure APN, user and password for SIM card, for example AT#IPCELLULAR=1,"APN","user","pass"
- AT#IPTCP to define the settings for the AutoTCP server mode.AT#IPTCP=1,<port_number>,"S","<ip_address>",1. <ip_address> can be used to allow connections from specific IP addresses only. So, you can set "255.255.255.255" to allow an incoming connection from any host or "123.123.123.123" to allow incoming connections from that specific host only.
- AT#AUTOTCP=1 to activate the TCP function.
- AT#RESET to restart the modem.
- A few seconds after the modem is started, it will show the text +UUPSDA: 0,<ip>
AT#IPTCP=1,60000,"S","255.255.255.255",1
AT#AUTOTCP=1
AT#IPCELLULAR=1,"data641003","a","b"
After this, you can send messages from the Serial connection to the TCP server. In order to do so, a TCP connection will be open against 100.79.0.115:60000 (the IP address assigned to the SIM card inserted into the modem and the port we have configured in AT#IPTCP command). After having established the TCP connection, it is possible to send data from the TCP client connection to the serial interface of the modem and vice versa.
[Originally Published On: 09/23/2019 11:22 AM]