SwiftyBluetooth icon indicating copy to clipboard operation
SwiftyBluetooth copied to clipboard

discoverServices error operationTimedOut(operation: EverShining.SBError.SBOperation.discoverServices)

Open ljchen1129 opened this issue 2 years ago • 2 comments

When the previous device is disconnected and another device is connected, the connection is successful, but an error is reported discoverServices

The first connection is successful, discoverServices can be successful

https://user-images.githubusercontent.com/13548479/188608830-b0b9e9c1-d6e9-42b6-8723-cd2d0fdec9f3.MP4

ljchen1129 avatar Sep 06 '22 10:09 ljchen1129

PeripheralProxy.cbPeripheral.delegate is nil

ljchen1129 avatar Sep 06 '22 10:09 ljchen1129

       ` let UUIDs = [peripheral.identifier].compactMap{ $0 }
        guard let per = retrievePeripherals(withUUIDs: UUIDs).first else { return }
        self?.connectPeripheral = per`

I solved this problem by reacquiring the device list and I found that each time the scan was completed, the PeripheralProxy was released

ljchen1129 avatar Sep 06 '22 14:09 ljchen1129