leodesigner / espNowFloodingMeshLibrary2

ESP8266/ESP32 ESPNOW/Broadcast Arduino Flooding mesh library
Mozilla Public License 2.0
30 stars 9 forks source link

Esp32-c3 compatibility ? #6

Open Zhairgling opened 1 year ago

Zhairgling commented 1 year ago

Hi, thank's for your work !

I'm working with your fork. That's working fine with several esp32 like devkit and weemos d1mini but I can't get it working with the esp32-c3 board. Any advice ? Thank you again mate !

Zhairgling commented 1 year ago

define DISABLE_CRYPTING true

"solve" the problem

leodesigner commented 1 year ago

Do you get any specific error during compilation? Not sure how ESPNow supported on C3.

Please provide any additional details.

Zhairgling commented 1 year ago

It is not an issue with espNow but with the crypto lib used

brickstuff commented 1 year ago

So using a C3 board, all messages are sent in the clear? Is this due to the single-core processor or...? I was all set to try this using low cost C3 modules 😞 but need the encryption.

leodesigner commented 1 year ago

Do you get any specific compilation errors?

314159-r commented 6 months ago

I'm not having compilation errors related to this issue. For me the ESP32-C3 node device hangs. After sending time-sync message, and when receiving any message. So the first encryption works, but then subsequent decryption hangs...

I Googled, and found that the commands: esp_aes_acquire_hardware() and esp_aes_release_hardware() in the encrypt and decrypt functions in EspNowFloodingMesh.cpp, seems to be excessive. So I tested to comment them out - And now it works... :)

Comment or remove these lines in EspNowFloodingMesh.cpp: 837, 839, 873, 875

!! I have only tested this fix on a ESP32-C3 device, so I don't know how it works for other ESP32 variants.

That fixes the encryption problem - But... I can only use my ESP32-C3 node device together with an ESP32 master. And ESP8266 node devices only works with ESP8622 masters. I'll open a new issue for that - Tomorrow...