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

10s advertising interval and connection...

Hi

ENV: nrf52 + SES + SDK15

I have a scenario where the nrf52 peripheral can be advertising at the maximum interval allowed (~10s) . During the advertising it is also broadcasting useful and changing data using the manuf reserved zone of the broadcasted message. This is interesting because it has a big impact in the battery life(I think).

But some times central device needs to connect to peripheral in order to set some properties and then it disconnects (no long time connections)

The problem is that when peripheral is advertising with a 10secs interval, the central device is not able to establish a connection with the peripheral. With a 5secs adv interval the same happens. The central device is able only to establish connection when peripheral is advertising with a 3 seconds (or less) interval.

Is this a known and normal situation or can I configure something in order to be able to establish connections using 10secs adv interval?

Thanks a lot

Alex

  • Hi,

    I tested 10 seconds advertising interval in ble_app_blinky example (set APP_ADV_INTERVAL to 16000), towards stock ble_app_blinky_c example. It does connect, but it can sometimes take some advertising intervals before the central receives the advertising packet (3 tests showed 2, 7 and 4 intervals). The scan interval and scan window configuration of the central will affect the probability of receiving the advertising packet from the peripheral. Please have a look at this blog post for details about how advertising and scanning work.

    Best regards,
    Jørgen

  • I have a similar issue, in that faster advertising intervals will connect OK, and slower ones will consistently not. Specifically, a min-max of 0x1100-0x1250 works, but 0x1200-0x1400 doesn't, as well as larger values of course. I don't have any problem connecting to the peripherals with nRF Connect on Android, regardless of the advertising interval, so I thought that it was something I was doing on the Central.

    Looking at the traces on the central (I'm using a pca10090 dev board), it's finding the device OK in the scan, and the call to bt_conn_create_le() returns OK, but I get a connection failure callback with error 2, which appears to be BT_HCI_ERR_UNKNOWN_CONN_ID in hci_core.c. It looks like this is coming all the way from the softdevice on the nrf52840, but I didn't confirm with the debugger.

    Since the device was found on the scan, I didn't think it was the scan parameters, but I tried several different options just in case. I'm not even sure this is the same issue, but the working/not working interval times are similar, so I posted here rather than opening a new thread.

    I'm using v1.14.99-ncs1 of NCS for both the peripheral and central.

    Thanks,

    Chris.

Related