I-Connect / NukiBleEsp32

MIT License
37 stars 21 forks source link

Misc improvements + Alternative connection mode #71

Closed iranl closed 3 months ago

iranl commented 3 months ago

Couple of small fixes/changes:

Add an alternative connection mode when NUKI_ALT_CONNECT is defined, based on https://github.com/h2zero/esp-nimble-cpp/blob/master/examples/Advanced/NimBLE_Client/main/main.cpp.

Issues reported on Nuki Hub Discord and Github point to dangling BLE connections with the current connect function of this library. The proposed alternative connection mode seems to fix these issues. By using this mode only when NUKI_ALT_CONNECT is defined aim for maximum compatibility while testing this mode on a larger group of users.

Edit: With the alternative connection mode the ESP32-C6 also seems stable (although it still won't pair, needs manual pairing)

technyon commented 3 months ago

Hi,

Are you sure increasing the TX power is necessarily a good idea? With radios, more isn't always better. Maybe we should make this configurable, it could really depend on the local environment of the user wether or not this makes sense.

iranl commented 3 months ago

Hi,

Are you sure increasing the TX power is necessarily a good idea? With radios, more isn't always better. Maybe we should make this configurable, it could really depend on the local environment of the user wether or not this makes sense.

Done