Skip to content

Commit 63db05e

Browse files
szymon-czaprackisjanc
authored andcommitted
nimble/eatt: Handle MTU request over enhanced bearer
Handle ATT MTU request over enhanced bearer. This request shall return Request Not Supported error (0x06) This is required for GATT/CL/GAC/BV-01-C test.
1 parent cf947cd commit 63db05e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

nimble/host/src/ble_att.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,10 @@ bool
639639
ble_eatt_supported_req(uint8_t opcode)
640640
{
641641
switch (opcode) {
642+
/* EATT does not support MTU request,
643+
* but we must handle this request with proper error response.
644+
*/
645+
case BLE_ATT_OP_MTU_REQ:
642646
case BLE_ATT_OP_WRITE_CMD:
643647
case BLE_ATT_OP_FIND_INFO_REQ:
644648
case BLE_ATT_OP_FIND_TYPE_VALUE_REQ:

nimble/host/src/ble_att_svr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ ble_att_svr_rx_mtu(uint16_t conn_handle, uint16_t cid, struct os_mbuf **rxom)
747747
mtu = 0;
748748

749749
if (cid != BLE_L2CAP_CID_ATT) {
750-
/*TODO */
750+
/* This operation is not supported over enhanced ATT bearer */
751751
return BLE_HS_ENOTSUP;
752752
}
753753

0 commit comments

Comments
 (0)