TCP connection problems on second attempt


#1

Hi

I’m using a M1306B which is running WIP Soft v201 on Open AT OS v312.

I am having a problem with open TCP sockets. Everything is fine the first time I attempt to open a client socket to my server after power on. I can open the bearer, start the bearer, create a socket connection with the AT+WIPCREATE command (and get the +WIPREADY: response) and then I can issue a AT+WIPDATA=2,1,1 command and get the CONNECT response. I can send data to the server and so on. I then close the session by issuing a +++ and followed by AT+WIPCLOSE.

Everthing seems fine so far but now if I try to make a second connection I don’t get the CONNECT response to the AT+WIPDATA=2,1,1 command (in fact I get no response at all and the UART stays in the modem mode). I have tried closing and stopping the bearer but and repeating the entire process but it still won’t connect. It will only connect the first attempt after power up.

Is this a software problem or am I missing a vital step after closing the connection? Any help would be greatly appreciated.

PS.
What is the latest firmware version and IP stack version and where can I downoad it from?


#2

Hi!

I do connect TCP socket test many times – no problem but sometime I have unexpected responce to AT+WIPCREATE, without CME code: ERROR. I think it is GPRS session down problem.

Which responce your take to AT+WIPCREATE?


#3

Hi

Thanks for your reply. Here is the command sequence I am testing with.

AT+WIPCFG=1
OK

AT+CGDCONT=1,“IP”,“www.vodafone.net.nz”,“0.0.0.0”,0,0
OK

AT+CGATT=1
OK

AT+CGREG=1
OK

AT+CGREG?
+CGREG: 1,1
OK

AT+WIPBR=1,6
OK

AT+WIPBR=2,6,11,“www.vodafone.net.nz”
OK

AT+WIPBR=4,6,0
OK

AT+WIPCREATE=2,1,“203.97.202.37”,9995
OK
+WIPREADY: 2, 1

AT+WIPDATA=2,1,1
CONNECT

(sending data here ok)

+++
OK
+WIPPEERCLOSE: 2,1

AT+WIPCLOSE=2,1
OK

Now when I try to connect for the second time I send;

AT+WIPCREATE=2,1,“203.97.202.37”,9995
OK
+WIPREADY: 2, 1

AT+WIPDATA=2,1,1
(I dont get the “CONNECT” response here!)

AT
OK
(It is obviously still in modem mode)

:frowning:

My modem has WIP Soft v201 on Open AT OS v312.

What firmware versions are you using?


#4

My Q24Plus version respond:

ati3
657e09gg.Q24PL001 1961548 103107 17:56

at+wipcfg=3
WIP Soft v301 on Open AT OS v313
Sep 28 2007 14:53:28 WIPlib:v3a02 WIPSoft:v2a07
OK

I just make an firware and plug-in update but previous version of WIP v201 do not work with symbolic Domain Name Adresses, numeric only (DNS server bug)!
Updates can be found in latest OpenAT package on Wavecom site (product Download section upon registration).

From my prewious Wavecom expirience I can say: Sometime exchange of command place in sequence take unexpected result. I try to use Guide examples and all precautions/warning as is written.

In your case command
AT+CGDCONT=1,“IP”,“www.vodafone.net.nz”,“0.0.0.0”,0,0 may be changed to AT+CGDCONT=1,“IP”,“www.vodafone.net.nz”

next: AT+CGATT=1 and AT+CGREG=1 may be not need because WIP stack make GPRS bearer connection while process AT+WIPBR=4,6,0 command.
next: AT+WIPCLOSE=2,1 after socket close responce +WIPPEERCLOSE: 2,1 may be unnecessary too?

You can to do setup sequence in manual mode from Hyper Terminal program. Do not forget to restart modem before next try.

Did you use [ETX]/[DLE] incapsulation of data stream? When you say AT+WIPDATA=2,1,1 it is mean “TCP Socket Continuous mode”, refer to Guide for details of this transfer mode.

Luck to you!