Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 16 gets Error code: 402 when reading data from monitorCharacteristic() #625

Open
Aldaniee opened this issue Nov 8, 2022 · 3 comments

Comments

@Aldaniee
Copy link

Aldaniee commented Nov 8, 2022

[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: BleError (Error code: 402, ATT error code: 2, iOS error code: null, Android error code: null, reason: Reading is not permitted., internal message: null, device ID: 48E32FDC-BC25-0B46-AC03-549FD00B26B8, service UUID: ce060030-43e5-11e4-916c-0800200c9a66, characteristic UUID: ce060039-43e5-11e4-916c-0800200c9a66, descriptor UUID: null)

Android works with no errors but iOS throws this when data is received in the listen() from monitorCharacteristic steam.

@MoralCode
Copy link

looks like this already has an answer in #549

The characteristic you're trying to read does not support reading, only notifications. Use .monitor() and listen to the stream.

@MoralCode
Copy link

unable to reproduce on iOS 15.0.1 or 15.7.1. seems like it may be limited to iOS 16 in some way.
it seems like there is also precedent for iOS doing weird stuff from version to version given that a fork (https://github.com/davejlin/flutter_ble_lib_ios_15) seems to have been created by someone who needed iOS 15 support

@Aldaniee
Copy link
Author

I have now tested this with an iPhone 13 Pro on 16.0.0 and an iPhone 12 Pro on 16.0.2 and found the same issue on both further enforcing the idea this is an iOS 16 specific issue. I'll change the title to reflect this.

@Aldaniee Aldaniee changed the title iOS gets Error code: 402 when reading data from monitorCharacteristic() iOS 16 gets Error code: 402 when reading data from monitorCharacteristic() Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants