What happens to connection with BLE device when Android goes in sleep mode

时光毁灭记忆、已成空白 提交于 2019-12-13 15:11:39

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/29118771/what-happens-to-connection-with-ble-device-when-android-goes-in-sleep-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!