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

Sleep & advertising

I'm using SDK 15.2 & HID keyboard example. I would like to know the following things-

1. How long does BLE chip advertise its name before making a connection with central?

2. Does the BLE chip go to sleep if there is inactivity or does it go to sleep if its not connected to the central?

Can you point out where in the code can I make changes to accomodate above 2 requirements?

  • Hi,

    1. The peripheral will advertise either as long as the advertisement duration is set or until a central sends a connection request. This can be changed by changing the APP_ADV_FAST_DURATION/APP_ADV_SLOW_DURATION definition. 
    2. This depends on your application. Most of our examples in the SDK goes to sleep in between the advertisements including the hid keyboard example. 

    Regards

    Jared

  • Hi, Thank you for the reply.

    1. After how much time does the BLE chip go to sleep if it does not make a connection with host? Like it stops advertising its name after a certain timeout. What is that timeout value? How can I change this in the code?

    2. After making connection, if there is no data transfer between ble chip & host, does the sleeping depend on supervisory timeout?

    1. The application starts in advertising fast mode and advertises for 30 seconds before going to sleep as APP_ADV_FAST_DURATION = 3000
    2. The peer device will go back to sleep until an interrupt from one of the event handlers triggers a wakeup. The connection is terminated if no packets are received within the connection supervisory timeout. 
Related