fix(#718): stop the BLE MTU floor locking the composer on web
Web Bluetooth exposes no ATT MTU to page script; there is no API for it, so `mtuNow` can only ever be the 23-byte default. `effectiveMaxFrameSize` applied the BLE floor on every platform whenever the transport was bluetooth, so web landed on 20 bytes permanently and the channel composer computed a 0-byte limit. That is the #592 symptom on a third platform. Unlike Windows (#686) and Linux (#717), this cannot be fixed by reporting an MTU, because there is none to report. Patching flutter_blue_plus_web would achieve nothing. The floor exists because a raw single characteristic write larger than the PDU is rejected and wedges the send path (#395). That failure mode is not reachable on web: the browser owns fragmentation, and the Web Bluetooth spec caps one write at 512 bytes, rejecting anything larger with InvalidModificationError. maxFrameSize (172) is well inside that, so a write cannot be oversized whatever the link negotiated. Cited rather than assumed, because "just remove the floor" was considered and rejected as the fix for #592. Not unit-testable: `kIsWeb` is a compile-time constant, so a VM test cannot enter this branch and CI runs the suite on the VM only. The floor's behaviour on the other platforms stays covered. Proving this one needs a max-length send over web BLE in a browser, which is the acceptance criterion on #718. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>pull/741/head
parent
610cbcd3d4
commit
8d62dc7cc8
Loading…
Reference in new issue