Skip to content

Fix on firmware 01.07.01.00 and improve wifi connection setup#12

Merged
DutchDevelop merged 2 commits intoDutchDevelop:mainfrom
TheDutchDev:main
Dec 29, 2023
Merged

Fix on firmware 01.07.01.00 and improve wifi connection setup#12
DutchDevelop merged 2 commits intoDutchDevelop:mainfrom
TheDutchDev:main

Conversation

@TheDutchDev
Copy link
Contributor

@TheDutchDev TheDutchDev commented Dec 28, 2023

  • Added a filter on Mqtt JSON data parsing so it only parses the "print" part of the payload. For more info on filters: https://arduinojson.org/v6/how-to/deserialize-a-very-large-document/
  • During debugging from VSCode I noticed initial network setup took quite long. Turns out the while loop never exits, regardless of whether wifi connection succeeded or not. So I adjusted the while loop slightly to fix this issue. My ESP32 now always connects after first try. the 8 second delay can probably be reduced as well, although I did not test that as it wasn't within the scope of what I wanted to solve.

Tested on ESP32-WROVER. I expect this will work fine on ESP32-WROOM as well, although I have no idea about ESP8266.

I also had to disable merge_firmware.py on my local version as it would not build/deploy with that script. I don't know if this has any side-effects as I have no experience with this.

You can (and probably should) improve the filter further by really only filtering on the specific keys that are required for BLLed to function. Specifically the keys that are checked on in ParseCallback. If the current fix proves insufficient for ESP8266, improving the filter might fix it for that one

Add filter on MQTT layer to prevent memory overflow
Fix Wifi reconnect loop
@DutchDevelop DutchDevelop merged commit d1b23d6 into DutchDevelop:main Dec 29, 2023
aerodomigue pushed a commit to aerodomigue/BLLEDController that referenced this pull request Jul 13, 2025
Fix on firmware 01.07.01.00 and improve wifi connection setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants