Skip to content

Commit

Permalink
✨ (rn-ble): Fix ios first connection + improve reconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabbech-ledger committed Feb 5, 2025
1 parent 1f821ec commit dd07978
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 181 deletions.
12 changes: 0 additions & 12 deletions packages/transport/rn-ble/src/api/transport/BleServiceInstance.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,18 @@ export class RNBleDeviceConnection implements DeviceConnection {
writeCharacteristic: Characteristic,
notifyCharacteristic: Characteristic,
) {
this._logger.debug("Reconnecting device connection", {
data: { writeCharacteristic, notifyCharacteristic },
});
this._writeCharacteristic = writeCharacteristic;
this._notifyCharacteristic = notifyCharacteristic;

this._monitorSubscription = this._notifyCharacteristic.monitor(
(error, response) => {
if (response && !error) {
this.onMonitor(response);
}
},
);
await this.setup();
}

Expand Down
Loading

0 comments on commit dd07978

Please sign in to comment.