安卓功耗低还是linux功耗低,蓝牙低功耗:Android Gatt-Client连接到Linux Gat...

我刚刚面临同样的问题.

这似乎是Android和Broadcom蓝牙模块发生的错误. Android以某种方式连接到错误的l2cap通道.

解决方法是明确禁用广告中的BR / EDR支持.

谷歌与#8中的解决方案的错误报告可以找到here,提示上的引用帮助了我:

I have obtained information from Broadcom regarding this bug and I don’t think its a bug on their part. If one does not specifically set the ‘BR/EDR not supported’ bit in the advertisement (bit 2), the Broadcom stack will use BR/EDR and BTLE.

Changing the leading advertisement package from 020102 to 020106 solved the problem.

使用bluez btmgmt在设备hci0上配置通告,我发出以下命令:

btmgmt -i hci0 power off

btmgmt -i hci0 le on

btmgmt -i hci0 connectable on

btmgmt -i hci0 bredr off # Disables BR/EDR !

btmgmt -i hci0 advertising on

btmgmt -i hci0 power on

启动bluez btgatt-server示例:

btgatt-server -i hci0 -s low -t public -r -v

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值