[bluetooth][win] Force uncached characteristic value reads

The ReadValueAsync() method will return the characteristic value
cached by Windows. It appears that when a value is written to a
characteristic Windows assumes that the device will respond with the
value written and will update its cache to that value. This is a
problem for devices which do not follow this behavior and instead
respond with an unrelated value.

This change switches to using the ReadValueWithCacheModeAsync() method
and passes the BluetoothCacheMode_Uncached flag in order to force
Windows to always read the value directly from the device.

Bug: 904114
Change-Id: I76b214abd0004fc311e1f32a9457273df60a6f54
Reviewed-on: https://chromium-review.googlesource.com/c/1364393
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614437}
2 files changed