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

Changing APP_ADV_INTERVAL when scan request detected

Hi,

I'm making a peripheral device that needs to minimise battery usage.  

My device is essentially a beacon but it allows temporary connections to send a stream of data before closing the connection. I do not think I have enough battery to allow permanent connections that follow the apple design guidelines (220 mAh coin cell and >1 year longevity)

I was surprised to discover that android phones won't reliably connect if APP_ADV_INTERVAL is 10 seconds. With my old samsung S5 I need to reduce the interval to around 2 seconds. 

I have an accelerometer so I was planning to rapidly advertise when the user shakes the device. But maybe it would be better to change the advertising interval when a scan request is detected. Is this possible? Can I detect when my device transmits a scan response? Or is there another mechanism to support this?

Thanks in advance for your help.

-JasonR

Related