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

Custom Scan Request, Scan Response

Dear Nordic Team and Community!

I have again a question concerning advertising. Currently I am working with the devices nRF52840Dongle (Advertising, S140, 10059) and nRF52840DK (Scanning, S140, 10056). My advertising works / should work like the following structure, because I want to save energy:

Currently, step 1 and step 2 are implemented. Now I want to:

  1. send on the Scanner Side (Step 3) a custom scan request with custom data
  2. read this data on the Advertising Side (Step 4) with a report
  3. send no scan response on the Advertising (Peripheral) Side

Is this possible? How can I read the Scan Request? How can I jump over the Scan Response?

Thank you for your help!

Kind Regards

Parents
  • Hello,

    Is this possible? How can I read the Scan Request? How can I jump over the Scan Response?

    I get the impression from your diagram that you intend to transfer data from the central to your peripheral through the scan request, is this correct?
    If so, please know that the Scan Request packet can not contain any custom data payload.
    This is a result of the BLE Specification, which defines scan requests to only contain the address of the scanner and the address of the receiver. You may read more about this in the BLE Core specification Version 5.2, VOL 6, Part B, Section 2.3.2. Note the last line of section 2.3.2.1, which notes that these scan request payloads contains no host data, which is why it is handled completely by the SoftDevice. 

    send no scan response on the Advertising (Peripheral) Side

    If I understand you correctly and you wish to not send a scan response packet from your peripheral, then you can advertise as NONSCANNABLE, which will mean that the peripheral does not listen for a scan request following an advertisement.

    My advertising works / should work like the following structure, because I want to save energy:

    Is power saving the reason why you would like to communicate through advertisements rather than over a connection?
    If so, please know that you can set the connection interval to up to 4 s, which may end up saving you power compared to the advertisements - since advertisements are in no way acknowledged, and data may therefore be lost.

    Please do not hesitate to ask if any part of this still should be unclear!

    Best regards,
    Karl

  • In ble-advertising.c in ble_advertising_start(() please try add green line:
    case BLE_ADV_MODE_FAST:
    p_advertising->adv_params.scan_req_notification = 1;
    ret = set_adv_mode_fast(p_advertising, &p_advertising->adv_params);
    break;

    Regards

    Andrzej

Reply Children
No Data
Related