-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After power cycle bthome broadcasts using random bindkey #372
Comments
You are using 2 bind-keys. |
Ahh, thank you for your edit, that clarifies things for me a lot. So I should use the "Show all mi keys" button then "!Erase all Mi Keys!" button to clear them? I am curious why the custom firmware loads the mi key at all instead of just loading the flash_eep by default? |
Because it can work with Xiaomi gateway if you know the keys and entered them during flashing (use key "Login"), and also if after "authorization" the replace key with the previous one button is used. In the new version 4.4 (current status: beta version), only the value from the "EEP BindKey" is taken as the binding key. |
Fantastic, thanks! That feels a lot more logical. I've tried the beta on a couple of devices and it seems to be working well 👍🏼 |
After I power-cycle my LYWSD03MMC's, they start broadcasting with what I think is a randomised bindkey, not the one I had configured it with. The bindkey appears to be stored in flash OK, and works if I re-configure the bindkey, but stops working after a power-cycle.
Steps to reproduce:
Configure LYWSD03MMC with:
Send a bind key to the device
disconnect
Remove the battery from the device for several seconds, then reinstall battery.
Connect to the device
Device sends encrypted advertisements, and homeassistant can decrypt them OK.
(note: currently Homeassistant's BTHome integration has a bug where it gets stuck trying to re-auth/reconfigure the device, I'll link to the PR to fix that once I've raised it)
Guesses :-)
I notice that
init_ble
is called beforebindkey_init
but I don't know if that matters at all.Since I can read the bindkey after a reboot it looks like the flash is working OK, but for some reason the device starts up not using the bindkey that is stored in flash.
The text was updated successfully, but these errors were encountered: