L2CAP Events

L2CAP events and data packets are delivered to the packet handler specified by l2cap_register_service resp. l2cap_create_channel. Data packets have the L2CAP_DATA_PACKET packet type. L2CAP provides the following events:

Event Event Code
L2CAP_EVENT_CHANNEL_OPENED 0x70
L2CAP_EVENT_CHANNEL_CLOSED 0x71
L2CAP_EVENT_INCOMING_CONNECTION 0x72
L2CAP_EVENT_CAN_SEND_NOW 0x78

Table: L2CAP Events.

L2CAP event paramaters, with size in bits:

RFCOMM Events

All RFCOMM events and data packets are currently delivered to the packet handler specified by rfcomm_register_packet_handler. Data packets have the _DATA_PACKET packet type. Here is the list of events provided by RFCOMM:

Event Event Code
RFCOMM_EVENT_CHANNEL_OPENED 0x80
RFCOMM_EVENT_CHANNEL_CLOSED 0x81
RFCOMM_EVENT_INCOMING_CONNECTION 0x82
RFCOMM_EVENT_CAN_SEND_NOW 0x89

Table: RFCOMM Events.

RFCOMM event paramaters, with size in bits:

Errors

Error Error Code
BTSTACK_MEMORY_ALLOC_FAILED 0x56
BTSTACK_ACL_BUFFERS_FULL 0x57
L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60
L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61
L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62
L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63
L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64
L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65
L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66
L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x65
L2CAP_CONFIG_RESPONSE_RESULT_SUCCESSFUL 0x66
L2CAP_CONFIG_RESPONSE_RESULT_UNACCEPTABLE_PARAMS 0x67
L2CAP_CONFIG_RESPONSE_RESULT_REJECTED 0x68
L2CAP_CONFIG_RESPONSE_RESULT_UNKNOWN_OPTIONS 0x69
L2CAP_SERVICE_ALREADY_REGISTERED 0x6a
RFCOMM_MULTIPLEXER_STOPPED 0x70
RFCOMM_NO_OUTGOING_CREDITS 0x72
SDP_HANDLE_ALREADY_REGISTERED 0x80

Table: Errors.