CoAP + HTTP possible on ESP32?

I have a situation where I’m needing to have the ESP32 act as an HTTP client. This same ESP32 also needs to talk to Golioth via CoAP.

I’m running into issues where implementing the basic HTTP client on the ESP also starts causing CoAP issues. Specifically, I’m getting a “failed to open a connection” error on the http client, and getting an intermittency on the CoAP side of things.

I wanted to check: Is there anything under the hood that would cause conflicts between these two? Both CoAP and HTTP are application layer protocols, so I’m assuming they shouldn’t step on each others “toes”, but I wanted to see if there’s an issue I’m not aware of.

Hi Seth!

I don’t think we’ve tried running both yet, but I agree, in theory there shouldn’t be anything fundamental that prevents HTTP and CoAP from coexisting. Just curious, what are you trying to run over HTTP?

Can you share a minimal example that reproduces the issue?


Hi Seth,

I was able to get HTTP and CoAP running side-by-side by taking the ESP-IDF http_request example and adding it in to our golioth_basics example. Can you try that and see if it works for you?


Hi Sam,

Thanks for checking that. I’ll have to give it a try at some point.

At the moment, we decided to take another path, which is to just run a small server which will do the http requests, and post it as a setting in Golioth.