capacitor-community / bluetooth-le

Capacitor plugin for Bluetooth Low Energy
MIT License
274 stars 79 forks source link

Sometimes the scan does not return localName and device.name but only device.deviceId #662

Open emanueletoffolon opened 2 months ago

emanueletoffolon commented 2 months ago

Describe the bug Sometimes the scan does not return localName and device.name but only device.deviceId

To Reproduce Start the scan using requestLEScan with the default options

Smartphone (please complete the following information):

Plugin version:

Has this ever happened to you?

Thanks

pwespi commented 1 month ago

This is expected because not all devices advertise a name.

Do you have a peripheral where you expect a name and don't get one?

emanueletoffolon commented 1 month ago

Yes, sometimes the same device returns the name and deviceId and sometimes just the deviceId. I noticed this by keeping track of the deviceId since on Android it corresponds to the Mac address and never changes unlike on iOS. I tried to do several scanning tests with nRF connect and I didn't encounter this problem, so I decided to write here to ask if anyone has had the same problem.

Thanks