flutter_reactive_ble
flutter_reactive_ble copied to clipboard
iOS has no name on discovered device on initial scan
Describe the bug I tried to scan for my specific device on iOS but on initial scan the name is an empty string. On a second scan the name appeared correctly.
To Reproduce Steps to reproduce the behavior:
- Start my custom device that was never discovered by the iPhone used for testing.
- Start a scan using
_scanStream = _flutterReactiveBle.scanForDevices(
withServices: [xxx],
scanMode: ScanMode.lowLatency,
requireLocationServicesEnabled: false,
).listen((device) {
// only add if not in list already
if (_foundDevices.every((element) => element.id != device.id)) {
_foundDevices.add(device);
// sort list alphabetically
_foundDevices.sort((a, b) => a.name.compareTo(b.name));
}
});
- In the
_foundDeviceslist the devices show up, but with an empty string as the name - If I cancel the stream and then re-start it, the name shows up.
- Also any subsequent scan shows the name
Expected behavior I was hoping the name would pop up instantly when it was discovered. Otherwise this will be a very nasty hack in the code to start a rescan.
Smartphone / tablet
- Device: all iOS devices
- OS: iOS
- Package version: 5.0.2
Peripheral device
- Vendor, model: CUSTOM
- Does it run a custom firmware / software: yes
This looks like device specific issue(custom firmware ), we can not do much about since we don't have your(custom firmware), did you test it in nRF Connect app? if not please do!