8.0ble设备 android_android 8.0上的BLE扫描

I've developed an app that do ble scan for nearby devices (multiple kinds of beacons around).

I am scanning using the BluetoothLeScanner with CALLBACK_TYPE_ALL_MATCHES and an empty ScanFilter array (since I want to get callbacks for all nearby devices).

My app was working just fine on my OnePlus 5 device Android 7.x (and few other devices) - until I have upgraded to android 8.0 OTA on my device.

I am not sure if it is Android 8.0 issue or OnePlus Oxygen bug but I face to following situation:

Around me there are many kinds of beacons, some advertise standard ibeacon/eddystone packets and others advertise custom packets.

I receive callbacks (onScanResult) only for the standard ibeacon/eddystone packets and not for the custom ones.

Before upgrading I got the callbacks for all kind of packets - standard and non-standard.

Was something changed in the underline filter of received ble packets in android 8.0?

Is it a bug in latest Oxygen OS version?

Should I add some kind of flag to get non standard packets?

Any idea will be much appreciated.

Thanks.

解决方案

After investigating the packets sent by each beacon, I have figured out that one of the custom beacons sent a packet with wrong data length byte.

That caused the packet to be filtered out by OS 8 (Android OR Oxygen) - did not matter to older versions.

Now i'll have to talk to the firmware company for a fix...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值