开发者

Android Bluetooth Extended Inquiry Response

开发者 https://www.devze.com 2023-03-15 13:30 出处:网络
I have a custom device based on Android, this sends me a TAG as part of Extended Inquiry Response. When i scan for devices in my App, i need to read the TAG and list out only my Custom Device, curren

I have a custom device based on Android, this sends me a TAG as part of Extended Inquiry Response.

When i scan for devices in my App, i need to read the TAG and list out only my Custom Device, currently i list all discovered devices.

I know Android DOES NOT support any api's for EIR (Extended Inquiry Response) or is it true ? Assuming that it wont support when i traced source, i was able to identify that it writes the EIR to a file in phones internal memory in this path "/data/misc/bluetoothd/"DeviceAddress"/eir

Queries: 1. Reading of eir file , is this the only way to get EIR TAG on Android device?

开发者_高级运维
  1. Is it safe to read this file?

  2. Do all Android devices having Bluetooth 2.1 api, support this file? i.e. if i write a code will it work across all Android devices?

Eagerly waiting for the response ...


I'll tell you right from the start that EIR is only 2.1 Bluetooth or higher, so right there you have removed about 15% of the phones still out there that are compatible. As to whether the Bluetooth 2.1 API is fully supported that is up to the phone maker and the type of chip they used. I have run into the same sort of issue with Bluetooth and the SPP and each chip and implementation of the Bluetooth Api by the phone maker makes it a crap shoot if it will work on their phones or not. So my suggestion is to test each and every phone that you wish for it too work but you will find some will not work at all. Or just don't use the EIR and figure out a different approach.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号