Web Bluetooth: BluetoothRemoteGATTServer.maxWriteWithoutResponseSize
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Adds BluetoothRemoteGATTServer.maxWriteWithoutResponseSize, which reports the largest payload that writeValueWithoutResponse() can send in one ATT packet. A maxwritewithoutresponsesizechanged event notifies applications when Chrome observes the value change, allowing applications to size chunks without assuming a 20-byte limit. it depends on: https://chromestatus.com/feature/5138797158334464 and will be shipped together. implementation: https://chromium-review.googlesource.com/c/chromium/src/+/7879985 Bug: 40265040, 40686244, 40163619
Motivation
Web Bluetooth applications currently cannot determine the largest payload accepted by writeValueWithoutResponse() for an active GATT connection. They must hard-code the 20-byte default, use platform-specific heuristics, or probe with writes and handle platform-dependent failures or truncation. Exposing the usable payload size allows applications to chunk transfers correctly and use larger ATT MTUs for substantially better throughput.
Standards & signals
- Specification: https://pr-preview.s3.amazonaws.com/hjanuschka/web-bluetooth/pull/672.html#dom-bluetoothremotegattserver-maxwritewithoutresponsesize
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://issues.chromium.org/issues/40265040
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=web-bluetooth-bluetoothremotegattserver-maxwritewithoutresponsesize
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Web%20Bluetooth%3A%20BluetoothRemoteGATTServer.maxWriteWithoutResponseSize
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Web%20Bluetooth%3A%20BluetoothRemoteGATTServer.maxWriteWithoutResponseSize
- Baseline status: https://webstatus.dev/?q=Web%20Bluetooth%3A%20BluetoothRemoteGATTServer.maxWriteWithoutResponseSize
Samples: https://static.januschka.com/i-40265040
Explainers: https://github.com/WebBluetoothCG/web-bluetooth/pull/672