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

Receving advertisement packets in scanner problem

Hi Team,

                Iam doing project called automation of light using BLE technology.

Here Iam using sdk 12.1.0(ble_app_hrs_c) example for scanning or receiving and i flashed the ble_app_hrs_c example in nRF51822 Dk.This nRF51822Dk acting as receiver. I have nrf51822 beacons ,this beacons acting as transmitter.My beacons can advertise every 1000ms and connection interval 500ms.Till now my project is working fine. my question is

1->When i come with multiple beacons(let us consider 4 beacons) near to receiver or scanner ,does (ble_app_hrs_c) example receives all the advertisement packets from all 4 beacons at regular interval of time. 2->Is there any missing of packets at receiver end?? 3->how can i receive all the advertisement packets in scanner ,do i need to change the scanning interval or connecting,non connecting modes ??

Parents
  • Yes, the ble_app_multilink_central will continue to scan for advertising packets, even when connected to other peripherals. When only doing advertisement, there is a small chance that an advertisement packet is lost, since the central might be scanning on a different advertising channel when the packet is sent. So if you need that no packets are dropped, you will need to connect with your "beacons" to the central.

    In a connection, Bluetooth low energy uses CRC and the packet contains a sequence number and next expected sequence number to ack/nack a packet. Every packet will be acknowledged at the link layer, so if there isn't an acknowledgement, the packet will be retransmitted.

Reply
  • Yes, the ble_app_multilink_central will continue to scan for advertising packets, even when connected to other peripherals. When only doing advertisement, there is a small chance that an advertisement packet is lost, since the central might be scanning on a different advertising channel when the packet is sent. So if you need that no packets are dropped, you will need to connect with your "beacons" to the central.

    In a connection, Bluetooth low energy uses CRC and the packet contains a sequence number and next expected sequence number to ack/nack a packet. Every packet will be acknowledged at the link layer, so if there isn't an acknowledgement, the packet will be retransmitted.

Children
  • Thanks for information. In my project iam using central as ble_app_multilink_central example and peripheral as bel_app_beacon example. Iam receiving the multiple peripheral uuid's and some data from this function on_adv_report(p_ble_evt) located under [BLE_GAP_EVT_ADV_REPORT case] in [ble_app_multilink_central] example.I have to use only this [BLE_GAP_EVT_ADV_REPORT case] while receive the uuid and some data.

    My question is ,by doing above modification in source code ,do this central example is still connects to the multiple peripherals ??

    Do this central scans on a different advertising channel when the packet is sent??

    1. Yes, by default the ble_app_multilink_central example will try to connect to all peripherals that are named "Nordic_Blinky". (it will look for the name in the on_adv_report() function). It will continue to scan and connect until it have connected to the number of peripherals defined by CENTRAL_LINK_COUNT. By default this is set to 8, but can be increased to 20. The CENTRAL_LINK_COUNT is the number of central links used by the application. When changing this number remember to adjust the RAM settings

    2. Yes, the central will scan on all 3 advertising channels (37,39 and 39). When you send an advertising packet from the peripheral, the peripheral will actually send the packet on all 3 advertising channels. It will first send it on channel 37, then on 38 and then on 39.

    image description

  • Note that the ble_app_beacon example is meant to be a pure beacon, where it only does advertising. If you want to connect to the central(in order to e.g. send information from the central to the beacon), I would not recommend using the ble_app_beacon example, but instead use e.g. the experimental_ble_app_blinky example for your peripherals("beacons").

Related