steamclock / bluejay

A simple Swift framework for building reliable Bluetooth LE apps.
MIT License
1.09k stars 98 forks source link

need help: Bluejay stops listening to service for no apparent reason. #253

Closed nissaba closed 3 years ago

nissaba commented 3 years ago

Summary:

I ask Bluejay to listen to a service and it stops directly after starting to listen with message

Will start listening to Characteristic: 9AFABEDB-50F5-4766-8EE1-709073D6EB08, Service: 9AFAABCD-50F5-4766-8EE1-709073D6EB08 on NOTIOFE46EEBB. Listening to Characteristic: 9AFABEDB-50F5-4766-8EE1-709073D6EB08, Service: 9AFAABCD-50F5-4766-8EE1-709073D6EB08 on NOTIOFE46EEBB. Queue has removed Bluejay.ListenCharacteristic because it has finished. Queue is empty, nothing to update.

Steps to Reproduce:

make a listen request

Actual Result: it starts then stops

Expected Result:

expected to listen till requested to not listen anymore.

Device, Build, OS: iPhone 11 max, iOS 14, default cocoa pod package

let requestedChar = CharacteristicIdentifier(uuid: NotioModel.signalLiveData, service: ServiceIdentifier(uuid: NotioModel.SignalsService))

   ```

bluejay.listen(to: requestedChar, multipleListenOption: .replaceable) {[weak self] (result: ReadResult) in print("Signals update") switch result { case .success(let signals): self?.liveSignals = signals case .failure(let err): print("Error: (err)") } }



I
nissaba commented 3 years ago

Its a problem with the firmware, it should but it won't until you read some other service characteristics.