mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-30 16:20:24 +00:00
Merge branch 'develop' of https://github.com/bluekitchen/btstack into develop
This commit is contained in:
commit
3c5f85690a
@ -473,13 +473,13 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
* the BNEP Channel ID, which is used for sending Ethernet packets over BNEP.
|
* the BNEP Channel ID, which is used for sending Ethernet packets over BNEP.
|
||||||
*/
|
*/
|
||||||
case BNEP_EVENT_CHANNEL_OPENED:
|
case BNEP_EVENT_CHANNEL_OPENED:
|
||||||
if (packet[2]) {
|
if (bnep_event_channel_opened_get_status(packet)) {
|
||||||
printf("BNEP channel open failed, status %02x\n", packet[2]);
|
printf("BNEP channel open failed, status %02x\n", bnep_event_channel_opened_get_status(packet));
|
||||||
} else {
|
} else {
|
||||||
bnep_cid = little_endian_read_16(packet, 3);
|
bnep_cid = bnep_event_channel_opened_get_bnep_cid(packet);
|
||||||
uuid_source = little_endian_read_16(packet, 5);
|
uuid_source = bnep_event_channel_opened_get_source_uuid(packet);
|
||||||
uuid_dest = little_endian_read_16(packet, 7);
|
uuid_dest = bnep_event_channel_opened_get_destination_uuid(packet);
|
||||||
mtu = little_endian_read_16(packet, 9);
|
mtu = bnep_event_channel_opened_get_mtu(packet);
|
||||||
//bt_flip_addr(event_addr, &packet[9]);
|
//bt_flip_addr(event_addr, &packet[9]);
|
||||||
memcpy(&event_addr, &packet[11], sizeof(bd_addr_t));
|
memcpy(&event_addr, &packet[11], sizeof(bd_addr_t));
|
||||||
printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu);
|
printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu);
|
||||||
|
@ -155,7 +155,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// deny link key request
|
// deny link key request
|
||||||
printf("Link key request\n\r");
|
printf("Link key request\n\r");
|
||||||
reverse_bd_addr(&packet[2], event_addr);
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -124,8 +124,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
|||||||
|
|
||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// link key request
|
// link key request
|
||||||
reverse_bd_addr(&packet[2],
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
event_addr);
|
|
||||||
bt_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
bt_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -137,8 +137,7 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
|||||||
|
|
||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// link key request
|
// link key request
|
||||||
reverse_bd_addr(&packet[2],
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
event_addr);
|
|
||||||
bt_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
bt_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// deny link key request
|
// deny link key request
|
||||||
printf("Link key request\n\r");
|
printf("Link key request\n\r");
|
||||||
reverse_bd_addr(&packet[2], event_addr);
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// deny link key request
|
// deny link key request
|
||||||
printf("Link key request\n\r");
|
printf("Link key request\n\r");
|
||||||
reverse_bd_addr(&packet[2], event_addr);
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// deny link key request
|
// deny link key request
|
||||||
printf("Link key request\n\r");
|
printf("Link key request\n\r");
|
||||||
reverse_bd_addr(&packet[2], event_addr);
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *pack
|
|||||||
case HCI_EVENT_LINK_KEY_REQUEST:
|
case HCI_EVENT_LINK_KEY_REQUEST:
|
||||||
// deny link key request
|
// deny link key request
|
||||||
printf("Link key request\n\r");
|
printf("Link key request\n\r");
|
||||||
reverse_bd_addr(&packet[2], event_addr);
|
hci_event_link_key_request_get_bd_addr(packet, event_addr);
|
||||||
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
hci_send_cmd(&hci_link_key_request_negative_reply, &event_addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -701,16 +701,16 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
|||||||
printf("SSP User Confirmation Request with numeric value '%06u'\n", little_endian_read_32(packet, 8));
|
printf("SSP User Confirmation Request with numeric value '%06u'\n", little_endian_read_32(packet, 8));
|
||||||
printf("SSP User Confirmation Auto accept\n");
|
printf("SSP User Confirmation Auto accept\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BNEP_EVENT_CHANNEL_OPENED:
|
case BNEP_EVENT_CHANNEL_OPENED:
|
||||||
if (packet[2]) {
|
if (bnep_event_channel_opened_get_status(packet)) {
|
||||||
printf("BNEP channel open failed, status %02x\n", packet[2]);
|
printf("BNEP channel open failed, status %02x\n", bnep_event_channel_opened_get_status(packet));
|
||||||
} else {
|
} else {
|
||||||
// data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), remote_address (48)
|
// data: event(8), len(8), status (8), bnep source uuid (16), bnep destination uuid (16), remote_address (48)
|
||||||
bnep_cid = little_endian_read_16(packet, 3);
|
bnep_cid = bnep_event_channel_opened_get_cid(packet);
|
||||||
uuid_source = little_endian_read_16(packet, 5);
|
uuid_source = bnep_event_channel_opened_get_source_uuid(packet);
|
||||||
uuid_dest = little_endian_read_16(packet, 7);
|
uuid_dest = bnep_event_channel_opened_get_destination_uuid(packet);
|
||||||
mtu = little_endian_read_16(packet, 9);
|
mtu = bnep_event_channel_opened_get_mtu(packet);
|
||||||
//bt_flip_addr(event_addr, &packet[9]);
|
//bt_flip_addr(event_addr, &packet[9]);
|
||||||
memcpy(&event_addr, &packet[11], sizeof(bd_addr_t));
|
memcpy(&event_addr, &packet[11], sizeof(bd_addr_t));
|
||||||
printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu);
|
printf("BNEP connection open succeeded to %s source UUID 0x%04x dest UUID: 0x%04x, max frame size %u\n", bd_addr_to_str(event_addr), uuid_source, uuid_dest, mtu);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user