Failed to set the broadcast type

 If the BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE is not set successfully in the broadcast settings, it will result in an error of NRF_ERROR_INVALID_FLAGS when calling sd_ble_gap_adv_data_set. What should I do?

The following is the usage condition information:
SDK : nRF5_SDK_14.2.0_17b948a
Hardware board :nrf52810
Best wish:
zhg77
Parents
  • Hi,

    The issue here seems to be that the advertising flags you set are forming an invalid combination which is why you are seeing that error. Nordic recommends using predefined valid combinations. The flags field must use a valid combination of bits. Currently, you are using a single flag. Try using:

    BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. 

    This is a combination of:

    BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE and  BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED.

    Let me know if you have any further questions. 

    Best Regards,

    Samruddhi

  • Hi 

    This is a combination of: 

    BLE_GAP_ADV_FLAG_LE_GENERAL_DISC_MODE  and  BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED,

    This combination setting is fine.But  I need that  using a single flag  BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE,Is this not allowed? Why? Is it due to the limitations of the Bluetooth protocol stack?

    Best Regards,

    zhg77

Reply Children
Related