mariolukas / Bluetti_ESP32_Bridge

Bluetti Power Station ESP32 Bluetooth to MQTT Bridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No BT reconnect at all (without reboot) - today I found the reason

AlexBurghardt opened this issue · comments

Today I took a closer view at BTooth.cpp and found the reason for not trying a reconnect once the BT connection dropped.

Since I am a C++ newbie I will need some time to create a properly working fix.
I don't want to produce memory leaks.

So I will make a new PR after my current PR is checked and the usefull parts are merged.

With my unfinished fix the connection drops when I switch BT off on my AC200M but get's re-established right after I switch it on again.

Anyway, it is just a try and if I run into further problems I don't see right now, a reboot would be the best way.
Edit: there are problems when BT is turned off for longer time. Further investigation is needed.

Will close this because it seems more complicated than I initially thought. Try to fix it anyway.