Some parts of sent data is missing during GPRS connection

2 thoughts on “Some parts of sent data is missing during GPRS connection

  1. I’m using GL865 Dual module to sent data to a server over HTTP protocol. When I send data to a test server over GPRS, sometimes it works correctly but sometimes last part of the data is not received by server. In that case, sent  part of the data is nearly multiple of TCP packet size. For example, if I send 1KB data and packet size is 300 bytes, nearly 600 bytes of data (sometimes nearly 300 or 900 bytes of it) will be received by the server. The number is not 600 but always the same value. Problem is not connection drop. Server gets the data it can and responds with a short string containing the number of correctly sent data, then connection is closed.

    I tried many things:

    • Changed UART baud rates from 9600 to 230400. Best result isobtained at 38400.
    • Changed packet size. No effect on missing data. Affects only the number of bytes received by server: multiple of packet size.
    • Tried hardware flow control (AT&K3), but I have never seen the module blocking transmission. Probably 1KB is not big enough to stop receiving data from microcontroller.
    • Changed data send timeout (DSTO) to higher and lower values. It seems that smaller values are better. Set to 1 (100 ms)
    • Socket timeout is 0.
    • Checked whether there is a problem with microcontroller, there is no problem. Number of bytes received from server is less than number of bytes sent from UART in case of missing data. If no data is missed, they are the same.

    I tried many times to solve that problem but I cannot find the reason. Some other things:

    • Rate of erroneous transmissions ~5%
    • A microcontroller communicates with the module, I have written the library. It sends commands and listen for responses and sends other commands in order. When a connection is established, an array of data is output from UART.
    • I use HTTP 1.0 protocol.
    1. Use AT#SI to investigate if all data is handled by the socket, maybe some of it lost between the micro and module.

      Maybe there are baudrate issues, fix it in module with AT+IPR.