capacitor-community/bluetooth-le

getDevices not working

robsonos opened this issue · 2 comments

Describe the bug
Devices do not connect after a disconnect on iOS. getDevices should do the trick but it does not seem to be working. Calling connect on a BleDevice returned form getDevices results in a timeout.

To Reproduce

// routine used for reconnections
const devices = await BleClient.getDevices([this.device.deviceId]);
const deviceToReconnect = devices.find((device) => device.deviceId === this.device.deviceId);
await BleClient.connect(deviceToReconnect.deviceId, (deviceId) => console.warn('Disconnected from: ', deviceId));

Expected behavior
BLE should connect with data returned by getDevices

Plugin version:

  • @capacitor-community/bluetooth-le: 3.1.1

I cannot reproduce the problem you're describing. Can you share the logs from Xcode?

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day!
Capacitor Community Bot 💙