Open dgrothman opened 6 days ago
Hi @dgrothman
That does definitely look a little strange.
Which version of the plugin are you on? Do you see this issue with another application (e.g., nrf Connect)?
The only bit of local debugging I could suggest is to adjust the loop at https://github.com/don/cordova-plugin-ble-central/blob/860455c0bf4af099fe44fd8c7dcfec1f924c1162/src/ios/BLECentralPlugin.m#L1016 to see if there are potentially multiple peripheral
objects there with a matching UUID somehow?! I've never heard of this being a thing though...
We are currently running 1.7.3 version of the driver. We just were able to get some good debugging data and the following image seems to validate your idea that there are multiple peripheral objects with the same UUID
This shows both peripherals one with the services which is used for the log message and one without the services which is used when trying to connect to the service. The only way we are able to reliably reproduce this is by connecting to the device and using it and then leaving it overnight, then when we connect to the device again in the morning it will be in this failed state.
As we are not objective C developers, is this something that looks like it is possible to patch?
Hi @peitschie I did just complete another test with the latest version of the driver 1.7.8 and verified the issue is still present Here is a screen capture of the peripherals have a "ghost" version of a device with no services
While troubleshooting some issues that have been reported in our app we have found the following issue intermittently occurs.
While trying to discover the service and characteristics the driver successfully reports the device, service and characteristics, but then right after reports that it can not find the service, and once we receive this message there is no way to recover the bluetooth connection and get it to work.
public async SetupDevice(id: string) : Promise {
if(id == undefined || id == "") {
return;
}
}
private async StartListen(service: string, characteristic: string) { this.logger.debug(
Start Listening
, [{"SourceContext": "BleCore", "Function": "StartListen"}]); this._ble.startNotification(this._deviceId, service, characteristic).subscribe(async ([buffer]) => { let data = new Uint8Array(buffer);}