简体   繁体   中英

Useless Bluetooth advertisement under Android?

I was actually using Cordova with cordova-plugin-bluetoothle , but I tend to think that this problem is related to Android more than Cordova.

I started a scan and in response got several devices, all with data similar to:

{
    "address":"38:CC:7A:F6:F5:AC",
    "name":null,
    "rssi":-74,
    "advertisement":"Hv8GAAEJIAAFQjB0jtGzjUXqNjOrWsBW+NPHv+y9swAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "status":"scanResult"
},
{
    "address":"4A:85:03:9A:F7:0C",
    "name":"\u0010",
    "rssi":-60,
"advertisement":"AgEGB/9MABACCwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
    "status":"scanResult"
}

Q1: Why am I getting an empty name or a cryptic \? Shouldn't every BT device identify itself in a way that allows the user to select it?

Q2: The advertisement data seem to be useless! It is quite clear that it is in base64, but decoding the base64 was still giving useless data. I was trying to parse it using this library , but the result of the parsing seems meaningless. I was investigating hours trying to solve it and find references in the internet, without success!

I will highly appreciate any help with this!

I have found the explanation! It is the iBeacon advertisement format. See more in Wikipedia .

I also found this nice advlib library that did the parsing very well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM