Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
30
<CR>+TCPSETUP:Error <err><CR>
<err>: Error code
Example
AT+TCPSETUP=0,220.199.66.56,6800
OK
+TCPSETUP:0,OK
The connection to 220.199.66.56,6800 is
successfully set up on socket 0.
AT+TCPSETUP=0,192.168.20.6,7000
OK
+TCPSETUP:0,FAIL
Failed to set up the connection to
192.168.20.6,7000 on socket 0. The
server is probably not started, the IP
address is incorrect, or the SIM card is out
of credit.
AT+TCPSETUP=0,201.128.20.6,7000
+TCPSETUP:Error 1
A TCP/UDP connection has been set up
on socket 0.
AT+TCPSETUP=201.128.20.6,7000
+TCPSETUP:Error 2
The command format is incorrect.
Remarks
Use the
AT+XIIC=1
command to set up a PPP connection before running this command.
3.3
Sending TCP Data: +TCPSEND
Description
To send TCP data
The module will returns
>
after this command is sent. Send TCP data 50 ms to 100 ms
later.
Format
AT+TCPSEND=<n>,<length><CR>
Parameter
<n>: Socket number, ranging from 0 to 5. A TCP connection is established on the socket.
<length>: The length of the data to be sent, ranging from
1
to
2000
, unit: byte.
Return Value
See the Example.
Example
AT+TCPSEND=0,10
>
OK
+TCPSEND:0,10
10-byte data is successfully sent through
socket 0.
AT+TCPSEND=0,10
>
+TCPSEND:Error
Failed to send 10-byte data through
socket 0.
AT+TCPSEND=0,536
+TCPSEND:Buffer not enough,439
2800-byte data fails to be sent on socket 0
because the buffer is not enough.
AT+TCPSEND=0,2800
+TCPSEND:Data length error
2800-byte data fails to be sent on socket 0
because data length exceeds the limit.