Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 5 months ago.
Relationship between setAdvertisingInterval and setTimeOut?
I am trying to figure out the relationship between the Advertising Interval and Advertisement Timeout. I want to set a larger Advertising interval or rather I want to not Advertise as often. What should the ideal Advertisement Timeout be? What is the default Advertisement Timeout? Is Advertisement Timeout how long an Advertisement event occurs?
Thanks, Ajay
Question relating to:
1 Answer
6 years, 4 months ago.
Advertising Interval is the time between advertisement events. Advertisement Timeout is how long you want to advertise. When you set timeout to 0, there is no timeout. Your device does not stop advertising.
You can find more info in GapAdvertisingParams.h.
The ideal setting depends on your application.
Thanks Kentaro for taking the time to respond. However based on the GapAdvertisingParams.h, I don't see a default value for the Advertising Timeout. Is this zero by default, so it infinitely advertises based on the Advertising interval?
Currently we don't set the Advertisement Timeout, we do however set the Advertisement Interval to 1 second. But during Advertisement mode our power draw is about 32 uA and we were trying to figure a way to lower it further. The device has been configured to transmit at the highest available power and in the case of nrf52 its about +4dbm. Any thoughts on how we could drop the advertisement current to say half its current draw?
Thanks, Ajay
posted by 02 Jul 2018I think a default value of 0 is provided in the constructor. You can call ble.gap().getAdvertisingParams().getTimeout() to get and verify the current timeout.
I don’t have much experience in power consumption optimization. I would imagine you can save power if you set timeout and don’t advertise all the time.
posted by 02 Jul 2018