chipweinberger / flutter_blue_plus

Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android, iOS, macOS
Other
791 stars 478 forks source link

[Feature]: AdaptionData.manufactorData not updated in a timely manner #871

Closed yecao007 closed 7 months ago

yecao007 commented 7 months ago

FlutterBluePlus Version

^1.32.1

Flutter Version

3.1

What OS?

Android

OS Version

1

Bluetooth Module

esp 3c

What is your feature request?

After setting the flag in adaptationData.manufactorData after Bluetooth connection, scanning again will still show the original old data. If scanning again, the update will be displayed. Is there a cache in the plugin?

Logs

I/flutter (20119): new result.device.code: Thermostat_92b9a8: 1F1E1E1F201E1E
I/flutter (20119): new result.device.code: : 9813B2C0A8131B58168091F2E94CA83B23
I/flutter (20119): new result.device.code: Amazfit GTR 3:  
I/flutter (20119): new result.device.code: : 1064E1DF615AC18
I/flutter (20119): new result.device.code: : A10C8D1D9E354C4D6CDE
I/flutter (20119): no result.device.code: babai.switch.302ml: no null
I/flutter (20119): new result.device.code: Thermostat_92b9a8: 1F1E1E1F201E1F

The main issue is that the Thermostat_92b9a8 setting was originally set to 1F1E1E1F201E1E, but later set to 1F1E1E1F201E1F, and when scanned again, the above result will appear (display the original data 1F1E1E1F201E1E first, then scan again to display the latest normal value)
chipweinberger commented 7 months ago

it's only updated during scanning. this cannot be changed because that is the only place we can access it.