Using httpclient libraries with custom transport

Neil.Macmullen
Posts: 11
Joined: Sun Mar 10, 2019 12:48 pm

Using httpclient libraries with custom transport

Postby Neil.Macmullen » Wed Aug 11, 2021 11:21 am

I would like to communicate with an external web server from the ESP32. However, we need to be able to do this via an external cellular modem that provides a raw socket interface (we already have a network stack that provides this).

It looks like the HttpClient library (https://docs.espressif.com/projects/esp ... lient.html) is hardcoded to use the Wi-Fi connection but I'm wondering if I'm missing a trick and there is some way to intercept the low-level socket open/read/write calls to allow use of an alternate transport?

Another possibility would be to port something like the mbed http library (https://os.mbed.com/cookbook/HTTP-Client) but I'd much rather use the built-in libraries if possible.

(Yet another approach would be to use the on-board _cellular_ support for HTTP connections but this leads to a scenario where we're using HttpClient for Wi-Fi connections and a completely different stack for cellular connections which is undesirable for testing.)

Any ideas ?

Thanks,
Neil

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 142 guests