pauldemarco / flutter_blue

Bluetooth plugin for Flutter
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.23k forks source link

0.6.0+2. iOS plugin loses manufacturer data #335

Open juliansymeseti opened 5 years ago

juliansymeseti commented 5 years ago

Version 0.6.0+2. My company manufactures Bluetooth LE devices and use the manufacturer data in the Advertisement packet to filter out other makers' devices from scan results. Our devices write our company id to the Advertisement packet, with 0-length accompanying data. As far as I'm aware this is valid. On the Android side, this works fine: the condition <ScanResult>.advertisementData.manufacturerData.containsKey(<OUR ID>) returns true for our devices, otherwise false. On the iOS side however the same code always returns false. A quick browse of the iOS plugin code suggests that the manufacturer key is only being added to manufacturerData dictionary if the value is of non-0 length.

toddwilson commented 5 years ago

Please see pull request https://github.com/pauldemarco/flutter_blue/pull/293