danielfett / bluebattery.py

6 stars 5 forks source link

always discover device and then check address #7

Closed kscheff closed 2 years ago

kscheff commented 2 years ago

There have been issues that a connection to a given Mac address did not go through. Auto discover mode always succeeded. After a successful auto discover session, a 2nd connection was possible with a given mac address.

So this change always uses discover mode and in case of a given mac address it only connects when the discovered device mac address is equal to the given one. Tested on Raspberry Pi Zero W2 with Bluez 5.55.