keptenkurk / BS440

Python code to talk to Medisana BS440 bluetooth enabled bathroom scale
MIT License
50 stars 34 forks source link

Cannot connect to BS444 - Timeout #115

Open espspinix opened 8 months ago

espspinix commented 8 months ago

Hello,

I have a BS444 and in contrary to what others have reported, I can only connect to it with a BLEAddressType.random. I had connection timeouts (all configured properly and got really close to it) until I switched from public to random in the code.

Maybe it would be better to try to switch address type to random after the first timeout is unsuccessul and after a successful connect save the type of address type in the config for the future?

DjZU commented 8 months ago

Hi,

I also have a BS444 and always used BLEAddressType.random. Until the commit https://github.com/keptenkurk/BS440/commit/88d574077b6d3b09bf7d596683630d2437de59be it was working for me and since then I modified this in the code as well.

I also use time_offset = 0

I did connect the scale to the Android app before, did you? Either this has a consequence or there are different types of BS444 around?

Maybe the BLEAddressType should be an optional parameter in the BS440.ini to override the default logic? Same for time_offset.