I detected the same problem, but i don’t know where come from.
For me when i want to send data to server i open the socket, i send data, and close the socket.
And after in certain case when i try to open a new socket i also receive the
For these problem i have received a wavecom response :
[b]The -34 (ED_ERR_DISTANT_OPEN) is encountered in the following conditions:
The error -34 (ED_ERR_DISTANT_OPEN) can be received when the received signal strength is weak. This problem occurs when the modem is in an area of weak signal strength, such as in roaming etc. The received signal strength can be checked by executing the command â€œAT+CSQâ€.
If the â€œAT+CSQâ€ command returns â€˜99â€™, it means that the network is not detectable.
2. This error can also be received in case the TCP sequence numbers become invalid. In such case, the TCP server sends the correct sequence
number to the TCP client. If the client is not able to synchronize it after a number of repeated attempts by the server, the listening server closes
and receives ED_ERR_DISTANT_OPEN. The client entity receives ED_ERR_DISTANT_TCP_CLOSED_BY_PEER event and the socket gets closed.
When a TCP socket is closed on receiving -34 error, the socket needs to be created afresh. To solve the -34 error from an Open AT application, a check can
be applied on â€œAT+CREG=1â€ command responses. The syntax for the command is:
If the â€œAT+CREG=1â€ command returns unsolicited response â€œ+CREG: 1, 2â€, it means the ME is searching for the network. In such case, the application
should wait for the module to get attached to the network (â€œ+CREG: 1, 1â€) and try to establish the TCP socket again from within the application. As soon
as the module gets attached to the network, the module will try to reestablish the TCP socket.
BUT in my case that didn’t solve my problem so when i detect 3 times consecutively these error i close my session IP and i re-open a new session (i retreive a new fresh IP adress) and it look working.
Just a question when you have these problem do you think you have move and change of BTS ?