This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Android discovery shows device as Dual, LE or Classic when both modes enabled



Hi Stonestreet,

I have been experiencing an issue on Android phones where when I do a discovery to perform a BR/EDR connection via classic that the discovery process is returning to me 2 objects - a Classic or Dual device type and a LE device type as separate entities/objects. If I don't check the device type and it reports the LE type and I attempt to connect via classic the phone connects via LE under the covers and everything fails horribly. This seems to only be an issue from 4.3+ when LE support was added. It seems as though Android will cache the devices and if it sees the same mac address but different device types it updates/replaces the classic one with the le one... As a workaround we thought about using a random address for LE so Android thinks they are different devices, but that seems a bit overkill.

What I don't understand is that when my device is discoverable in Classic and advertising in LE shouldn't the device only appear as a Dual mode device - not one for each mode? This could be an Android issue of course, but is there a setting I need to change so that the device is always a Dual mode device? I have seen the flag GATT_INITIALIZATION_FLAGS_SUPPORT_BR_EDR that can be passed to Gatt_Initialise and that you can set or clear the GATT_SERVICE_FLAGS_BR_EDR_SERVICE when starting the LE service or even add or clear the HCI_LE_ADVERTISING_FLAGS_BR_EDR_NOT_SUPPORTED_FLAGS_BIT_MASK in the advertising packet but am unsure of the correct combination of value to set. I guess the question is what do i need to change so that when discoverable and advertising at the same time the device is set to flagged as Dual mode?

For reference I am using a modified SPPLEDemoLite application, were we are using SPP for WinPhone and older Android's and LE on Apple / newer Androids.

Regards,

Barak

  • Hi,

    This looks to be a bug in Android. We have heard back from Customers saying when LE and BR/EDR was using the same Bluetooth address it combines them to a single one. The workaround was to use a static random address for LE so that you had 2 separate entries.

    Thanks,

    Stonestreet One.