Data Integrity Check for Advertising Data

Hello,

I am using nrf52832 as a peripheral and running SD S112, nordic UART Profile and SDK 17.1.0 on it.

Before advertising does the softdevice use any bluetooth standard or internal data integrity checks in the advertising messages?

Also is there a way or a call back function that lets us know if the advertising has started after the chip gets booted?

Thanks

  • Hello,

    Before advertising does the softdevice use any bluetooth standard or internal data integrity checks in the advertising messages?

    Could you elaborate what you mean by this?
    There is no part in the BLE specification regarding data verification prior to BLE enabling - it will rest on the application to know that the data being configured for advertising is what the application actually intends to advertise.
    The SoftDevice will only check that the configured advertising data is valid, from a BLE perspective (i.e that the correct fields and flags are set, and that they do not exceed their allotted ranges, etc.), but it will not perform any other checks on the specific contents of the advertising payload.
    If you would like data verification on data collected from FLASH you could use the FDS module with CRC checks on write/read to make sure that the data read from FLASH has not been corrupted since last boot.

    Could you elaborate on your concern here, or what you would like to achieve?

    Also is there a way or a call back function that lets us know if the advertising has started after the chip gets booted?

    Is there a particular timing you require - i.e that you get a callback right before the first advertisement goes out - or are you just interested in knowing that the call to start advertising successfully completed?
    In case of the latter you could just check the returned error code from your call to start advertising - if this returns successfully the advertising is about to start.

    If you have any specific requirements to your application about this please elaborate here, so that I may best advise you on how to make sure they are fulfilled.

    Best regards,
    Karl

  • There is no part in the BLE specification regarding data verification prior to BLE enabling - it will rest on the application to know that the data being configured for advertising is what the application actually intends to advertise.
    The SoftDevice will only check that the configured advertising data is valid, from a BLE perspective (i.e that the correct fields and flags are set, and that they do not exceed their allotted ranges, etc.), but it will not perform any other checks on the specific contents of the advertising payload.

    Thank you Karl for the confirmation. This is exactly what I wanted to know.

    Is there a particular timing you require - i.e that you get a callback right before the first advertisement goes out - or are you just interested in knowing that the call to start advertising successfully completed?

    I am looking for a callback right before or after the first advertisement goes out.

    Can you please point me to the callback or an example code?

    I am using ble_beacon example and do not see any way to set the on_adv_evt handler. 

  • Hello,

    Justin said:
    Thank you Karl for the confirmation. This is exactly what I wanted to know.

    No problem at all, I am happy to help! :) 

    Justin said:

    I am looking for a callback right before or after the first advertisement goes out.

    Can you please point me to the callback or an example code?

    I am using ble_beacon example and do not see any way to set the on_adv_evt handler. 

    You can use Radio Notifications to be alerted of upcoming radio events - this will also serve as a confirmation that advertising has started.

    Best regards,
    Karl

  • Hello Karl,

    Apart from Radio Notifications as you mentioned above is there any other easy way.

    If not can you point to an example of the use of Radio Notifications?

    Also wanted to add that I am using s112 softdevice as BLE Peripheral.

    Thanks,

    Justin

  • Hello Justin,

    The simplest/easiest approach is just to use the Advertising Module, which provides you with events for each type of advertising that you have configured, please see this sequence diagram.
    You can see an example of how the advertising module usage in the BLE NUS peripheral example.

    Please do not hesitate to ask if you should encounter any issues or have any follow-up questions! :) 

    Best regards,
    Karl

Related