Wip_write problem


#1

Hello,

If the Q26 has an established tcp connection to a server, when we write data using wip_write from the wavecom and it returns the same number of bytes as being written, is this guaranteed to have been received by the server tcp connection?

We have seen a case where the wip_write returns the bytes have been successfully written but we never get the data on the server. We think this should not happen as the tcp connection is end to end and acknowledged.

Paul


#2

i’ve seen this quite a bit on flaky network connections.


#3

How would you resolve it? Currently our system is communicating to a server where data is transmitted in one direction. If if the data is lost, the server is unable to send a request as it only accepts incoming data. The TCP connection is (wip_close) closed when the data is transmitted correctly by checking the wip_write return. If the return size does not match the system, it will resend the data until it is successfully transmitted. I also monitor the WIP_CEV_WRITE. The system is used as a vehicle location and the data we are monitoring is the ignition via the CAN bus. If an ignition state changes, the data is transmitted to the server.

We have toggled the ignition line 2664 times where it failed last night i.e. data is not transmitted to the server and wip_write returns with the correct data size. Right now, we are running a test that has not failed when the line is toggled more than 3100 times. The test is still running at this moment in time.

I have emailed Vodafone and the Wavecom FaE about our problem.


#4

This is not Vodafone nor youy FAE problem. TCP packets are acknowledged not by your server but by the first peer in network. Make some protocol over the TCP with acknowledges from server or use any protocol like FTP, SMTP, HTTP, whatever.


#5

And even if it reaches the server computer you couldn’t be sure that the server processed the packet well. For example in your case you can use UDP. If the server processes the packet and saves the data to the database than it can acknowledge it by sending back and ack. packet. It is the only way if you don’t want to miss data from the devices.


#6

Thanks for the response. We have asked the company that designed the server whether they want to change to an acknowledge server or transmit the data more frequently.


#7

Hello,

Have you guys realized if wip_write is adding 2 bytes as the size of the buffer transmitted on the payload? I’m trying to use it with HTTP and all the time it’s adding these values. See example bellow and note the 5F, which corresponds to 95 in decimal at the beginning of the payload data.

POST /HelloWMP/HelloServlet HTTP/1.1
Host: myserver.com.br:8088
Transfer-Encoding: chunked
User-Agent: WIPHTTP/1.0
Content-Type: application/x-www-form-urlencoded
Content-Length: 95

5f
p1=This is a big message that I want to send using the wip_write command via POST http method!

Is there a bug in the wip_write routine or am I doing something wrong?

Regards

Rafael


#8

https://forum.sierrawireless.com/t/wip-http-post-problems/4220/4