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

Scan and Advertise

Hi, 

I modified the ble_app_att_mtu_throughput example to scan and advertise simultaneously. I want to have two nRF52’s that can read each other’s advertisements and pull out the rssi information to detect proximity to one another.

The problem is, it doesn’t seem that either board picks up the other’s advertisements in their respective event handler. The boards do pick up the advertisements of other nearby devices, and my nRF Connect mobile app can see both boards advertisements.

Is there any way I can get the boards to see one another?

EDIT: By event handler, I mean there is no advertising report events coming up in the ble_evt_handler. 

Parents
  • Hi , I am working on similar project where I need to detect the proximity between two nRF52 modules by both of them. I wanted to ask how did you enable simultaneous scanning and advertising? 

    Did you just call `nrf_ble_scan_start()` and `ble_advertising_start()` back to back and then the SoftDevice handled the rest?.

    Also, can you explain briefly (or point me to some resource) as how does simultaneous scanning and advertising work physically, I mean how are both of them time-slotted?

    Thanks.

Reply
  • Hi , I am working on similar project where I need to detect the proximity between two nRF52 modules by both of them. I wanted to ask how did you enable simultaneous scanning and advertising? 

    Did you just call `nrf_ble_scan_start()` and `ble_advertising_start()` back to back and then the SoftDevice handled the rest?.

    Also, can you explain briefly (or point me to some resource) as how does simultaneous scanning and advertising work physically, I mean how are both of them time-slotted?

    Thanks.

Children
  • Sure! So I built it on top of the ble_att_mtu_throughput example which is built to scan and advertise (has scan_start and advertise_start functions). Basically you can set the advertising/scanning intervals (time between advertisements and scans) and scan window (how long out of the interval you’re scanning). There’s backend nordic code that schedules each event for you based on the info you set in sdk_config. 

Related