Hi All,
Hopefully someone out there can help me with this. We are interfacing with the WIP stack from an external UART using the AT+WIP commands, developing a product that requires a server / client connection across a GPRS network, modem to modem. I am seeing some… aberrant behavior that I need some advice on.
We have 2 Q24NG modems, one is set up as a server like this:
at+wipcfg=1
OK
at+wipbr=1,6
OK
at+wipbr=4,6
OK
at+wipbr=3,6,15
+WIPBR: 6,15,"121.90.164.56"
OK
at+wipcreate=3,1,80,5,5
OK
The other is set up to connect to it as a client:
at+wipcfg=1
OK
at+wipbr=1,6
OK
at+wipbr=4,6
OK
+CGREG: 1
at+wipcreate=2,1,"121.90.164.56",80
OK
+WIPREADY: 2, 1
After we have connected from the client with the +wipcreate the server receives the +WIPACCEPT: 2, 5 as expected. +WIPDATA is received on both ends, we send AT+WIPDATA and we can get a continuous mode connection up. Data flies back and forward as you would expect, until we shut it down with +++ and AT+WIPCLOSE.
Server:
at+wipdata=2,5,1
CONNECT
And it works both ways!
OK
at+wipclose=2,5
OK
Client:
+WIPREADY: 2, 1
at+wipdata=2,1,1
CONNECT
There we have it, a solid connection+++
OK
at+wipclose=2,5
OK
So the first connect works just fine. However… when we try to connect to that same server a second time we can’t.
Client:
at+wipcreate=2,1,"121.90.164.56",80
OK
+WIPREADY: 2, 1
at+wipdata=2,1,1
At that point there is NO response to the AT+WIPDATA command. No error, no OK, nothing. We can send other AT commands, but whatever we do we can’t use the socket that was partially opened. The server end shows similar behavior:
Server:
+WIPACCEPT: 1,5
at+wipdata=2,5,1
Then nothing.
I’ve also attempted to open a socket to a known good POP3 server, the first time works perfectly well, the second time shows the same behaviour as I am seeing here.
At the moment I’m resetting both modems before we attempt to make the connection. It’s the only way I’ve found of getting it up reliably, but it takes around 50 seconds for each modem to init properly and that’s intolerably long.
Any suggestions would be gratefully received.
Cheers
-Blair Steven