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

Connecting to peripheral (Central role) prevents correct advertising/connectibility (Peripheral role)

Hi, I'm working on the nRF52 with S132 v2.0.0.

I am using a self-implemented "connection manager" that tries to establish bluetooth connections to pre-configured auxiliary devices in the Central role. Additionaly, I have implemented a Peripheral service that provited smartphone/tablet access for supervision. Advertising is running in background all the time.

When the connection manager tries to connect to the pre-configured devices, the advertising interval changes from 1 second to ~12-14 seconds and it is almost impossible to connect to the device anymore. This is the case when an accessoire is not available and the connection manager is trying to connect to it all the time.

Just for testing, I switched the sd_ble_gap_connect()call with sd_ble_gap_scan_start() to trigger a continuous scan instead of a continuous connection try. When the SoftDevice performs the scan, everything is just fine, the advertising interval is still at 1 second and I can successfully connect to the Peripheral service. So, the problem only exists when I invoke the sd_ble_gap_connect() function.

Is this a bug in the SoftDevice scheduler or desired behavior?

One more slightly related question: Is it possible to combine a scan and connect operation in the means that advertising packets are reported (on_ble_evt()) while the SoftDevice is trying to connect to a Peripheral? It should be possible as during connection establishment, a scan is performed. This would help to maintain a stable Observer operation while a Central role tries to connect to a device.

Parents Reply Children
No Data
Related