fix(#717): report the negotiated MTU on Linux so the composer is usable
Upstream flutter_blue_plus_linux returns `Stream.empty()` from onMtuChanged, so no MTU ever reaches Dart on Linux. FlutterBluePlus._mtuValues stays empty, mtuNow falls back to its 23-byte ATT default forever, effectiveMaxFrameSize returns the 20-byte floor, and maxChannelMessageBytes clamps to 0. Every keystroke is then rejected by the length limiter while the field still focuses and blinks: the #592 symptom, reported on Linux as locked entry fields. BlueZ does expose the negotiated MTU, as a property on org.bluez.GattCharacteristic1, surfaced by the bluez package this plugin already depends on (BlueZGattCharacteristic.mtu). The value was one layer down the whole time and simply never read. The patch watches characteristic property changes for 'MTU' and emits a BmMtuChangedResponse carrying the largest value across the device's characteristics. They describe one ATT link so they should agree; the max stops a characteristic that has not been exercised yet, and so reports nothing, from dragging the figure down. Zero is filtered out, because FlutterBluePlus would cache it and hand callers something worse than its own default, and identical consecutive values are suppressed. Nothing downstream needed changing: the device.mtu subscription added for Windows in #686 is platform-agnostic, so Linux now gets the same live budget recovery through the same path. Also points dependency_overrides at the vendored copy. Third vendored BLE backend, alongside android (#694) and winrt (#686). Verified: analyze clean, format clean, 962 tests pass. NOT verified on Linux hardware; nobody here runs Linux BLE, which is why the gap survived this long. #717's acceptance requires a real Linux BLE connect showing a non-default `MTU now:` in the app log. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>fix/717-linux-web-mtu
parent
0020aa9c6e
commit
91f3cdfa3b
Loading…
Reference in new issue