react-native-ble-plx
react-native-ble-plx copied to clipboard
Devices with Extended Advertising enabled are not visible in scan
Expected Behavior
Scan should return devices with Extended Advertising
Current Behavior
Scan shows devices with standard advertising, including scan response. Devices that have extended advertising enabled do not appear.
Steps to Reproduce
- Turn on peripheral that utilizes extended advertisement
- Ensure your device supports extended advertisement, some older phones and tablets do not even if they support bluetooth 5
- Call startDeviceScan in react-native app
- Verify that callback does not return your device
- Open a Bluetooth scanning app like nRF Connect, device appears and extended advertisement data is availiable.
- Disable extended advertisement on device
- verify startDeviceScan callback picks up the device
Context
I am developing a device and a react-native app that are intended to talk to each other. I would like to use extended advertisement. After enabling extended advertisement in my device's firmware the device is visible to nRF Connect, but not to my react-native app using this library.
- Library version: 2.0.2
- Platform: Android 11 on a Samsung Galaxy Tab A7
I also encountered the same problem. How can I find it in NRF connect, but this library does not return, or is it incorrectly configured?
From what I understand there are features that are available in Bluetooth 5 that are optional and do not have to be supported for a device to be classified as Bluetooth 5-enabled. Extended Advertising is one of these optional Bluetooth 5 additions that not all devices support.
You can get the "nRF connect" app from the Play store and find the "Device Information" menu option and it will tell you what BT5 features your device supports. The device I was using, the Galaxy Tab 7 should support this function but this library does not. This was evident when nRF Connect on the tablet would show the extended advertising but my react app did not.
There is a library between this one and an underlying library that does the actual scan call the underlying one has been updated to support extended advertising scans. https://github.com/dariuszseweryn/RxAndroidBle/issues/774
The one in-between however appears to have been abandoned and has had no movement since 2021 https://github.com/dotintent/MultiPlatformBleAdapter/pulls?q=is%3Apr+is%3Aclosed so doesn't use the updated version that supports extended advertising.