This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HTC Nexus 9 tablet 7.0.1 does not see advertisements from BleHeartRateMonitor nRF2840

My HTC Nexus 9 tablet OS 7.0.1  does not see the advertisements from an nRF5840 dongle running the BleHeartRateMonitor demo from pc-ble-driver. All my other Androids do. Is this a known issue with the HTC tablet?

Parents Reply Children
  • Yes. It discovers other BLE devices without a problem. The Android settings menu doesn't see it either, and that does NOT need any location permissions. The only thing I can think of is that there is something funky in the advertisement that the HTC does not like. I just wondered if there are certain Androids that do not work with the nRF52840. Buy any BLE device on the market and there are typically a set of Androids they do not work with.

  • I think I have an answer to this one. It looks like the HTC Android will not accept an advertisement unless it has a flags field. The example ble heart rate monitor ads did not contain a flags field. I added one and the device was discovered. I do recall that if you did not set the does not support EDR/BR bit, Androids would do EDR/BR.

  • I would suggest adding the following code to the BleHeartRateMonitor

    // Set the flags - important to indicate no EDR/BR support for some Androids
    data_buffer[index++] = 2; // length of flags data type
    data_buffer[index++] = BLE_GAP_AD_TYPE_FLAGS;
    data_buffer[index++] = 6; // No EDR/BR support and general discoverable

    to add the flags to the advertisement. This will stop Androids from falling back to their default behavior of selecting EDR/BR when nothing is provided. (This is a behavior of the Broadcom stack as I understand it.)

Related