diff --git a/CHANGELOG.md b/CHANGELOG.md index 8739097b2..39e56f977 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - GAP: fix `gap_connect` after `gap_connect_cancel` - HCI: handle start inquiry failure - L2CAP: fix create outgoing connection triggered in hci disconnect event callback +- L2CAP: return unknown mandatory option in config response - AVRCP Target: fix notification changed event - HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off - HFP HF: only emit single event for RING and AG Status updates diff --git a/src/l2cap.c b/src/l2cap.c index 7e6c231dc..944f3b136 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -1543,7 +1543,7 @@ static bool l2cap_run_for_classic_channel(l2cap_channel_t * channel){ } if (channel->state_var & L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_INVALID){ channelStateVarClearFlag(channel, L2CAP_CHANNEL_STATE_VAR_SENT_CONF_RSP); - l2cap_send_signaling_packet(channel->con_handle, CONFIGURE_RESPONSE, channel->remote_sig_id, channel->remote_cid, flags, L2CAP_CONF_RESULT_UNKNOWN_OPTIONS, 0, NULL); + l2cap_send_signaling_packet(channel->con_handle, CONFIGURE_RESPONSE, channel->remote_sig_id, channel->remote_cid, flags, L2CAP_CONF_RESULT_UNKNOWN_OPTIONS, 1, &channel->unknown_option); #ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE } else if (channel->state_var & L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_REJECTED){ channelStateVarClearFlag(channel, L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_REJECTED); @@ -2739,7 +2739,8 @@ static void l2cap_signaling_handle_configure_request(l2cap_channel_t *channel, u #endif // check for unknown options if ((option_hint == 0) && ((option_type < L2CAP_CONFIG_OPTION_TYPE_MAX_TRANSMISSION_UNIT) || (option_type > L2CAP_CONFIG_OPTION_TYPE_EXTENDED_WINDOW_SIZE))){ - log_info("l2cap cid %u, unknown options", channel->local_cid); + log_info("l2cap cid %u, unknown option 0x%02x", channel->local_cid, option_type); + channel->unknown_option = option_type; channelStateVarSetFlag(channel, L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_INVALID); } pos += length; @@ -2797,7 +2798,8 @@ static void l2cap_signaling_handle_configure_response(l2cap_channel_t *channel, // check for unknown options if (option_hint == 0 && (option_type < L2CAP_CONFIG_OPTION_TYPE_MAX_TRANSMISSION_UNIT || option_type > L2CAP_CONFIG_OPTION_TYPE_EXTENDED_WINDOW_SIZE)){ - log_info("l2cap cid %u, unknown options", channel->local_cid); + log_info("l2cap cid %u, unknown option 0x%02x", channel->local_cid, option_type); + channel->unknown_option = option_type; channelStateVarSetFlag(channel, L2CAP_CHANNEL_STATE_VAR_SEND_CONF_RSP_INVALID); } diff --git a/src/l2cap.h b/src/l2cap.h index 25a0c17d6..f866827d0 100644 --- a/src/l2cap.h +++ b/src/l2cap.h @@ -245,6 +245,8 @@ typedef struct { uint8_t reason; // used in decline internal + uint8_t unknown_option; // used for ConfigResponse + // LE Data Channels // incoming SDU