USB Host Shield 2.0
BTD.h
Go to the documentation of this file.
1 /* Copyright (C) 2012 Kristian Lauszus, TKJ Electronics. All rights reserved.
2 
3  This software may be distributed and modified under the terms of the GNU
4  General Public License version 2 (GPL2) as published by the Free Software
5  Foundation and appearing in the file GPL2.TXT included in the packaging of
6  this file. Please note that GPL2 Section 2[b] requires that all works based
7  on this software must also be made publicly available under the terms of
8  the GPL2 ("Copyleft").
9 
10  Contact information
11  -------------------
12 
13  Kristian Lauszus, TKJ Electronics
14  Web : http://www.tkjelectronics.com
15  e-mail : kristianl@tkjelectronics.com
16  */
17 
18 #ifndef _btd_h_
19 #define _btd_h_
20 
21 #include "Usb.h"
22 #include "usbhid.h"
23 
24 //PID and VID of the Sony PS3 devices
25 #define PS3_VID 0x054C // Sony Corporation
26 #define PS3_PID 0x0268 // PS3 Controller DualShock 3
27 #define PS3NAVIGATION_PID 0x042F // Navigation controller
28 #define PS3MOVE_PID 0x03D5 // Motion controller
29 
30 // These dongles do not present themselves correctly, so we have to check for them manually
31 #define IOGEAR_GBU521_VID 0x0A5C
32 #define IOGEAR_GBU521_PID 0x21E8
33 #define BELKIN_F8T065BF_VID 0x050D
34 #define BELKIN_F8T065BF_PID 0x065A
35 
36 /* Bluetooth dongle data taken from descriptors */
37 #define BULK_MAXPKTSIZE 64 // Max size for ACL data
38 
39 // Used in control endpoint header for HCI Commands
40 #define bmREQ_HCI_OUT USB_SETUP_HOST_TO_DEVICE|USB_SETUP_TYPE_CLASS|USB_SETUP_RECIPIENT_DEVICE
41 
42 /* Bluetooth HCI states for hci_task() */
43 #define HCI_INIT_STATE 0
44 #define HCI_RESET_STATE 1
45 #define HCI_CLASS_STATE 2
46 #define HCI_BDADDR_STATE 3
47 #define HCI_LOCAL_VERSION_STATE 4
48 #define HCI_SET_NAME_STATE 5
49 #define HCI_CHECK_DEVICE_SERVICE 6
50 
51 #define HCI_INQUIRY_STATE 7 // These three states are only used if it should pair and connect to a device
52 #define HCI_CONNECT_DEVICE_STATE 8
53 #define HCI_CONNECTED_DEVICE_STATE 9
54 
55 #define HCI_SCANNING_STATE 10
56 #define HCI_CONNECT_IN_STATE 11
57 #define HCI_REMOTE_NAME_STATE 12
58 #define HCI_CONNECTED_STATE 13
59 #define HCI_DISABLE_SCAN_STATE 14
60 #define HCI_DONE_STATE 15
61 #define HCI_DISCONNECT_STATE 16
62 
63 /* HCI event flags*/
64 #define HCI_FLAG_CMD_COMPLETE (1UL << 0)
65 #define HCI_FLAG_CONNECT_COMPLETE (1UL << 1)
66 #define HCI_FLAG_DISCONNECT_COMPLETE (1UL << 2)
67 #define HCI_FLAG_REMOTE_NAME_COMPLETE (1UL << 3)
68 #define HCI_FLAG_INCOMING_REQUEST (1UL << 4)
69 #define HCI_FLAG_READ_BDADDR (1UL << 5)
70 #define HCI_FLAG_READ_VERSION (1UL << 6)
71 #define HCI_FLAG_DEVICE_FOUND (1UL << 7)
72 #define HCI_FLAG_CONNECT_EVENT (1UL << 8)
73 
74 /* Macros for HCI event flag tests */
75 #define hci_check_flag(flag) (hci_event_flag & (flag))
76 #define hci_set_flag(flag) (hci_event_flag |= (flag))
77 #define hci_clear_flag(flag) (hci_event_flag &= ~(flag))
78 
79 /* HCI Events managed */
80 #define EV_INQUIRY_COMPLETE 0x01
81 #define EV_INQUIRY_RESULT 0x02
82 #define EV_CONNECT_COMPLETE 0x03
83 #define EV_INCOMING_CONNECT 0x04
84 #define EV_DISCONNECT_COMPLETE 0x05
85 #define EV_AUTHENTICATION_COMPLETE 0x06
86 #define EV_REMOTE_NAME_COMPLETE 0x07
87 #define EV_ENCRYPTION_CHANGE 0x08
88 #define EV_CHANGE_CONNECTION_LINK 0x09
89 #define EV_ROLE_CHANGED 0x12
90 #define EV_NUM_COMPLETE_PKT 0x13
91 #define EV_PIN_CODE_REQUEST 0x16
92 #define EV_LINK_KEY_REQUEST 0x17
93 #define EV_LINK_KEY_NOTIFICATION 0x18
94 #define EV_DATA_BUFFER_OVERFLOW 0x1A
95 #define EV_MAX_SLOTS_CHANGE 0x1B
96 #define EV_READ_REMOTE_VERSION_INFORMATION_COMPLETE 0x0C
97 #define EV_QOS_SETUP_COMPLETE 0x0D
98 #define EV_COMMAND_COMPLETE 0x0E
99 #define EV_COMMAND_STATUS 0x0F
100 #define EV_LOOPBACK_COMMAND 0x19
101 #define EV_PAGE_SCAN_REP_MODE 0x20
102 
103 /* Bluetooth states for the different Bluetooth drivers */
104 #define L2CAP_WAIT 0
105 #define L2CAP_DONE 1
106 
107 /* Used for HID Control channel */
108 #define L2CAP_CONTROL_CONNECT_REQUEST 2
109 #define L2CAP_CONTROL_CONFIG_REQUEST 3
110 #define L2CAP_CONTROL_SUCCESS 4
111 #define L2CAP_CONTROL_DISCONNECT 5
112 
113 /* Used for HID Interrupt channel */
114 #define L2CAP_INTERRUPT_SETUP 6
115 #define L2CAP_INTERRUPT_CONNECT_REQUEST 7
116 #define L2CAP_INTERRUPT_CONFIG_REQUEST 8
117 #define L2CAP_INTERRUPT_DISCONNECT 9
118 
119 /* Used for SDP channel */
120 #define L2CAP_SDP_WAIT 10
121 #define L2CAP_SDP_SUCCESS 11
122 
123 /* Used for RFCOMM channel */
124 #define L2CAP_RFCOMM_WAIT 12
125 #define L2CAP_RFCOMM_SUCCESS 13
126 
127 #define L2CAP_DISCONNECT_RESPONSE 14 // Used for both SDP and RFCOMM channel
128 
129 /* Bluetooth states used by some drivers */
130 #define TURN_ON_LED 17
131 #define PS3_ENABLE_SIXAXIS 18
132 #define WII_CHECK_MOTION_PLUS_STATE 19
133 #define WII_CHECK_EXTENSION_STATE 20
134 #define WII_INIT_MOTION_PLUS_STATE 21
135 
136 /* L2CAP event flags for HID Control channel */
137 #define L2CAP_FLAG_CONNECTION_CONTROL_REQUEST (1UL << 0)
138 #define L2CAP_FLAG_CONFIG_CONTROL_SUCCESS (1UL << 1)
139 #define L2CAP_FLAG_CONTROL_CONNECTED (1UL << 2)
140 #define L2CAP_FLAG_DISCONNECT_CONTROL_RESPONSE (1UL << 3)
141 
142 /* L2CAP event flags for HID Interrupt channel */
143 #define L2CAP_FLAG_CONNECTION_INTERRUPT_REQUEST (1UL << 4)
144 #define L2CAP_FLAG_CONFIG_INTERRUPT_SUCCESS (1UL << 5)
145 #define L2CAP_FLAG_INTERRUPT_CONNECTED (1UL << 6)
146 #define L2CAP_FLAG_DISCONNECT_INTERRUPT_RESPONSE (1UL << 7)
147 
148 /* L2CAP event flags for SDP channel */
149 #define L2CAP_FLAG_CONNECTION_SDP_REQUEST (1UL << 8)
150 #define L2CAP_FLAG_CONFIG_SDP_SUCCESS (1UL << 9)
151 #define L2CAP_FLAG_DISCONNECT_SDP_REQUEST (1UL << 10)
152 
153 /* L2CAP event flags for RFCOMM channel */
154 #define L2CAP_FLAG_CONNECTION_RFCOMM_REQUEST (1UL << 11)
155 #define L2CAP_FLAG_CONFIG_RFCOMM_SUCCESS (1UL << 12)
156 #define L2CAP_FLAG_DISCONNECT_RFCOMM_REQUEST (1UL << 13)
157 
158 #define L2CAP_FLAG_DISCONNECT_RESPONSE (1UL << 14)
159 
160 /* Macros for L2CAP event flag tests */
161 #define l2cap_check_flag(flag) (l2cap_event_flag & (flag))
162 #define l2cap_set_flag(flag) (l2cap_event_flag |= (flag))
163 #define l2cap_clear_flag(flag) (l2cap_event_flag &= ~(flag))
164 
165 /* L2CAP signaling commands */
166 #define L2CAP_CMD_COMMAND_REJECT 0x01
167 #define L2CAP_CMD_CONNECTION_REQUEST 0x02
168 #define L2CAP_CMD_CONNECTION_RESPONSE 0x03
169 #define L2CAP_CMD_CONFIG_REQUEST 0x04
170 #define L2CAP_CMD_CONFIG_RESPONSE 0x05
171 #define L2CAP_CMD_DISCONNECT_REQUEST 0x06
172 #define L2CAP_CMD_DISCONNECT_RESPONSE 0x07
173 #define L2CAP_CMD_INFORMATION_REQUEST 0x0A
174 #define L2CAP_CMD_INFORMATION_RESPONSE 0x0B
175 
176 // Used For Connection Response - Remember to Include High Byte
177 #define PENDING 0x01
178 #define SUCCESSFUL 0x00
179 
180 /* Bluetooth L2CAP PSM - see http://www.bluetooth.org/Technical/AssignedNumbers/logical_link.htm */
181 #define SDP_PSM 0x01 // Service Discovery Protocol PSM Value
182 #define RFCOMM_PSM 0x03 // RFCOMM PSM Value
183 #define HID_CTRL_PSM 0x11 // HID_Control PSM Value
184 #define HID_INTR_PSM 0x13 // HID_Interrupt PSM Value
185 
186 // Used to determine if it is a Bluetooth dongle
187 #define WI_SUBCLASS_RF 0x01 // RF Controller
188 #define WI_PROTOCOL_BT 0x01 // Bluetooth Programming Interface
189 
190 #define BTD_MAX_ENDPOINTS 4
191 #define BTD_NUM_SERVICES 4 // Max number of Bluetooth services - if you need more than 4 simply increase this number
192 
193 #define PAIR 1
194 
195 class BluetoothService;
196 
201 class BTD : public USBDeviceConfig, public UsbConfigXtracter {
202 public:
207  BTD(USB *p);
208 
217  uint8_t ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed);
225  uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed);
230  uint8_t Release();
235  uint8_t Poll();
236 
241  virtual uint8_t GetAddress() {
242  return bAddress;
243  };
244 
249  virtual bool isReady() {
250  return bPollEnable;
251  };
252 
258  virtual bool DEVCLASSOK(uint8_t klass) {
259  return (klass == USB_CLASS_WIRELESS_CTRL);
260  };
261 
269  virtual bool VIDPIDOK(uint16_t vid, uint16_t pid) {
270  if((vid == IOGEAR_GBU521_VID && pid == IOGEAR_GBU521_PID) || (vid == BELKIN_F8T065BF_VID && pid == BELKIN_F8T065BF_PID))
271  return true;
272  if(my_bdaddr[0] != 0x00 || my_bdaddr[1] != 0x00 || my_bdaddr[2] != 0x00 || my_bdaddr[3] != 0x00 || my_bdaddr[4] != 0x00 || my_bdaddr[5] != 0x00) { // Check if Bluetooth address is set
273  if(vid == PS3_VID && (pid == PS3_PID || pid == PS3NAVIGATION_PID || pid == PS3MOVE_PID))
274  return true;
275  }
276  return false;
277  };
289  void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep);
293  void disconnect();
294 
301  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++) {
302  if(!btService[i]) {
303  btService[i] = pService;
304  return i; // Return ID
305  }
306  }
307  return -1; // Error registering BluetoothService
308  };
309 
316  void HCI_Command(uint8_t* data, uint16_t nbytes);
318  void hci_reset();
320  void hci_read_bdaddr();
327  void hci_set_local_name(const char* name);
329  void hci_write_scan_enable();
331  void hci_write_scan_disable();
333  void hci_remote_name();
335  void hci_accept_connection();
340  void hci_disconnect(uint16_t handle);
357  void hci_inquiry();
359  void hci_inquiry_cancel();
361  void hci_connect();
366  void hci_connect(uint8_t *bdaddr);
380  void L2CAP_Command(uint16_t handle, uint8_t* data, uint8_t nbytes, uint8_t channelLow = 0x01, uint8_t channelHigh = 0x00);
388  void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t* scid, uint16_t psm);
397  void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid, uint8_t result);
404  void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t* dcid);
411  void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t* scid);
419  void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid);
427  void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid);
434  void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh);
445 
447  const char* btdName;
449  const char* btdPin;
450 
452  uint8_t my_bdaddr[6];
454  uint16_t hci_handle;
456  uint8_t disc_bdaddr[6];
458  char remote_name[30];
464  uint8_t hci_version;
465 
468  pairWithWii = true;
469  hci_state = HCI_CHECK_DEVICE_SERVICE;
470  };
472  bool connectToWii;
481 
483  void pairWithHID() {
484  waitingForConnection = false;
485  pairWithHIDDevice = true;
486  hci_state = HCI_CHECK_DEVICE_SERVICE;
487  };
489  bool connectToHIDDevice;
494 
499  uint8_t readPollInterval() {
500  return pollInterval;
501  };
502 
503 protected:
505  USB *pUsb;
507  uint8_t bAddress;
510 
512  uint8_t bConfNum;
514  uint8_t bNumEP;
516  uint32_t qNextPollTime;
517 
519  static const uint8_t BTD_CONTROL_PIPE;
521  static const uint8_t BTD_EVENT_PIPE;
523  static const uint8_t BTD_DATAIN_PIPE;
525  static const uint8_t BTD_DATAOUT_PIPE;
526 
532 
533 private:
534  void Initialize(); // Set all variables, endpoint structs etc. to default values
536 
537  uint16_t PID, VID; // PID and VID of device connected
538 
539  uint8_t pollInterval;
540  bool bPollEnable;
541 
542  bool pairWiiUsingSync; // True if pairing was done using the Wii SYNC button.
543  bool checkRemoteName; // Used to check remote device's name before connecting.
544  bool incomingPS4; // True if a PS4 controller is connecting
545  uint8_t classOfDevice[3]; // Class of device of last device
546 
547  /* Variables used by high level HCI task */
548  uint8_t hci_state; // Current state of Bluetooth HCI connection
549  uint16_t hci_counter; // Counter used for Bluetooth HCI reset loops
550  uint16_t hci_num_reset_loops; // This value indicate how many times it should read before trying to reset
551  uint16_t hci_event_flag; // HCI flags of received Bluetooth events
552  uint8_t inquiry_counter;
553 
554  uint8_t hcibuf[BULK_MAXPKTSIZE]; // General purpose buffer for HCI data
555  uint8_t l2capinbuf[BULK_MAXPKTSIZE]; // General purpose buffer for L2CAP in data
556  uint8_t l2capoutbuf[14]; // General purpose buffer for L2CAP out data
557 
558  /* State machines */
559  void HCI_event_task(); // Poll the HCI event pipe
560  void HCI_task(); // HCI state machine
561  void ACL_event_task(); // ACL input pipe
562 
563  /* Used to set the Bluetooth Address internally to the PS3 Controllers */
564  void setBdaddr(uint8_t* BDADDR);
565  void setMoveBdaddr(uint8_t* BDADDR);
566 };
567 
570 public:
572  if(pBtd)
573  pBtd->registerBluetoothService(this); // Register it as a Bluetooth service
574  };
579  virtual void ACLData(uint8_t* ACLData) = 0;
581  virtual void Run() = 0;
583  virtual void Reset() = 0;
585  virtual void disconnect() = 0;
586 
591  void attachOnInit(void (*funcOnInit)(void)) {
592  pFuncOnInit = funcOnInit; // TODO: This really belong in a class of it's own as it is repeated several times
593  };
594 
595 protected:
601  virtual void onInit() = 0;
602 
604  bool checkHciHandle(uint8_t *buf, uint16_t handle) {
605  return (buf[0] == (handle & 0xFF)) && (buf[1] == ((handle >> 8) | 0x20));
606  }
607 
609  void (*pFuncOnInit)(void);
610 
613 
615  uint16_t hci_handle;
616 
619 
621  uint8_t identifier;
622 };
623 
624 #endif
static const uint8_t BTD_DATAOUT_PIPE
Definition: BTD.h:525
bool incomingWii
Definition: BTD.h:474
void hci_connect()
Definition: BTD.cpp:1071
uint8_t bNumEP
Definition: BTD.h:514
const char * btdName
Definition: BTD.h:447
void hci_reset()
Definition: BTD.cpp:953
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
Definition: BTD.cpp:1260
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
Definition: BTD.cpp:1247
bool sdpConnectionClaimed
Definition: BTD.h:442
Definition: BTD.h:201
int8_t registerBluetoothService(BluetoothService *pService)
Definition: BTD.h:300
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1313
bool rfcommConnectionClaimed
Definition: BTD.h:444
uint8_t hci_version
Definition: BTD.h:464
bool waitingForConnection
Definition: BTD.h:438
void hci_inquiry()
Definition: BTD.cpp:1049
static const uint8_t BTD_EVENT_PIPE
Definition: BTD.h:521
#define PS3MOVE_PID
Definition: BTD.h:28
bool pairWithWii
Definition: BTD.h:476
uint8_t identifier
Definition: BTD.h:621
void hci_write_scan_disable()
Definition: BTD.cpp:975
#define BELKIN_F8T065BF_PID
Definition: BTD.h:34
void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
Definition: BTD.cpp:327
virtual bool VIDPIDOK(uint16_t vid, uint16_t pid)
Definition: BTD.h:269
virtual uint8_t GetAddress()
Definition: BTD.h:241
#define BTD_NUM_SERVICES
Definition: BTD.h:191
const char * btdPin
Definition: BTD.h:449
bool motionPlusInside
Definition: BTD.h:478
void hci_remote_name()
Definition: BTD.cpp:1018
#define BELKIN_F8T065BF_VID
Definition: BTD.h:33
#define PS3_VID
Definition: BTD.h:25
BTD(USB *p)
Definition: BTD.cpp:27
char remote_name[30]
Definition: BTD.h:458
uint8_t readPollInterval()
Definition: BTD.h:499
virtual void Reset()=0
static const uint8_t BTD_DATAIN_PIPE
Definition: BTD.h:523
void hci_set_local_name(const char *name)
Definition: BTD.cpp:1037
void hci_write_scan_enable()
Definition: BTD.cpp:962
uint8_t Release()
Definition: BTD.cpp:376
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1326
#define USB_CLASS_WIRELESS_CTRL
Definition: UsbCore.h:82
bool connectToHIDDevice
Definition: BTD.h:487
uint8_t bAddress
Definition: BTD.h:507
bool incomingHIDDevice
Definition: BTD.h:491
bool pairWithHIDDevice
Definition: BTD.h:493
uint32_t qNextPollTime
Definition: BTD.h:516
void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR *ep_ptr)
Definition: BTD.cpp:357
#define IOGEAR_GBU521_PID
Definition: BTD.h:32
bool connectToWii
Definition: BTD.h:470
uint8_t ConfigureDevice(uint8_t parent, uint8_t port, bool lowspeed)
Definition: BTD.cpp:48
virtual void disconnect()=0
bool wiiUProController
Definition: BTD.h:480
uint16_t hci_handle
Definition: BTD.h:454
uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
Definition: BTD.cpp:134
Definition: address.h:39
void pairWithHID()
Definition: BTD.h:483
void hci_disconnect(uint16_t handle)
Definition: BTD.cpp:1171
void hci_read_bdaddr()
Definition: BTD.cpp:984
void hci_inquiry_cancel()
Definition: BTD.cpp:1063
virtual void Run()=0
uint8_t my_bdaddr[6]
Definition: BTD.h:452
void(* pFuncOnInit)(void)
Definition: BTD.h:609
void attachOnInit(void(*funcOnInit)(void))
Definition: BTD.h:591
uint8_t Poll()
Definition: BTD.cpp:382
static const uint8_t BTD_CONTROL_PIPE
Definition: BTD.h:519
BTD * pBtd
Definition: BTD.h:612
#define BULK_MAXPKTSIZE
Definition: BTD.h:37
void disconnect()
Definition: BTD.cpp:394
uint8_t disc_bdaddr[6]
Definition: BTD.h:456
bool l2capConnectionClaimed
Definition: BTD.h:440
EpInfo epInfo[BTD_MAX_ENDPOINTS]
Definition: BTD.h:509
#define IOGEAR_GBU521_VID
Definition: BTD.h:31
#define PS3_PID
Definition: BTD.h:26
#define BTD_MAX_ENDPOINTS
Definition: BTD.h:190
#define PS3NAVIGATION_PID
Definition: BTD.h:27
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
Definition: BTD.cpp:1339
BluetoothService(BTD *p)
Definition: BTD.h:571
void hci_write_class_of_device()
Definition: BTD.cpp:1183
uint16_t hci_handle
Definition: BTD.h:615
void hci_pin_code_negative_request_reply()
Definition: BTD.cpp:1133
virtual void ACLData(uint8_t *ACLData)=0
virtual bool DEVCLASSOK(uint8_t klass)
Definition: BTD.h:258
uint32_t l2cap_event_flag
Definition: BTD.h:618
#define HCI_CHECK_DEVICE_SERVICE
Definition: BTD.h:49
Definition: UsbCore.h:208
uint8_t bConfNum
Definition: BTD.h:512
void hci_link_key_request_negative_reply()
Definition: BTD.cpp:1147
void pairWithWiimote()
Definition: BTD.h:467
virtual bool isReady()
Definition: BTD.h:249
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
Definition: BTD.cpp:1219
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
Definition: BTD.cpp:1294
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
Definition: BTD.cpp:1277
void hci_pin_code_request_reply()
Definition: BTD.cpp:1097
USB * pUsb
Definition: BTD.h:501
void hci_authentication_request()
Definition: BTD.cpp:1161
void hci_read_local_version_information()
Definition: BTD.cpp:993
void hci_accept_connection()
Definition: BTD.cpp:1002
bool checkHciHandle(uint8_t *buf, uint16_t handle)
Definition: BTD.h:604
virtual void onInit()=0
void HCI_Command(uint8_t *data, uint16_t nbytes)
Definition: BTD.cpp:948