steamclock / bluejay

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

Failed to write to sensor location with error: Writing is not permitted #229

Open hunter123321000 opened 4 years ago

hunter123321000 commented 4 years ago

Summary: could not write command to device, but could read from device

Actual Result: 2020-01-13 09:43:25.884 [Bluejay] [main] > Started write to Characteristic: 0000FFB2-0000-1000-8000-00805F9B34FB, Service: 0000FFB0-0000-1000-8000-00805F9B34FB on 845E44D2-42EE-7B03-CC5D-10675DF5DB09. 2020-01-13 09:43:25.885 [Bluejay] [main] > Failed writing to Characteristic: 0000FFB2-0000-1000-8000-00805F9B34FB, Service: 0000FFB0-0000-1000-8000-00805F9B34FB on 845E44D2-42EE-7B03-CC5D-10675DF5DB09 with error: Writing is not permitted. "Failed to write to sensor location with error: Writing is not permitted." 2020-01-13 09:43:25.886 [Bluejay] [main] > Queue has removed Bluejay.WriteCharacteristic because it has finished. 2020-01-13 09:43:25.886 [Bluejay] [main] > Queue is empty, nothing to update. "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23" "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23" "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23" "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23" "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23" "data: Optional(\"ReturnTemp:+23\n\")" "return temp: 23"

Device, Build, OS: bt 4.0, Xcode 11.3 , iOS 13.3

DantePuglisi commented 2 years ago

A bit late 🙈 but I fixed that issue by adding type: .withoutResponse when calling write. That's because the characteristic I was writing to was a withoutResponse characteristic.