mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-04 15:39:59 +00:00
l2cap-ertm: fallback to basic mode if remote doesn't indicate support for ertm in information response
This commit is contained in:
parent
f2fa388d63
commit
f073f0868e
@ -1771,6 +1771,7 @@ static void l2cap_signaling_handler_dispatch( hci_con_handle_t handle, uint8_t *
|
||||
if (channel->con_handle != handle) continue;
|
||||
// bail if ERTM was requested but is not supported
|
||||
if ((channel->mode == L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION) && ((connection->l2cap_state.extended_feature_mask & 0x08) == 0)){
|
||||
if (channel->ertm_mandatory){
|
||||
// channel closed
|
||||
channel->state = L2CAP_STATE_CLOSED;
|
||||
// map l2cap connection response result to BTstack status enumeration
|
||||
@ -1779,6 +1780,10 @@ static void l2cap_signaling_handler_dispatch( hci_con_handle_t handle, uint8_t *
|
||||
btstack_linked_list_remove(&l2cap_channels, (btstack_linked_item_t *) channel);
|
||||
btstack_memory_l2cap_channel_free(channel);
|
||||
continue;
|
||||
} else {
|
||||
// fallback to Basic mode
|
||||
channel->mode = L2CAP_CHANNEL_MODE_BASIC;
|
||||
}
|
||||
}
|
||||
// start connecting
|
||||
if (channel->state == L2CAP_STATE_WAIT_OUTGOING_EXTENDED_FEATURES){
|
||||
|
Loading…
x
Reference in New Issue
Block a user