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

question about advertising

Hi,

i have some more, for me fundamental, questions and i hope some one can help me :)

1.) can i use the advertise function whenever i want or only in connection interval ? And how big is the size of payload i can send by the advertising function? Will it be send on every of three advertising channels?

2.) how should i handle received advertising packets, with which interrupt or function? So would it be possible that to more or less beacons will communicate over advertising data, so one device sends advertising data and other receives and can react.

3.) Did i understand it correctly, beacon only means advertising with apple "rules"?

best regards,

Nils

Parents
  • Currently, Nordic only provides the S110 Peripheral/Broadcaster and the S120 Central/Observer stack for the nRF51822.

    1. The S110 can advertise certain data, up to 31 bytes minus overhead. If an observer sends a scan request to the broadcaster, the broadcaster can provide additional or different data through a scan response. If a Central sends a connect request, and the device is advertising without filter policies or non-connectable params, then a connection will be created and the advertising stopped (transition from Broadcaster->Peripheral). The advertisements are sent on all the three advertising channels sequentially, and they can only be sent outside of a connection. If you do non-connectable advertising, some restrictions apply to the parameters of the advertising, but no central can connect to you and stop the advertising.

    2. Only the S120 can actually receive advertisement packets. (It can function as both a Central and an Observer at the same time, having up to 8 simultaneous connections to Peripherals and still scan for a 9th, but not connect to it.) These will come as events after you have started scanning, and could contain either advertising data og a scan response, depending on whether the scanning is 'active' and if the broadcasters have data to respond with. You can also set a whitelist with addresses and/or IRKs to only receive advertisements from known peers. This is all handled by sd_ble_gap_scan_start() and sd_ble_evt_get() on the lowest level, and I'm not sure how this looks in the SDK.

    3. Yes, beacons are only some rules imposed on top of the existing roles. I won't go into details, but all of these should be implementable using the S110.

    To re-iterate: You do not bother with connections when it comes to iBeacons, and the S110 can function as a non-connectable broadcaster. The S120, or a BLE-enabled mobile phone that implements the Central or Observer role, can receive these advertisements and handle them.

Reply
  • Currently, Nordic only provides the S110 Peripheral/Broadcaster and the S120 Central/Observer stack for the nRF51822.

    1. The S110 can advertise certain data, up to 31 bytes minus overhead. If an observer sends a scan request to the broadcaster, the broadcaster can provide additional or different data through a scan response. If a Central sends a connect request, and the device is advertising without filter policies or non-connectable params, then a connection will be created and the advertising stopped (transition from Broadcaster->Peripheral). The advertisements are sent on all the three advertising channels sequentially, and they can only be sent outside of a connection. If you do non-connectable advertising, some restrictions apply to the parameters of the advertising, but no central can connect to you and stop the advertising.

    2. Only the S120 can actually receive advertisement packets. (It can function as both a Central and an Observer at the same time, having up to 8 simultaneous connections to Peripherals and still scan for a 9th, but not connect to it.) These will come as events after you have started scanning, and could contain either advertising data og a scan response, depending on whether the scanning is 'active' and if the broadcasters have data to respond with. You can also set a whitelist with addresses and/or IRKs to only receive advertisements from known peers. This is all handled by sd_ble_gap_scan_start() and sd_ble_evt_get() on the lowest level, and I'm not sure how this looks in the SDK.

    3. Yes, beacons are only some rules imposed on top of the existing roles. I won't go into details, but all of these should be implementable using the S110.

    To re-iterate: You do not bother with connections when it comes to iBeacons, and the S110 can function as a non-connectable broadcaster. The S120, or a BLE-enabled mobile phone that implements the Central or Observer role, can receive these advertisements and handle them.

Children
Related