Accessing battery level of battery powered iBeacon devices (mainly kontakt io ones)?

不打扰是莪最后的温柔 提交于 2019-11-27 08:16:42

问题


I am trying to find a way to access the battery levels from my beacons through an iOS application I am currently working on. I am using Kontakt's iBeacon devices. I browsed the Estimote iOS SDK and they provide a method to achieve this. I was wondering if it is at all able to access the raw beacon packet and manually extract the data since I know the beacon packet structure and the information is there.

Any thoughts on how to achieve this by the method mentioned here or any other way?

Thanks Guys.


回答1:


This is Rafal from kontakt.io. Firstly, let me thank you for choosing us, it means a lot for us.

Propagation of battery level is not standard for iBeacons nor it is in any official iBeacon documentation, so that is why you cannot find the value using custom SDKs. Our iBeacons are propagating battery level in scan response packet which may be discovered using CoreBluetooth API in iOS. The level is one byte value at the 23rd byte in the packet.

Hope it helps :)




回答2:


As far as I am aware there is nothing in the iBeacon advertisement itself that contains the battery level. Some beacons may expose additional BLE ATT services that contain this information. You could try using an application like LightBlue from the app store to explore the services available from your devices



来源:https://stackoverflow.com/questions/23207687/accessing-battery-level-of-battery-powered-ibeacon-devices-mainly-kontakt-io-on

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