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

BLE legacy advertising with SDK V16 on nRF52820?

I have a nRF528420 [on Skylab module SKB501] and have wired up a custom connection to USB.  I'm able to program NRF52 with both softdevice S140 and BLE Peripheral ble_app_uart without any problem (I built SDK V16 version using Eclipse (2019-12 build) and installed with PE Micro ML Universal, with latest GCC ARM package on Windows 10).  I'm able to connect to NRF52 from Android NRF UART app on Samsung SM-G890A (Android V6.0.1) phone and send data back and forth from Windows PC [running Tera Term].

The only changes I made are the Device Name (changed from "Nordic_UART" to "Nordic_2UART") and changed the advertising timeout to be zero.

However, I'm not able to see it from Nexus 9 [Android 7.1.1] tablet.  Both NRF Connect and NRF UART Android Apps fail to scan the device. 

The unmodified SKB501 has a firmware that advertises as nRF52 and it shows up on both Samsung phone and Nexus 9.

I have searched for advertising and NRF52 and older BLE and found a page with the words " ble_adv_legacy_enabled must be set to true for your advertisments to communicate successfully with older Bluetooth LE devices that do not support extended advertising" and since it was an SDK15 link I thought I would search for SDK16 and https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_sdk%2Fstruct%2Fsdk_nrf5_latest.html&cp=7_1 has the same info.  However, when I searched through the source ${SDK16}/components/ble/ble_advertising/ble_advertising.h, no such structure name can be found.  So, how do I make legacy BLE support work?  Or is there something else going on with Nexus 9?

Thanks for any help!

Parents
  • Hi,

    Most of our examples use "legacy" advertising by default, including the ble_app_uart example. It's really advertising without the advertising extension feature from Bluetooth 5 as Håvard explains in this thread: https://devzone.nordicsemi.com/f/nordic-q-a/34139/sdk-references-ble_adv_legacy_enabled-but-does-not-seem-to-exist.

    I think it must be something else causing this. But it's strange that it gets seen by the Samsung phone when it's not seen on the Nexus. 

    The only changes I made are the Device Name (changed from "Nordic_UART" to "Nordic_2UART") and changed the advertising timeout to be zero.

     Just to confirm, both the Nexus table and Samsung phone was tested after you made these changes? Because the BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE flag in advertising_init() must be replaced with BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE to support advertising without timeout. 

  • Sorry for not adding the details: Yes I changed the init.advdata.flags to be BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE as well as setting init.config.ble_adv_fast_timeout to be 0 [as documented in one of postings here -- forgot which post].  This makes it not time out.

    I reverted the main.c to original source of SDK16 and I can see OK on Samsung.  On Nexus, the mac address shows up but not the device name.  [NRF Connect app shows the UART Icon so it can see the Nordic UART Service] .  So I can now tell that both my code and original BLE-UART code shows up on NRF Connect on Nexus 9 but only the mac address not the device name.  Why would this be the case?

    As for Legacy mode: how is it suppose to be set/unset?  The parameter no longer exists in the header files so it would be nice if the doc gets updated to reflect this change, no?

Reply
  • Sorry for not adding the details: Yes I changed the init.advdata.flags to be BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE as well as setting init.config.ble_adv_fast_timeout to be 0 [as documented in one of postings here -- forgot which post].  This makes it not time out.

    I reverted the main.c to original source of SDK16 and I can see OK on Samsung.  On Nexus, the mac address shows up but not the device name.  [NRF Connect app shows the UART Icon so it can see the Nordic UART Service] .  So I can now tell that both my code and original BLE-UART code shows up on NRF Connect on Nexus 9 but only the mac address not the device name.  Why would this be the case?

    As for Legacy mode: how is it suppose to be set/unset?  The parameter no longer exists in the header files so it would be nice if the doc gets updated to reflect this change, no?

Children
No Data
Related