kkmhogen / KBeaconProDemo_Ios

MIT License
6 stars 2 forks source link

How to get battery in advertising data #2

Open matthew-ely opened 1 month ago

matthew-ely commented 1 month ago

I am using the KBeaconPro app to check the battery of my hardware beacons and am also working on an app that records the battery history in a database. I have looked through iBeacon protocol and documentation and cannot seem to find where the battery is included in the advertising packet. I am not sure how the app is getting this data.

kkmhogen commented 1 week ago

Hi, According to the iBeacon protocol, it is not possible to carry battery power. Our beacon carries the battery level in the scan response, you can refer to the parseAdvPacket function in KBAdvPacketHandler.swift to get it. Or you may need to enable the Eddystone TLM protocol to broadcast power.