How to use sockets properly to reduce latency

5 thoughts on “How to use sockets properly to reduce latency

  1. We have a microcontrontroller which gathers data from a number of sensors in a system. This data, typically in chunks of 100-200 bytes 5 times per second, is packaged into Protobuf format and sent to a GL865 chip to be posted to a web page. This modem runs some Python scripts which are, among other things, intended to send this data along to a web server using HTTP POST.


    Now, after reading the manual I see that there are several ways of establishing and using a socket, and I’m not sure which way to go. What is the best approach (command mode, online mode, dual MDM…)  for achieving a low delay from receiving a data block to completing a HTTP POST request? Is there anything else I should think about such as trying to stay connected as long as possible in some way?


    New to socket programming in general 🙂

    1. I would say to try first the HTTP client dedicated AT commands, AT#HTTPCFG and AT#HTTPSND.


      1. Interesting! I was looking in the r15 version of the manual where those commands dind’t exist. They will probably make my life a whole lot easier. Thanks!

  2. We’re currently looking into these commands, but do you know if it’s possible to use multiple custom header lines or are you restricted to just one?