Hi everyone,
I am desing a low power BLE application using the nRF52840.
How do I restart the advertising after the APP_ADV_DURATION has been expired?
Thanks in advance
Nick
Hi everyone,
I am desing a low power BLE application using the nRF52840.
How do I restart the advertising after the APP_ADV_DURATION has been expired?
Thanks in advance
Nick
Hello Nick,
You may do so by starting advertising following the BLE_ADV_EVT_IDLE event that is generated when the advertising module moves to idleing.
Please see this ticket answer by my colleague.
If you would not like your advertising to time out, you can define it to 0 ( TIMEOUT_GENERAL_UNLIMITED ) for unlimited advertising duration.
Best regards,
Karl
Hi Karl,
Thank you for your prompt response!! I think that the most suitable solution for me is to advertise without a time out but I would like to here your opinion.. I design a wearable that is going to be connected with a smart phone.. So what is the general approach that is followed? I have to set the wearable to advertise it self without time out in order to be connected with the central?
Imagine a smart watch and a smartphone.. In general when tha smart phone is within the range of the smart watch they are connected automatically.. So I guess that the smart watch is advertising is self without a time out until to establish a connection with the central. I am looking for a solution with the less power consumption.. Any general advice?
Hello Nick,
Nikosant03 said:Thank you for your prompt response!!
No problem at all, I am happy to help
Nikosant03 said:I design a wearable that is going to be connected with a smart phone.. So what is the general approach that is followed? I have to set the wearable to advertise it self without time out in order to be connected with the central?
I can not speak for the industry general approach - because this varies with the needs of the different products - but the main consideration with regards to advertising duration is the power consumption.
A device that does not time out will continue advertising until the battery is drained ( or a connection is made ) which will cause an unconnected device to drain a lot faster.
I am not familiar with the use case in this particular case, but it is a balance between "always auto connecting immediately when possible" and power consumption.
A power efficient approach could have the device advertise for a given interval following powerup or button press, and then stop advertising until the button is pressed again or until the device is shaken / moved / external change - depending on what other peripherals you have available.
If you would like to get some estimates for how much the added advertising affects power consumption I highly recommend checking out our Online Power Profiler.
Nikosant03 said:Imagine a smart watch and a smartphone.. In general when tha smart phone is within the range of the smart watch they are connected automatically.. So I guess that the smart watch is advertising is self without a time out until to establish a connection with the central. I am looking for a solution with the less power consumption.. Any general advice?
I do not know exactly how this is implemented in the "industry standard", but I cant imagine that it is always advertising - perhaps it is implemented like I mention above, it goes into low power mode when no movement is registered, and it starts advertising again / goes high power mode when the accelerometer registers movement. I imagine this would be the wanted behavior, in case the watch is forgotten somewhere / placed on the nightstand for the night etc. You would like it to do only the bare minimum to conserve battery power when not in active use. But as I said, this is more of a qualified guess than actual wearable industry insight on my part. If you would like to go more in depth with your wearable discussion ( leaving the advertising restarting issue of the original ticket ) I would ask that you open a new ticket with this as the issue, so that you may be put in contact with one of our engineers with more wearable industry experience - and that the forum remains searchable.
To conclude my long answer to your general advice question: Check out the power profiler to estimate how much power consumption is increased by decreasing advertising intervals / always advertise.
Please do not hesitate to open another ticket if you should encounter any more questions or issues!
I hope you have a great day, Nick!
Best regards,
Karl
Hello Nick,
Nikosant03 said:Thank you for your prompt response!!
No problem at all, I am happy to help
Nikosant03 said:I design a wearable that is going to be connected with a smart phone.. So what is the general approach that is followed? I have to set the wearable to advertise it self without time out in order to be connected with the central?
I can not speak for the industry general approach - because this varies with the needs of the different products - but the main consideration with regards to advertising duration is the power consumption.
A device that does not time out will continue advertising until the battery is drained ( or a connection is made ) which will cause an unconnected device to drain a lot faster.
I am not familiar with the use case in this particular case, but it is a balance between "always auto connecting immediately when possible" and power consumption.
A power efficient approach could have the device advertise for a given interval following powerup or button press, and then stop advertising until the button is pressed again or until the device is shaken / moved / external change - depending on what other peripherals you have available.
If you would like to get some estimates for how much the added advertising affects power consumption I highly recommend checking out our Online Power Profiler.
Nikosant03 said:Imagine a smart watch and a smartphone.. In general when tha smart phone is within the range of the smart watch they are connected automatically.. So I guess that the smart watch is advertising is self without a time out until to establish a connection with the central. I am looking for a solution with the less power consumption.. Any general advice?
I do not know exactly how this is implemented in the "industry standard", but I cant imagine that it is always advertising - perhaps it is implemented like I mention above, it goes into low power mode when no movement is registered, and it starts advertising again / goes high power mode when the accelerometer registers movement. I imagine this would be the wanted behavior, in case the watch is forgotten somewhere / placed on the nightstand for the night etc. You would like it to do only the bare minimum to conserve battery power when not in active use. But as I said, this is more of a qualified guess than actual wearable industry insight on my part. If you would like to go more in depth with your wearable discussion ( leaving the advertising restarting issue of the original ticket ) I would ask that you open a new ticket with this as the issue, so that you may be put in contact with one of our engineers with more wearable industry experience - and that the forum remains searchable.
To conclude my long answer to your general advice question: Check out the power profiler to estimate how much power consumption is increased by decreasing advertising intervals / always advertise.
Please do not hesitate to open another ticket if you should encounter any more questions or issues!
I hope you have a great day, Nick!
Best regards,
Karl
Thank you for your detailed answer Karl!!