Beetle ESP32-C6 Mini: Networking is very unstable, MQTT mostly not working

userHead dannyyy 2024-07-11 16:37:48 33 Views2 Replies

I have two Beetle ESP32-C6 Mini boards, without any modifications (e.g. soldering). Both boards are equally affected by the issues described below.

 

Meanwhile, I'm able to establish a WiFi connection reliably after modifying all the example codes a bit. But it's still a fact, that establishing a WiFi Connection (until I get an IP address from the DHCP) is slower than I'm used to with my other ESP32 Beetle boards (e.g. Firebeetle ESP32-E). But I guess it's good enough.

 

As soon as I try to use the network connection, everything gets unreliable and unstable. I mainly focus here on MQTT, as it is the most important feature I need for my project.

One thing first, I wrote the code for different frameworks (Rust, Arduino) and tried in addition several example codes from Espressif and other public repositories (Rust, Arduino, ESP-IDF). All of them share more or less the same behavior. Some code was not working at all on the ESP32-C6 but on ESP32, and other is very unreliable on ESP32-C6 but perfect on ESP32.

 

As soon as I try to establish a MQTT connection to a broker in the local network (Mossquito, no auth) the callback reports “BeforeConnected” and after few seconds “Disconnected”. The broker logs that there was an initiation of a connection. But the ESP32-C6 never transitioned to a Connected state. Trying to publish some messages will fail, of course. The used method retries after several seconds again (background loop) and mostly fail again. After 10-20 retries, a more or less stable connection can be established and maintained.

With this major issue, I'm able to push out one message after 90 - 120s while the MCU is fully busy and consumes a lot of power. In my use case, where I need to go to deep sleep after a reporting cycle, I cannot have a busy cycle of almost two minutes. Same code on a ESP32 from startup to deep sleep takes ~1s.

 

I can supply two code files (Arduino and Rust), which exactly replicate the explained behavior. 

What is wrong with my code? Or are there general issues with ESP32-C6? Or just a design flaw with the Beetle ESP32-C6 Mini boards?

icon Examples.zip 5KB Download(0)
2024-07-15 23:15:52

Look at the serial output logs from the ESP32-C6 during the WiFi and MQTT connection process. These logs can provide insights into where the connection is failing or slowing down.

userHeadPic lia.ifat
2024-07-15 21:31:18

Can someone confirm this behavior or reject?

I'm really curious to know whether it's a code, board or MCU issue

userHeadPic dannyyy