mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 09:08:06 +00:00
a2dp: handle pin code request
This commit is contained in:
parent
a5c9fdc555
commit
81c03ff0b8
@ -66,7 +66,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "btstack.h"
|
||||
#include "classic/btstack_sbc.h"
|
||||
|
||||
#define AVRCP_BROWSING_ENABLED 0
|
||||
|
||||
@ -848,6 +847,13 @@ static void a2dp_sink_packet_handler(uint8_t packet_type, uint16_t channel, uint
|
||||
uint8_t status;
|
||||
|
||||
if (packet_type != HCI_EVENT_PACKET) return;
|
||||
if (hci_event_packet_get_type(packet) == HCI_EVENT_PIN_CODE_REQUEST) {
|
||||
printf("Pin code request - using '0000'\n");
|
||||
hci_event_pin_code_request_get_bd_addr(packet, address);
|
||||
gap_pin_code_response(address, "0000");
|
||||
return;
|
||||
}
|
||||
|
||||
if (hci_event_packet_get_type(packet) != HCI_EVENT_A2DP_META) return;
|
||||
|
||||
switch (packet[2]){
|
||||
|
Loading…
Reference in New Issue
Block a user