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,"18.104.22.168" 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,"22.214.171.124",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.
at+wipdata=2,5,1 CONNECT And it works both ways! OK at+wipclose=2,5 OK
+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.
at+wipcreate=2,1,"126.96.36.199",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:
+WIPACCEPT: 1,5 at+wipdata=2,5,1
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.