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

Problem Setting flags for bluetooth advertisements on nRF52840 devices.

First let me say, the nRF52840 is an awesome chip...  I am trying to implement the Google/Apple bluetooth protocol (https://covid19-static.cdn-apple.com/applications/covid19/current/static/contact-tracing/pdf/ContactTracing-BluetoothSpecificationv1.1.pdf) on a nRF52840 chip board.   In essence, I am trying to implement the scheme on a dongle instead of a phone.   I have basically got it working except, when I try to send 0x1A flag in the advertisement message, I can't see it on the nRFConnect app + Bluetooth Low Energy tool.  If I change the value of the flag to 0x6, I see it on the app... So, is there anyway to figure out why it doesn't work with the 0x1A flag?   Is it a problem with the board doing the advertising?   Or is it a problem with the nRFConnect app?   Sorry, I am a newbie at this stuff so I don't really understand all the bluetooth spec's yet.    

Thanks for your help,

SaeWoo

Parents
  • Hei Sae Woo, 

    Flag 0x1A means BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST | BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER | BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
    This is not the case with our chip, we don't support BR_EDR so it's obvious that the softdevice wouldn't accept that flag. 
    If you read the pdf file you provided, you don't need to set the flag to 0x1A. The only requirement for the flag is bit 1 equal 1. (Flags Section: LE general discoverable mode (bit 1) shall be set to 1). Meaning you can use either  BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. 

Reply
  • Hei Sae Woo, 

    Flag 0x1A means BLE_GAP_ADV_FLAG_LE_BR_EDR_HOST | BLE_GAP_ADV_FLAG_LE_BR_EDR_CONTROLLER | BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE
    This is not the case with our chip, we don't support BR_EDR so it's obvious that the softdevice wouldn't accept that flag. 
    If you read the pdf file you provided, you don't need to set the flag to 0x1A. The only requirement for the flag is bit 1 equal 1. (Flags Section: LE general discoverable mode (bit 1) shall be set to 1). Meaning you can use either  BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE or BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. 

Children
Related