读取iBeacon的电池电量 [英] Read battery Level of a iBeacon

查看:130
本文介绍了读取iBeacon的电池电量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须读取iBeacon的电池电量.如我所研究的那样,不可能使用协议配置对吗?建议这里告诉我它正在使用蓝牙协议读取数据包,我对数据包kontakt的描述数据包描述.但是当我读取这些数据时?具体来说,我如何从iBeacon读取数据.谢谢.

I have to do the reading of the battery level of a iBeacon. As I was researching is not possible using the protocol cllocation right ?. The recommendation here tell me it is reading the data packet with bluetooth Protocol,I have the description of the data packets kontakt Data packet description. But as I read these data? how I can read data from a iBeacon in specific. Thank you.

推荐答案

iBeacon API不允许您读取电池电量.您也许可以使用Core Bluetooth阅读它.Kontakt提供了一种获取扫描响应程序包中电池电量的快捷方式,这很方便,但却是专有的.Kontakt还实现了 BLE电池服务 0x180F,这是获取电池电量的更通用的方法.您需要连接并读取特征0x2a19的值才能获得电池电量百分比.

The iBeacon API won't allow you to read the battery level. You might be able to read it using Core Bluetooth. Kontakt provides a shortcut to get the battery level in the scan response package which is convenient, but proprietary. Kontakt also implements the BLE Battery Service 0x180F which is a more generic way to get the battery level. You'd need to connect and read the value of Characteristic 0x2a19 to get the battery percent.

不幸的是,并非所有信标都会宣传电池服务.Estimote通过其一项专有服务将电池信息发送回去.

Unfortunately not all beacons will advertise the battery service. Estimote sends battery information back in one of it's proprietary services.

这篇关于读取iBeacon的电池电量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆