dotintent / FlutterBleLib

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

Negotiated MTU is not honored #508

Closed albrownwood closed 3 years ago

albrownwood commented 4 years ago

client: samsung G930F, Android7 peripheral: rpi zero w , Bluez

MTU negotiated at 128Bytes, write 128 Bytes to characteristic, 125 Bytes are actually received on peripheral (end of buffer truncated) MTU negotiated at 255Bytes, write 255 Bytes to characteristic, 252 Bytes are actually received on peripheral (end of buffer truncated)

Not sure if the issue is from client or peripheral side.

Bobby9292 commented 3 years ago

I thinks it's due to the 3 bytes required for the ATT header. It's better to negotiate 3 bytes larger than the size of your write data. Hope it helps.

mikolak commented 3 years ago

Yeah, to my knowledge notifications/indications require a 3 bytes of header identifying the characteristic, as the central does not await any particular data.