dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
535 stars 197 forks source link

Missing packets in notifications #507

Open itamardo opened 4 years ago

itamardo commented 4 years ago

I'm trying to work with a device that uses a BGX BLE SOC. It sends a message of length 104 bytes which is received on a specific characteristic notifications on which I am monitoring/listening. I am using an MTU of 247 bytes. What happens is that the received message is divided into two packets, the first of about 60 bytes and the second of what's left. This works perfectly when using a native Android app and ble implementation. I receive two onCharacteristicChanged and both packets and am able to reconstruct the full 104-byte message. However, with flutter (also on Android for now) I seem to only be getting the first 60-byte notification and never the second one. I ran with LogLevel.verbose and saw that indeed only one onCharacteristicChanged is issued and only one "Notification from Characteristic" is logged. Is there some configuration I need to use or some other mechanism except the monitor/listen mechanism?