Android-DFU-Library icon indicating copy to clipboard operation
Android-DFU-Library copied to clipboard

Callback uses wrong mac address

Open dkijkuit opened this issue 5 years ago • 3 comments

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.

dkijkuit avatar Feb 08 '20 22:02 dkijkuit

Do we have workaround for this?

trix0 avatar Aug 26 '20 07:08 trix0

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.

philips77 avatar Aug 26 '20 08:08 philips77

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

rouddy avatar May 25 '21 02:05 rouddy