What happens to connection with BLE device connection when Android goes in sleep mode? So if application establishes a connection with BLE device and then Android goes sleep, will the connection be maintained? Will the application be informed about disconnects or re-connection?
What happens to connection with BLE device when Android goes in sleep mode
BLE is devided in two parts,
- physical layer and link layer implemented in the BLE controller (frontend)
- upper layers implemented on host side (Android system)
both parts connect via the HCI interface. (Which you by the way can sniff using the developer options).
So that means that while the host is in sleep mode the BLE frontend can still maintain connections and wake the host in case it needs some reactions from it (e.g. connection has dropped or some data packet for higher layers came in).
This allows a very energy efficient implementation.
"sniff using the developer options" will this logging work also when device is sleeping? –
Gopher
© 2022 - 2024 — McMap. All rights reserved.