EasyManua.ls Logo

Neoway M590E - TCP Server AT Commands; TCP Server Listening

Neoway M590E
65 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Neo_M590E V1 GPRS Module AT Command Set
Copyright © Neoway Technology Co., Ltd
44
6 TCP Server AT Commands
6.1 Setting TCP Listening for the Server: +TCPLISTEN
Description
To set the TCP listening function of the server
Format
AT+TCPLISTEN=<port><CR>
Parameter
<Port>: Port ID
<Socket>:SOCKET ID
Return Value
<CR><LF>+TCPLISTEN:<socket>,OK<CR><LF>
<Socket>:SOCKET ID, at most five sockets at one time
Example
AT+TCPLISTEN=6800
+TCPLISTEN:0,OK
or
+TCPLISTEN:bind error
Listening port ID: 6800
The listening function of the server is
started.
Failed to bind
AT+TCPLISTEN=6800
Listening...
Transparent listening has been set.
AT+TCPLISTEN?
+TCPLISTEN:listening status
Query the listening status. Here the
server is in the listening status.
AT+TCPLISTEN?
+TCPLISTEN:not listening
Query the listening status. Here the
server is not in the listening status.
Connect
AcceptSocket=1,ClientAddr=119.123.77.133,C
lientPort=8000
Receive the connection request from
the client.
AcceptSocket
indicates the
socket ID on the module, and
119.123.77.133
is the IP address of the
client.
Remarks
Activate the PPP before using this command.
Only the SIM cards with fixed IP addresses can be used as servers.
6.2 Closing the Listening Connection: +CLOSELISTEN
Description
To close the listening connection and close all connections
Format
AT+CLOSELISTEN<CR>
Parameter
N/A
Return Value
<CR><LF>+CLOSELISTEN:<socket>,local link closed<CR><LF>
Socket: SOCKET ID
Example
AT+CLOSELISTEN
+CLOSECLIENT:1,remote link closed
The local link will be closed if there is any
connection to the client.

Table of Contents

Related product manuals