diff --git a/src/l2cap_signaling.c b/src/l2cap_signaling.c index 9b1c098ba..445c78d05 100644 --- a/src/l2cap_signaling.c +++ b/src/l2cap_signaling.c @@ -77,6 +77,9 @@ static uint16_t l2cap_create_signaling_internal(uint8_t * acl_buffer, hci_con_ha "22222", // 0x15 le credit based connection respone: dest cid, mtu, mps, initial credits, result "22", // 0x16 le flow control credit: source cid, credits #endif +#ifdef UNIT_TEST + "M", // invalid format for unit testing +#endif }; static const unsigned int num_l2cap_commands = sizeof(l2cap_signaling_commands_format) / sizeof(const char *); diff --git a/src/l2cap_signaling.h b/src/l2cap_signaling.h index 88c706284..cf917f75d 100644 --- a/src/l2cap_signaling.h +++ b/src/l2cap_signaling.h @@ -70,6 +70,9 @@ typedef enum { LE_CREDIT_BASED_CONNECTION_REQUEST, LE_CREDIT_BASED_CONNECTION_RESPONSE, LE_FLOW_CONTROL_CREDIT, +#ifdef UNIT_TEST + COMMAND_WITH_INVALID_FORMAT, +#endif COMMAND_REJECT_LE = 0x1F // internal to BTstack } L2CAP_SIGNALING_COMMANDS;