Open ghost opened 6 years ago
Blindly specifying a fixedMTU is not a reasonable treatment, and not all BLE devices support that MTU value. How about making the negotiation method public, even if the function is limited to certain platforms. These platform differences can be handled by exceptions.
Bluetooth mesh runs over Bluetooth LE and defines a proxy node and associated proxy protocol to allow standard (non-mesh) Bluetooth LE clients to talk to a mesh network.
The proxy protocol requires you to know the MTU which was negotiated behind the scenes by client and server so that packets can be filled and segmentation used when messages exceed the size of the MTU. MTU negotiation happens silently behind the scenes in Web Bluetooth and there's no API that lets you find out what the outcome of that negotiation was. This is needed for the reasons given. Please consider adding an API such as getNeogitatedMTU().
Thanks
-- [edit: Related chromium Issue 1164621: WebBluetooth: not implemented "Exchange MTU" step]