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

how to broadcast extended ble 255byte packet with changeable data

hello Nordic

hope you will answer this time because i have had already 2 questions regarding ble extended that were not answered by nordic.

i am working with nrf52832 (can be changed if there is a better module for my needs in the nrf52 series) , sdk 16.0, softdevice s132 ver7.0

1. the extended 255 byte of data is it actually sent with 2 packets, one for all the header and the the 255 bytes of data ? if so, then what is the max size of data i can send to make sure i send one packet of 255 bytes ?

2. is there an example for broadcasting a ble extended 255 byte packet  and is there an example for scanning extended ble packet cause the nrfConnect app if working on a cellphone with Bluetooth 4.2 does not receive such a extended broadcast 

3. i wish to update the data in the broadcast packet every time, how can this be done ? also i wish to know how many extended broadcasts i can have in one second ?

best regards

Ziv

  • Hi,

    1. Your first question is answered here.
    2. Scanning extended advertisement data is done by setting the extended parameter in the ble_gap_scan_params_t struct:
    static ble_gap_scan_params_t m_scan_param =                 /**< Scan parameters requested for scanning and connection. */
    {
        .active        = 0x01,
        .interval      = NRF_BLE_SCAN_SCAN_INTERVAL,
        .window        = NRF_BLE_SCAN_SCAN_WINDOW,
        .filter_policy = BLE_GAP_SCAN_FP_WHITELIST,
        .timeout       = SCAN_DURATION_WITELIST,
        .scan_phys     = BLE_GAP_PHY_1MBPS,
        .extended      = 1,
    };

    3. You can use the app timer together with ble_advertising_advdata_update() to update the data. The latter part of your question depends on the advertising interval you're using.

Related