简体   繁体   中英

Does Android-Beacon-Library support extended advertisement packets from Bluetooth5?

I'm trying to implement an app using advertising BLE-Beacons in a similar way the existing automated contact-tracing apps do. But I need more than the normal 25 free bytes in the beacon layout.

Since Bluetooth 5 there should be the possibility to use extended advertisements with up to 255Bytes packet size (as described here: https://www.novelbits.io/bluetooth-5-advertisements/ )

I've seen the extra-data-field, but it just supports long and I couldnt find documentation about it and if it really is what I'm searching.

So is there an option to use extended advertisements or do I need to implement it from scratch? If the extra-data-field is for extended advertisements it should be possible to transfer my data into bytes, then into long and do it backwards when reading it out, isnt it?

Thanks really much for your help

Sanny

While Android 8+ SDKs supports extended BLE 5.0 advertising packets with BluetoothDevice.PHY_LE_2M , this will only work on devices with both hardware support and firmware drivers with 5.0 extensions.

The Android Beacon Library does not have any tools that allow advertising beacon packets or scanning beacon packets with extended lengths. The reasons are:

  • Relatively few phone models have firmware support for BLE 5.0 extensions.
  • No commonly used beacon formats use these extended packets.

That said, the library is extensible and can be augmented to offer these features for supported devices. If you can make a good case for adding these features and are interested in helping do the work. You may with to open an issue or pull request against the open source repo.

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