Android-DFU-Library
Android-DFU-Library copied to clipboard
Callback uses wrong mac address
DFU Bootloader version (please complete the following information):
- Bonding used: no
- Library version: 1.9.0
Device information (please complete the following information):
- Device: Oneplus 6
- OS: Android 10
During an update the bootloader could advertise with a different macaddress incremented by 1. All callbacks use the temporary address as a parameter. This makes it impossible to always correctly identify the original device from the calling activity. Please use the original mac address in the callbacks, or provide both.
Do we have workaround for this?
Hello,
No, so far there is no workaround. Indeed the returned BluetoothDevice is the current one, so in DFU mode it may have MAC address incremented by 1, if such is being used. You may compare 5 most significant bytes to compare and skip the last one, as only the last one gets changed.
Hi Does comparing 5 most significant bytes work well? How about mac address ends with FF?