MQTT remote control #507
Replies: 3 comments
-
tag @analogic because you added MQTT support in the first place. |
Beta Was this translation helpful? Give feedback.
-
This sounds like a very interesting project. TLS should be somewhat feasible in the new environment. In the past there simply was no space for a TLS library (with the default partitioning scheme) but after switching to the tasmoto version of the arduino-espressif environment (and moving the fonts out of the OTA code partitions) there is a bit of space left. For a start I would suggest to keep this as an optional feature (in features.h) and maybe not (at least not initially) include it in the default build (We can discuss this later depending on how many users there are and the code size). I am planning to add TLS based on mbed-tls (this might mean I will replace the current web server with a task running the default espressif web server, and mbed-tls is the default library used for that) for the integrated web server and possibly also for other parts, but have not specifically looked at the MQTT part for that. But surely using the same TLS library everywhere would be best. I am not too optimistic that async-mqtt-client will work out nicely. Briefly looking at the code it seems that it does not support certificates at all, and some comments in the "limitations" are also not encouraging. "not supporting TLS 1.2" probably means that it supports only TLS 1.1 (see also marvinroger/async-mqtt-client#126), but that might be outdated (axtls suppurts v1.2 nowadays). But seems like axtls does not support anything beyond basic RSA, i.e. no ECDSA But ECDSA is a rather hard challenge for the ESP32. The ESP32-H2 would have dedicated hardware for this task, but the usual ESP32 do not, a any EC calculation (signature verification) will easily take several 100ms, possibly > 1s... |
Beta Was this translation helpful? Give feedback.
-
While looking into ECDSA it appeared that https://github.com/kmackay/micro-ecc would be a good choice precisely because of the lack of dedicated EC accelerators devices like the TTGO. I'll have to benchmark the various PKI routines and if it's not too painful to check signatures using the RSA accelerator I'd switch to that. |
Beta Was this translation helpful? Give feedback.
-
So I'm deploying a network of TTGOs (if you can call a few of these things at friends' places a network) and I'd like to use MQTT for telemetry and control since they're all behind NAT. I've got a few thoughts about this and before I get too far I figured I'd start a discussion about requirements and stuff.
Requirements
Features
sondehub.antenna=J-Pole
)Prereqs
async-mqtt-client
already supports this, so I need to add a control to use TLSasync-mqtt-client
supports this too, so I need to add a control to verify certificates or allow any.async-mqtt-client
depends on axtls and I was thinking about using https://github.com/kmackay/micro-ecc to handle the ECDSA verificationBeta Was this translation helpful? Give feedback.
All reactions