nopnop2002 / esp-idf-can2mqtt

CANbus to mqtt bridge using esp32
MIT License
40 stars 8 forks source link

Need some kind of security for sensitive aplications. #4

Closed Deivik12 closed 1 year ago

Deivik12 commented 1 year ago

I will start by saying that its really nice code, and it saved some work for me and my esp32. Although for some sensitive application it would be better use mqtts instead of mqtt. Because anyone can reverse engineer unencrypted wifi traffic and then inject their own canbus messages which can cause damages, which would be major risk to use this code.

I know that esp32/s3 is capable and Ive seen mqtts examples. I was wondering will you release mqtts version of code? Although it might be slower and will need some code optimization, but I would apreciate this update and make a donation.

P.S. user and password authentication doesnt protect from wifi attacks. Best way would be use encrypted protocol like mqtts.

nopnop2002 commented 1 year ago

Try latest.

config-mqtt-11

Deivik12 commented 1 year ago

I will try it out monday, measure speed, and let you know how it goes overall. Thanks, Ive thought you need add extra code to use mqtts

nopnop2002 commented 1 year ago

i added a little bit of code.

Deivik12 commented 1 year ago

Yeah I see now that you updated the code aswell. Great job man. You resolved issue very fast.

Maybe I should make seperate issue, but I dont want to spam. Any chance you would consider add second channel of mqtt2canbus with mcp2515? There are some espidf mcp2515 libraries in github. Also there is collin80 arduino library which allows to use both built in can and mcp2515 can. Im just not sure if esp32s3 would run stable with 2x canbus2mqtts channels.

nopnop2002 commented 1 year ago

ESP32C6 has 2 channels of TWAI.

However, ESP-IDF does not yet support a second TWAI.

Once ESP-IDF supports second TWAI, we can use can2can.

This issue will be closed for now.

You can reopen this issue at any time.