NordicSemiconductor / Android-DFU-Library

Device Firmware Update library and Android app
http://www.nordicsemi.com/dfu
BSD 3-Clause "New" or "Revised" License
774 stars 274 forks source link

Callback uses wrong mac address #217

Open dkijkuit opened 4 years ago

dkijkuit commented 4 years ago

DFU Bootloader version (please complete the following information):

Device information (please complete the following information):

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.

trix0 commented 4 years ago

Do we have workaround for this?

philips77 commented 4 years ago

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.

rouddy commented 3 years ago

Hi Does comparing 5 most significant bytes work well? How about mac address ends with FF?