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

'CentralManager.instance.readCharacteristic()' function on windows always return the initial value #42

Closed
Tunahan0155 opened this issue Jan 18, 2024 · 3 comments · Fixed by #43
Assignees
Labels
bug Something isn't working

Comments

@Tunahan0155
Copy link

Tunahan0155 commented Jan 18, 2024

Hi, When the notify feature is disabled in Windows, the 'CentralManager.instance.readCharacteristic()' function always gives the value when the project is first opened, and then it continues to give the same value even if the value in the characteristic is changed on the peripheral device. This problem does not occur when notify is enabled, it occurs when it is disabled. I did not encounter this problem on Android, iOS, or Mac, I encountered this problem only on Windows.

@Tunahan0155 Tunahan0155 changed the title Read function on windows always return the initial value 'CentralManager.instance.readCharacteristic' function on windows always return the initial value Jan 18, 2024
@Tunahan0155 Tunahan0155 changed the title 'CentralManager.instance.readCharacteristic' function on windows always return the initial value 'CentralManager.instance.readCharacteristic()' function on windows always return the initial value Jan 18, 2024
@yanshouwang yanshouwang added bug Something isn't working question Further information is requested labels Jan 18, 2024
@yanshouwang
Copy link
Owner

yanshouwang commented Jan 19, 2024

Thanks for this report, the windows API is a little different from other platforms, it cached values of the peripherals, after looked at the GattCharacteristic.ReadValueAsync and GattDescriptor.ReadValueAsync documents, I need to add the cacheMode argument when I call this method.

@yanshouwang yanshouwang removed the question Further information is requested label Jan 19, 2024
@yanshouwang yanshouwang self-assigned this Jan 19, 2024
@yanshouwang yanshouwang linked a pull request Jan 19, 2024 that will close this issue
@yanshouwang
Copy link
Owner

@Tunahan0155 Please test with 5.0.5 to see if this error has resolved.

@Tunahan0155
Copy link
Author

Thank you for your answer, I tested it with version 5.0.5, the error was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants