Delay in socket

18 thoughts on “Delay in socket

  1. Hello,

    I’m connecting a GL865 module with a server via socket. When the module sends the received data to the microcontroller I’m using, the first character comes with one second delay until the rest of the data sequence. Bellow is the sequence of data communication in the uart. I’d like to know why it is doing that and if there’s any way that I can force the modem to send me the whole sequence of data at once.

    [m[INFO][14/10/15 18:06:47.236][‘_ctx.inputBuffer.data’], size=[11] : 0D 0A 43 4F 4E 4E 45 43 | 54 0D 0A — — — — — | — — — — — — — — | — — — — — — — — : ..CONNECT..

    [m[INFO][14/10/15 18:06:48.010][‘sendPacket’], size=[27] : 00 19 33 35 38 30 37 32 | 30 34 31 35 34 32 31 38 | 31 00 06 31 2E 31 2E 30 | 31 00 00 — — — — — : ..358072041542181..1.1.01..

    [m[INFO][14/10/15 18:06:50.490][‘_ctx.inputBuffer.data’], size=[1] : 00 — — — — — — — | — — — — — — — — | — — — — — — — — | — — — — — — — — : .

    [m[INFO][14/10/15 18:06:51.495][‘_ctx.inputBuffer.data’], size=[10] : 09 80 00 00 01 50 67 88 | 4D 15 — — — — — — | — — — — — — — — | — — — — — — — — : …..Pg.M.

    Best Regards,

    Denis

    1. It can be a flow control problem (enabled with floating lines) or a delayed packet sending because of socket configuration, <txTo> of AT#SCFG which is 5 seconds by default.

      1. Hello Cosmin,

        The delay is at receiving characters from the modem (that data that the server sends to me) – not from the modem to the server.

        Anyway I’m using <txTo> 1 (100ms) – I tried to use values between 256 and 264 (10 to 90 ms), but received error, which is also strange.

        Best Regards,

        1. <txTo> values 256 to 268 are available only in the latest 10.01.xx2 firmware but won’t make a change though.

          1. Hello,

            I also just saw another strange behavior. I sent #SD, after 2.5s I received, and after almost 2s I received the rest of the string, nCONNECTrn. 

          2. Yes, I’m using flow control for CTS and RTS. I analyzed the RXD pin an saw on the osciloscope the same 1 second delay. I will send the video tomorrow.

          3. Hello, I attached a signal analysis of the pins RTS, CTS, TXD and RXD when I send data to the server. I’m using baudrate 9600, and the uart is reading all the commands finely so far. 

          4. And now I’m attaching the signal analysis when I receive data from the server. The thin line on the right side of RX graphic is the 0x00 i receive from the server. The lines on the left comes 1.5s later – they are {09 80 00 00 01 50 70 C2 02 D4} in hexadecimal.

            Log:

            [m[INFO][16/10/15 13:06:24.390]Modem_RxTask: 0D 0A 43 4F 4E 4E 45 43 | 54 0D 0A — — — — — | — — — — — — — — | — — — — — — — — : ..CONNECT..

            [m[INFO][16/10/15 13:06:24.544]Modem_Send Packet : 00 19 33 35 38 30 37 32 | 30 34 31 35 34 32 31 38 | 31 00 06 31 2E 31 2E 30 | 31 00 00 — — — — — : ..358072041542181..1.1.01..

            [m[INFO][16/10/15 13:06:26.654]Modem_RxTask  : 00 — — — — — — — | — — — — — — — — | — — — — — — — — | — — — — — — — — : .

            [m[INFO][16/10/15 13:06:28.132]Modem_RxTask : 09 80 00 00 01 50 70 C2 | 02 D4 — — — — — — | — — — — — — — — | — — — — — — — — : …..PpÂ.Ô

          5. Hi Denis,

            please write me the whole sequence of initialization command, since I can’t reprooduce here this behaviour.

            Here i can see the CONNECT after 1 sec form #SD command (but time can vary, depending on connection quality).

            All the string coming down from my server are outputted on UART together, with no delay.

          6. <txTo> values 256 to 268 are available only in the latest 10.01.xx2 firmware but won’t make a change though.

            When latest 10.01.xx2 firmware is expected to be released? 

          7. Hello,

            the attached log show all the communication between the modem and the uController since power on. Last actions are: send message to the server, receive message with first character delay.

            Best Regards,

          8. Hi

            here I’m not able to reproduce it. I always receive the paccket with chars all together.

            Are you sure you have all the flow control line correctly managed?

            And, are you sure the server send always the packet together with no delay?

          9. Hi,

            the flow control is fully functional (as you can see in the signal analysis I sent). The guy responsible for our server told me that the server sends the whole string at once. Can I connect to your server to verify whether the same delay is experienced?

          10. Try a connection to a time server for example time.nist.gov port 13, or it.pool.ntp.org same port 13.

          11. I received the data from the time server correctly. I’m verifying with the server guys here what might be going on.

            Thanks!!