Motorola G24 ユーザーズマニュアル

ページ / 642
Chapter 3:  AT Commands Reference
 December  31, 2007
AT Commands Reference Manual
3-387
Example
AT+MIPCALL=1,"internet","User1","Pswd"//Connecting the provider 'Orange' and getting an IP
+MIPCALL: "123.145.167.230"
AT+MIPCALL=0//The terminal hangs up the link
OK
+MIPOPEN, Open a Socket (UDP or TCP)
This command causes the G24 module to initialize a new socket that waits for a connection from 
a remote machine or opens a common or TCP secured with SSL connection with a remote side 
(according to received parameters). Each socket allocates an accumulating buffer whose size is 
1372 bytes.
Note:
MIPxxx is a complete set of GPRS commands. This set should not be used with other 
GPRS commands, such as CGATT, CGACT, and so on.
The +MIPOPEN command returns a +MIPSTAT unsolicited event if it fails, for example,
if it was rejected by the remote side.
The +MIPOPEN command returns a +MIPSSL unsolicited event(s) in case of alert(s)
occurring during secure connection. See 
.
SSL connection is not supported for listening sockets.
Example
+MIPOPEN: 1 2 3 4//All sockets closed
+MIPOPEN: 1 3 4 //Socket 2 opened
Command Type
Syntax
Response/Action
Remarks
Set
AT+MIPOPEN= 
<Socket ID>, 
<Source Port>, 
<Remote IP>, 
<Remote Port>, 
<Protocol>
OK
or:
+MIPOPEN: <Socket 
ID>,<State>[,<Remote IP>,<Remote 
Port>]
or:
+MIPSTAT: <Socket ID>,<Status>
or:
ERROR: <err>
The Set command returns 
<Remote IP> and 
<Remote Port> 
parameters only for 
sockets opened in Listen 
mode.
Read
AT+MIPOPEN?
+MIPOPEN:[<SocketID>]
for each socket that can be opened
or:
+MIPOPEN 0 
if there are no free sockets.
The Read command 
returns the numbers of 
the sockets that can be 
opened.
Test
AT+MIPOPEN=?
+MIPOPEN: (list of supported 
<socket ID>s),(list of supported 
<source port>s),(list of 
supported<"Destination IP">s),
(list of <destination port>s),(list of 
supported <protocol>s)