| Previous | Next |
| E_BLUETOOTH_ATT_REQUEST_NOT_SUPPORTED | E_BLUETOOTH_ATT_INSUFFICIENT_AUTHORIZATION |
E_BLUETOOTH_ATT_INVALID_OFFSET
Long-value procedures depend on the current value length
E_BLUETOOTH_ATT_INVALID_OFFSET corresponds to ATT error 0x07. Offsets are used by Read Blob and prepare-write procedures to access a portion of an attribute value. The server rejects an offset that is beyond the value boundary or otherwise invalid for the selected operation.
A client can calculate a bad offset after assuming that every fragment has the same payload size, ignoring the first response length, or continuing a long read after the value changed. For writes, overlapping, skipped, or stale offsets can also reveal a broken fragmentation algorithm.
Reconstruct the fragment sequence
- Log every offset and fragment length in order, together with the negotiated ATT MTU.
- Stop a long read when a returned fragment is shorter than the maximum response payload.
- Restart the procedure if the profile permits the value to change during transfer.
- For queued writes, verify that offsets describe the intended final byte layout before Execute Write.
References
- Bluetooth Core: Read Blob and Prepare Write
- BlueZ GATT API: offset handling
- Zephyr: GATT read and write offsets
Looking for a different code? Search another status or error code.