I'm trying to scan some nrf52 UART devices, I have no problem scanning them. However, when I changed the device name, and then do a scan using ble-plx again, it still displaying the old name that I believe it is cached in iOS system. I confirmed this behaviour with nordic nrf connection app. What's different is that nordic app will refresh the device name after few seconds or after enable a connection between my iphone and my device. I assume ble-plx has similar functions to refresh the cache, but I didn't see it explicitly in the documentation. Can someone help?
+1
+1
iOS uses value of https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.device_name.xml in caches, so yes it is possible that when device name is changed and new connection wasn't established scanning can show old name.
Unfortunately I'm not aware of any specific API on iOS to make this process faster. We are using currenty https://developer.apple.com/documentation/corebluetooth/cbperipheral/1519029-name.
+1
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still not implemented, but I can only say for sure that it happens on Android. Maybe some method like https://github.com/innoveit/react-native-ble-manager#refreshcacheperipheralid-android-only is missing
i think there is a way to refresh the gatt cache by passing the right option parameter to the connectToDevice method:
connectToDevice(deviceIdentifier: DeviceId, options?: ConnectionOptions): Promise<Device>
where ConnectionOptions has refreshGatt?: RefreshGattMoment:

so the call should be:
const result = await this.manager.connectToDevice(deviceId, {
refreshGatt: 'OnConnected',
...other-options....
})