Informatic / py9b

Ninebot/Xiaomi electric scooter communication library
GNU General Public License v3.0
5 stars 1 forks source link

Unable to check BLE version on Xiaomi BLE firmware 091 #4

Open Informatic opened 4 years ago

Informatic commented 4 years ago

Just got a (somewhat verified) report of cli.py timing out on BLE version check before enabling encryption. https://github.com/Informatic/py9b/blob/c96a402245bd22249a6bb8164438f9ddc70c6879/cli.py#L44

Replacing that line with if True: seemed to help. Would be nice to just add a CLI flag to forcibly enable encryption in these cases. (or dynamically check if the encryption key characteristic is present, instead of checking BLE firmware version)