react-native-ble-plx
react-native-ble-plx copied to clipboard
getting null device name while calling startDeviceScan
const scanAndConnect = () => {
bleManager.startDeviceScan(
null,
{allowDuplicates: false},
(error, device) => {
if (error) {
if (error.message === 'BluetoothLE is powered off') {
bleManager.enable();
}
// Handle error (scanning will be stopped automatically)
return;
}
// Check if it is a device you are looking for based on advertisement data
// or other criteria.
if (device && device.name) {
console.log('device name====>', device.name);
}
console.log('device-<', device);
},
);
};
"id":"40:1E:8E:D2:E5:7E", "isConnectable":null, "localName":null, "manufacturerData":"TAAQBUccC65x", "mtu":23, "name":null, "overflowServiceUUIDs":null, "rssi":-37, "serviceData":null, "serviceUUIDs":null, "solicitedServiceUUIDs":null, "txPowerLevel":null
- Library version: '^2.3.0'
- Platform: Android.
HI, can you use some external scanning application to see if the name is there or it is also null?
Hi @scrapecoder , I have the same problem here in iOS . Did you find a solution for this ?
Same issue
Same issue
Same issue, iOS only
+1 android
+1 android
+1 iOS
+1 iOS
I have a few questions:
- What advertising do you use (BT 5 Advertising extension or legacy)
- What is the name (how long and does it contain special characters) of the device you are looking for?
- What device do you use (what version of BT)
We have added a scanning option for BT 5 advertisers (disable legacy scan - https://github.com/dotintent/react-native-ble-plx/wiki/Device-Bonding) and name mapping for Android.