Closed fastbytes closed 1 year ago
hmmm...it should work. I'm using MQTTS on mine with the same fields filled out. Do your MQTT broker logs show any helpful error messages?
Nothing at all, the device doesn't even appear to connect. If it works for you then must be something on my end. Will try to enable more debug logging and go from there.
What version ESP-IDF are you using?
EDIT: never mind I can see in the logs 4.4.2
Check your sdkconfig
to ensure you have CONFIG_MQTT_TRANSPORT_SSL=y
. I was able to replicate your error by turning this option off. You'll need to make clean
after changing this option in order to ensure the MQTT library is rebuilt with TLS support.
Running make clean
fixed it! Must have been missing after toggling it back/forth trying to get the initial link setup, but it's working great now.
Running ESP-IDF 4.4.2, connected successfully over MQTTS!
Closing issue -- we can chalk this one up to user error :)
Firstly, this is fantastic work! This is working with my Smoke X4 and TTGO Lora32 V1 with some minor changes. Few those new to ESP-IDF, be sure to set your XTAL and CPU frequency, otherwise baud rates and wifi will not work.
However, I couldn't get MQTT working. If the URI is defined as
mqtt://some.ip.add.ress
, then there are errors in logs stating that mqtts wasn't used but there are ssl related parameters configured. Once configured as mqtts (yes, confirmed SSL certs and CA Cert was setup correctly), then I getThere are no transports valid, stop mqtt client
.I was able to get past this using mqtt (without 's') and then removing
.cert_pem = app_mqtt_params.ca_cert
fromapp_web_ui.c
, but it feels like a step backwards and that I'm missing something.Is there something else that needs to be configured here?