From 2b2d492fed4c148534caea46effed45116067df9 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Sun, 19 Jan 2014 17:17:06 +0100 Subject: [PATCH] Updated documentation --- _b_t_d_8cpp_source.html | 1125 ++++++++--------- _b_t_d_8h.html | 10 +- _b_t_d_8h__dep__incl.map | 13 +- _b_t_d_8h__dep__incl.md5 | 2 +- _b_t_d_8h__dep__incl.png | Bin 20831 -> 17818 bytes _b_t_d_8h_source.html | 80 +- _b_t_h_i_d_8cpp_source.html | 336 ++--- _b_t_h_i_d_8h.html | 2 +- _b_t_h_i_d_8h__dep__incl.map | 1 - _b_t_h_i_d_8h__dep__incl.md5 | 2 +- _b_t_h_i_d_8h__dep__incl.png | Bin 7864 -> 5494 bytes _b_t_h_i_d_8h_source.html | 154 +-- _p_s3_b_t_8cpp_source.html | 144 +-- _p_s3_b_t_8h_source.html | 16 +- _p_s3_enums_8h.html | 124 +- _p_s3_enums_8h__dep__incl.map | 6 +- _p_s3_enums_8h__dep__incl.md5 | 2 +- _p_s3_enums_8h__dep__incl.png | Bin 13985 -> 10962 bytes _p_s3_enums_8h_source.html | 302 ++--- _p_s3_u_s_b_8cpp_source.html | 64 +- _p_s3_u_s_b_8h_source.html | 14 +- _p_s4_b_t_8h.html | 71 +- _p_s4_b_t_8h__incl.map | 14 +- _p_s4_b_t_8h__incl.md5 | 2 +- _p_s4_b_t_8h__incl.png | Bin 22977 -> 28543 bytes _p_s4_b_t_8h_source.html | 206 +-- _p_s4_parser_8cpp.html | 110 ++ _p_s4_parser_8cpp__incl.map | 5 + _p_s4_parser_8cpp__incl.md5 | 1 + _p_s4_parser_8cpp__incl.png | Bin 0 -> 9486 bytes _p_s4_parser_8cpp_source.html | 246 ++++ _p_s4_parser_8h.html | 236 ++++ _p_s4_parser_8h__dep__incl.map | 5 + _p_s4_parser_8h__dep__incl.md5 | 1 + _p_s4_parser_8h__dep__incl.png | Bin 0 -> 8574 bytes _p_s4_parser_8h__incl.map | 4 + _p_s4_parser_8h__incl.md5 | 1 + _p_s4_parser_8h__incl.png | Bin 0 -> 6560 bytes _p_s4_parser_8h_source.html | 387 ++++++ _p_s4_u_s_b_8h.html | 156 +++ _p_s4_u_s_b_8h__incl.map | 8 + _p_s4_u_s_b_8h__incl.md5 | 1 + _p_s4_u_s_b_8h__incl.png | Bin 0 -> 21065 bytes _p_s4_u_s_b_8h_source.html | 176 +++ _r_e_a_d_m_e_8md_source.html | 219 ++-- _s_p_p_8cpp_source.html | 16 +- _usb_8cpp_source.html | 10 +- _usb_8h.html | 2 +- _usb_8h__dep__incl.map | 88 +- _usb_8h__dep__incl.md5 | 2 +- _usb_8h__dep__incl.png | Bin 137217 -> 152730 bytes _wii_8cpp_source.html | 16 +- _wii_camera_readme_8md_source.html | 2 +- annotated.html | 57 +- class_b_t_d-members.html | 2 +- class_b_t_d.html | 74 +- class_b_t_h_i_d-members.html | 13 +- class_b_t_h_i_d.html | 139 +- class_b_t_h_i_d__inherit__graph.map | 1 + class_b_t_h_i_d__inherit__graph.md5 | 2 +- class_b_t_h_i_d__inherit__graph.png | Bin 3640 -> 5405 bytes class_bluetooth_service.html | 2 +- class_bluetooth_service__inherit__graph.map | 7 +- class_bluetooth_service__inherit__graph.md5 | 2 +- class_bluetooth_service__inherit__graph.png | Bin 9603 -> 11648 bytes class_h_i_d.html | 2 +- class_h_i_d__inherit__graph.map | 1 + class_h_i_d__inherit__graph.md5 | 2 +- class_h_i_d__inherit__graph.png | Bin 14085 -> 16538 bytes class_h_i_d_report_parser.html | 4 +- class_h_i_d_report_parser__inherit__graph.map | 3 +- class_h_i_d_report_parser__inherit__graph.md5 | 2 +- class_h_i_d_report_parser__inherit__graph.png | Bin 14484 -> 12125 bytes class_h_i_d_universal-members.html | 32 +- class_h_i_d_universal.html | 149 ++- class_h_i_d_universal__inherit__graph.map | 1 + class_h_i_d_universal__inherit__graph.md5 | 2 +- class_h_i_d_universal__inherit__graph.png | Bin 10262 -> 12541 bytes class_p_s3_b_t.html | 18 +- class_p_s3_u_s_b.html | 12 +- class_p_s4_b_t-members.html | 39 +- class_p_s4_b_t.html | 478 +++---- class_p_s4_b_t__coll__graph.map | 4 +- class_p_s4_b_t__coll__graph.md5 | 2 +- class_p_s4_b_t__coll__graph.png | Bin 3855 -> 8531 bytes class_p_s4_b_t__inherit__graph.map | 4 +- class_p_s4_b_t__inherit__graph.md5 | 2 +- class_p_s4_b_t__inherit__graph.png | Bin 3855 -> 8531 bytes class_p_s4_parser-members.html | 114 ++ class_p_s4_parser.html | 608 +++++++++ class_p_s4_parser__inherit__graph.map | 4 + class_p_s4_parser__inherit__graph.md5 | 1 + class_p_s4_parser__inherit__graph.png | Bin 0 -> 5068 bytes class_p_s4_u_s_b-members.html | 154 +++ class_p_s4_u_s_b.html | 434 +++++++ class_p_s4_u_s_b__coll__graph.map | 9 + class_p_s4_u_s_b__coll__graph.md5 | 1 + class_p_s4_u_s_b__coll__graph.png | Bin 0 -> 21297 bytes class_p_s4_u_s_b__inherit__graph.map | 7 + class_p_s4_u_s_b__inherit__graph.md5 | 1 + class_p_s4_u_s_b__inherit__graph.png | Bin 0 -> 14567 bytes class_u_s_b_device_config.html | 6 +- class_u_s_b_device_config__inherit__graph.map | 11 +- class_u_s_b_device_config__inherit__graph.md5 | 2 +- class_u_s_b_device_config__inherit__graph.png | Bin 37782 -> 41313 bytes class_usb_config_xtracter.html | 2 +- class_usb_config_xtracter__inherit__graph.map | 1 + class_usb_config_xtracter__inherit__graph.md5 | 2 +- class_usb_config_xtracter__inherit__graph.png | Bin 22119 -> 25046 bytes class_w_i_i.html | 2 +- classes.html | 47 +- controller_enums_8h.html | 117 +- controller_enums_8h__dep__incl.map | 30 +- controller_enums_8h__dep__incl.md5 | 2 +- controller_enums_8h__dep__incl.png | Bin 38596 -> 44830 bytes controller_enums_8h_source.html | 56 +- dir_397a095372f04465e811d0ee219bbf8f.html | 8 +- files.html | 46 +- functions.html | 10 + functions_c.html | 4 + functions_d.html | 7 +- functions_f.html | 3 + functions_func.html | 1 + functions_func_c.html | 1 + functions_func_d.html | 1 - functions_func_g.html | 19 +- functions_func_i.html | 4 + functions_func_o.html | 5 + functions_func_p.html | 19 +- functions_func_r.html | 6 +- functions_g.html | 28 +- functions_i.html | 4 + functions_k.html | 3 - functions_o.html | 5 + functions_p.html | 22 +- functions_r.html | 13 +- functions_t.html | 9 + functions_v.html | 3 + functions_vars.html | 10 + functions_vars_b.html | 1 + functions_vars_c.html | 4 + functions_vars_d.html | 7 +- functions_vars_e.html | 1 + functions_vars_f.html | 139 ++ functions_vars_g.html | 10 + functions_vars_h.html | 1 + functions_vars_i.html | 1 + functions_vars_k.html | 4 +- functions_vars_l.html | 1 + functions_vars_m.html | 1 + functions_vars_n.html | 1 + functions_vars_o.html | 1 + functions_vars_p.html | 4 + functions_vars_q.html | 1 + functions_vars_r.html | 8 +- functions_vars_s.html | 1 + functions_vars_t.html | 10 + functions_vars_u.html | 1 + functions_vars_v.html | 4 + functions_vars_w.html | 3 +- functions_vars_x.html | 7 + functions_vars_y.html | 4 + functions_w.html | 2 +- functions_x.html | 6 + functions_y.html | 3 + globals_a.html | 14 +- globals_b.html | 4 +- globals_d.html | 20 +- globals_defs_b.html | 4 +- globals_defs_p.html | 10 +- globals_enum.html | 6 +- globals_eval.html | 68 +- globals_g.html | 14 +- globals_k.html | 3 - globals_m.html | 6 +- globals_p.html | 13 +- globals_r.html | 2 +- globals_s.html | 2 +- globals_t.html | 5 +- globals_vars.html | 5 +- globals_w.html | 6 +- hid_8h.html | 2 +- hid_8h__dep__incl.map | 16 +- hid_8h__dep__incl.md5 | 2 +- hid_8h__dep__incl.png | Bin 28699 -> 28170 bytes hidboot_8h.html | 2 +- hidboot_8h__dep__incl.map | 3 +- hidboot_8h__dep__incl.md5 | 2 +- hidboot_8h__dep__incl.png | Bin 13022 -> 10476 bytes hiduniversal_8cpp_source.html | 750 +++++------ hiduniversal_8h.html | 2 +- hiduniversal_8h__dep__incl.map | 1 + hiduniversal_8h__dep__incl.md5 | 2 +- hiduniversal_8h__dep__incl.png | Bin 4160 -> 7347 bytes hiduniversal_8h_source.html | 113 +- hidusagestr_8h.html | 2 +- hidusagestr_8h__dep__incl.map | 20 +- hidusagestr_8h__dep__incl.md5 | 2 +- hidusagestr_8h__dep__incl.png | Bin 35874 -> 35419 bytes hierarchy.html | 141 ++- index.html | 18 +- inherit_graph_20.map | 5 +- inherit_graph_20.md5 | 2 +- inherit_graph_20.png | Bin 16578 -> 12068 bytes inherit_graph_40.map | 6 +- inherit_graph_40.md5 | 2 +- inherit_graph_40.png | Bin 11705 -> 2818 bytes inherit_graph_41.map | 2 +- inherit_graph_41.md5 | 2 +- inherit_graph_41.png | Bin 2818 -> 1827 bytes inherit_graph_49.map | 40 +- inherit_graph_49.md5 | 2 +- inherit_graph_49.png | Bin 60732 -> 89566 bytes inherits.html | 14 +- search/all_1.js | 19 +- search/all_10.js | 22 +- search/all_12.js | 14 +- search/all_13.js | 2 +- search/all_14.js | 6 +- search/all_16.js | 1 + search/all_17.js | 4 +- search/all_18.js | 5 +- search/all_19.js | 2 +- search/all_2.js | 2 +- search/all_3.js | 3 +- search/all_4.js | 25 +- search/all_6.js | 1 + search/all_7.js | 28 +- search/all_9.js | 3 +- search/all_b.js | 1 - search/all_d.js | 6 +- search/all_f.js | 3 +- search/classes_a.js | 2 + search/classes_d.js | 3 +- search/defines_10.js | 4 +- search/defines_2.js | 2 +- search/enums_0.js | 2 +- search/enums_3.js | 2 +- search/enums_8.js | 2 +- search/enumvalues_0.js | 12 +- search/enumvalues_10.js | 3 +- search/enumvalues_13.js | 2 +- search/enumvalues_3.js | 18 +- search/enumvalues_6.js | 10 +- search/enumvalues_8.js | 1 - search/enumvalues_a.js | 6 +- search/enumvalues_d.js | 2 +- search/enumvalues_e.js | 2 +- search/files_5.js | 6 +- search/functions_0.js | 2 +- search/functions_2.js | 2 +- search/functions_3.js | 2 +- search/functions_6.js | 15 +- search/functions_8.js | 3 +- search/functions_d.js | 3 +- search/functions_e.js | 10 +- search/functions_f.js | 5 +- search/search.js | 2 +- search/variables_0.js | 3 + search/variables_10.js | 35 +- search/variables_11.js | 31 +- search/variables_12.js | 25 +- search/variables_13.js | 14 +- search/variables_14.js | 29 +- search/variables_15.js | 25 +- search/variables_16.js | 10 +- search/variables_17.html | 26 + search/variables_17.js | 6 + search/variables_2.js | 1 + search/variables_3.js | 3 +- search/variables_5.js | 18 +- search/variables_6.js | 24 +- search/variables_7.js | 18 +- search/variables_8.js | 19 +- search/variables_9.js | 25 +- search/variables_a.js | 37 +- search/variables_b.js | 18 +- search/variables_c.js | 5 +- search/variables_d.js | 884 +------------ search/variables_e.js | 882 ++++++++++++- search/variables_f.js | 21 +- struct_hub_descriptor.html | 32 +- struct_hub_event.html | 30 +- struct_p_s4_data-members.html | 14 +- struct_p_s4_data.html | 174 ++- struct_p_s4_data__coll__graph.map | 3 +- struct_p_s4_data__coll__graph.md5 | 2 +- struct_p_s4_data__coll__graph.png | Bin 3977 -> 7524 bytes struct_s_e_t_u_p___p_k_t-members.html | 4 +- struct_s_e_t_u_p___p_k_t.html | 56 +- structtouchpad_x_y-members.html | 107 ++ structtouchpad_x_y.html | 215 ++++ union_p_s4_buttons-members.html | 4 +- union_p_s4_buttons.html | 56 +- 294 files changed, 7861 insertions(+), 4106 deletions(-) create mode 100644 _p_s4_parser_8cpp.html create mode 100644 _p_s4_parser_8cpp__incl.map create mode 100644 _p_s4_parser_8cpp__incl.md5 create mode 100644 _p_s4_parser_8cpp__incl.png create mode 100644 _p_s4_parser_8cpp_source.html create mode 100644 _p_s4_parser_8h.html create mode 100644 _p_s4_parser_8h__dep__incl.map create mode 100644 _p_s4_parser_8h__dep__incl.md5 create mode 100644 _p_s4_parser_8h__dep__incl.png create mode 100644 _p_s4_parser_8h__incl.map create mode 100644 _p_s4_parser_8h__incl.md5 create mode 100644 _p_s4_parser_8h__incl.png create mode 100644 _p_s4_parser_8h_source.html create mode 100644 _p_s4_u_s_b_8h.html create mode 100644 _p_s4_u_s_b_8h__incl.map create mode 100644 _p_s4_u_s_b_8h__incl.md5 create mode 100644 _p_s4_u_s_b_8h__incl.png create mode 100644 _p_s4_u_s_b_8h_source.html create mode 100644 class_p_s4_parser-members.html create mode 100644 class_p_s4_parser.html create mode 100644 class_p_s4_parser__inherit__graph.map create mode 100644 class_p_s4_parser__inherit__graph.md5 create mode 100644 class_p_s4_parser__inherit__graph.png create mode 100644 class_p_s4_u_s_b-members.html create mode 100644 class_p_s4_u_s_b.html create mode 100644 class_p_s4_u_s_b__coll__graph.map create mode 100644 class_p_s4_u_s_b__coll__graph.md5 create mode 100644 class_p_s4_u_s_b__coll__graph.png create mode 100644 class_p_s4_u_s_b__inherit__graph.map create mode 100644 class_p_s4_u_s_b__inherit__graph.md5 create mode 100644 class_p_s4_u_s_b__inherit__graph.png create mode 100644 functions_vars_f.html create mode 100644 search/variables_17.html create mode 100644 search/variables_17.js create mode 100644 structtouchpad_x_y-members.html create mode 100644 structtouchpad_x_y.html diff --git a/_b_t_d_8cpp_source.html b/_b_t_d_8cpp_source.html index 85833835..ae878380 100644 --- a/_b_t_d_8cpp_source.html +++ b/_b_t_d_8cpp_source.html @@ -127,7 +127,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
36 pollInterval(0),
37 bPollEnable(false) // Don't start polling before dongle is connected
38 {
-
39  for(uint8_t i = 0; i < BTD_NUMSERVICES; i++)
+
39  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++)
40  btService[i] = NULL;
41 
42  Initialize(); // Set all variables, endpoint structs etc. to default values
@@ -384,7 +384,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
293  epInfo[i].epAttribs = 0;
294  epInfo[i].bmNakPower = (i) ? USB_NAK_NOWAIT : USB_NAK_MAX_POWER;
295  }
-
296  for(i = 0; i < BTD_NUMSERVICES; i++) {
+
296  for(i = 0; i < BTD_NUM_SERVICES; i++) {
297  if(btService[i])
298  btService[i]->Reset(); // Reset all Bluetooth services
299  }
@@ -596,9 +596,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
505 
506  case EV_REMOTE_NAME_COMPLETE:
507  if(!hcibuf[2]) { // Check if reading is OK
-
508  for(uint8_t i = 0; i < min(sizeof (remote_name), sizeof (hcibuf) - 9); i++) {
-
509  remote_name[i] = hcibuf[9 + i];
-
510  if(remote_name[i] == '\0') // End of string
+
508  for(uint8_t i = 0; i < min(sizeof (remote_name), sizeof (hcibuf) - 9); i++) {
+
509  remote_name[i] = hcibuf[9 + i];
+
510  if(remote_name[i] == '\0') // End of string
511  break;
512  }
513  hci_set_flag(HCI_FLAG_REMOTE_NAME_COMPLETE);
@@ -887,592 +887,589 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
796  if(hci_check_flag(HCI_FLAG_REMOTE_NAME_COMPLETE)) {
797 #ifdef DEBUG_USB_HOST
798  Notify(PSTR("\r\nRemote Name: "), 0x80);
-
799  for(uint8_t i = 0; i < 30; i++) {
-
800  if(remote_name[i] == '\0') // End of string
-
801  break;
-
802  Notifyc(remote_name[i], 0x80);
-
803  }
-
804 #endif
-
805  if(strncmp((const char*)remote_name, "Nintendo", 8) == 0) {
-
806  incomingWii = true;
-
807 #ifdef DEBUG_USB_HOST
-
808  Notify(PSTR("\r\nWiimote is connecting"), 0x80);
-
809 #endif
-
810  if(strncmp((const char*)remote_name, "Nintendo RVL-CNT-01-TR", 22) == 0) {
-
811 #ifdef DEBUG_USB_HOST
-
812  Notify(PSTR(" with Motion Plus Inside"), 0x80);
-
813 #endif
-
814  motionPlusInside = true;
-
815  } else if(strncmp((const char*)remote_name, "Nintendo RVL-CNT-01-UC", 22) == 0) {
-
816 #ifdef DEBUG_USB_HOST
-
817  Notify(PSTR(" - Wii U Pro Controller"), 0x80);
-
818 #endif
-
819  motionPlusInside = true;
-
820  wiiUProController = true;
-
821  } else {
-
822  motionPlusInside = false;
-
823  wiiUProController = false;
-
824  }
-
825  }
-
826  if(classOfDevice[2] == 0 && classOfDevice[1] == 0x25 && classOfDevice[0] == 0x08 && strncmp((const char*)remote_name, "Wireless Controller", 19) == 0) {
-
827 #ifdef DEBUG_USB_HOST
-
828  Notify(PSTR("\r\nPS4 controller is connecting"), 0x80);
-
829 #endif
-
830  incomingPS4 = true;
-
831  }
-
832  if(pairWithWii && motionPlusInside)
-
833  hci_state = HCI_CONNECT_DEVICE_STATE;
-
834  else {
-
835  hci_accept_connection();
-
836  hci_state = HCI_CONNECTED_STATE;
-
837  }
-
838  }
-
839  break;
-
840 
-
841  case HCI_CONNECTED_STATE:
-
842  if(hci_check_flag(HCI_FLAG_CONNECT_COMPLETE)) {
-
843 #ifdef DEBUG_USB_HOST
-
844  Notify(PSTR("\r\nConnected to Device: "), 0x80);
-
845  for(int8_t i = 5; i > 0; i--) {
-
846  D_PrintHex<uint8_t > (disc_bdaddr[i], 0x80);
-
847  Notify(PSTR(":"), 0x80);
-
848  }
-
849  D_PrintHex<uint8_t > (disc_bdaddr[0], 0x80);
-
850 #endif
-
851  if(incomingPS4)
-
852  connectToHIDDevice = true; // We should always connect to the PS4 controller
-
853 
-
854  // Clear these flags for a new connection
-
855  l2capConnectionClaimed = false;
-
856  sdpConnectionClaimed = false;
-
857  rfcommConnectionClaimed = false;
-
858 
-
859  hci_event_flag = 0;
-
860  hci_state = HCI_DONE_STATE;
-
861  }
-
862  break;
-
863 
-
864  case HCI_DONE_STATE:
-
865  hci_counter++;
-
866  if(hci_counter > 1000) { // Wait until we have looped 1000 times to make sure that the L2CAP connection has been started
-
867  hci_counter = 0;
-
868  hci_state = HCI_SCANNING_STATE;
-
869  }
-
870  break;
-
871 
-
872  case HCI_DISCONNECT_STATE:
-
873  if(hci_check_flag(HCI_FLAG_DISCONNECT_COMPLETE)) {
-
874 #ifdef DEBUG_USB_HOST
-
875  Notify(PSTR("\r\nHCI Disconnected from Device"), 0x80);
-
876 #endif
-
877  hci_event_flag = 0; // Clear all flags
-
878 
-
879  // Reset all buffers
-
880  memset(hcibuf, 0, BULK_MAXPKTSIZE);
-
881  memset(l2capinbuf, 0, BULK_MAXPKTSIZE);
-
882 
-
883  connectToWii = incomingWii = pairWithWii = false;
-
884  connectToHIDDevice = incomingHIDDevice = pairWithHIDDevice = false;
-
885  incomingPS4 = false;
-
886 
-
887  hci_state = HCI_SCANNING_STATE;
-
888  }
-
889  break;
-
890  default:
-
891  break;
-
892  }
-
893 }
-
894 
-
895 void BTD::ACL_event_task() {
-
896  uint16_t length = BULK_MAXPKTSIZE;
-
897  uint8_t rcode = pUsb->inTransfer(bAddress, epInfo[ BTD_DATAIN_PIPE ].epAddr, &length, l2capinbuf); // Input on endpoint 2
-
898 
-
899  if(!rcode) { // Check for errors
-
900  if(length > 0) { // Check if any data was read
-
901  for(uint8_t i = 0; i < BTD_NUMSERVICES; i++) {
-
902  if(btService[i])
-
903  btService[i]->ACLData(l2capinbuf);
-
904  }
-
905  }
-
906  }
-
907 #ifdef EXTRADEBUG
-
908  else if(rcode != hrNAK) {
-
909  Notify(PSTR("\r\nACL data in error: "), 0x80);
-
910  D_PrintHex<uint8_t > (rcode, 0x80);
-
911  }
-
912 #endif
-
913  for(uint8_t i = 0; i < BTD_NUMSERVICES; i++)
-
914  if(btService[i])
-
915  btService[i]->Run();
-
916 }
+
799  for(uint8_t i = 0; i < strlen(remote_name); i++)
+
800  Notifyc(remote_name[i], 0x80);
+
801 #endif
+
802  if(strncmp((const char*)remote_name, "Nintendo", 8) == 0) {
+
803  incomingWii = true;
+
804 #ifdef DEBUG_USB_HOST
+
805  Notify(PSTR("\r\nWiimote is connecting"), 0x80);
+
806 #endif
+
807  if(strncmp((const char*)remote_name, "Nintendo RVL-CNT-01-TR", 22) == 0) {
+
808 #ifdef DEBUG_USB_HOST
+
809  Notify(PSTR(" with Motion Plus Inside"), 0x80);
+
810 #endif
+
811  motionPlusInside = true;
+
812  } else if(strncmp((const char*)remote_name, "Nintendo RVL-CNT-01-UC", 22) == 0) {
+
813 #ifdef DEBUG_USB_HOST
+
814  Notify(PSTR(" - Wii U Pro Controller"), 0x80);
+
815 #endif
+
816  motionPlusInside = true;
+
817  wiiUProController = true;
+
818  } else {
+
819  motionPlusInside = false;
+
820  wiiUProController = false;
+
821  }
+
822  }
+
823  if(classOfDevice[2] == 0 && classOfDevice[1] == 0x25 && classOfDevice[0] == 0x08 && strncmp((const char*)remote_name, "Wireless Controller", 19) == 0) {
+
824 #ifdef DEBUG_USB_HOST
+
825  Notify(PSTR("\r\nPS4 controller is connecting"), 0x80);
+
826 #endif
+
827  incomingPS4 = true;
+
828  }
+
829  if(pairWithWii && motionPlusInside)
+
830  hci_state = HCI_CONNECT_DEVICE_STATE;
+
831  else {
+
832  hci_accept_connection();
+
833  hci_state = HCI_CONNECTED_STATE;
+
834  }
+
835  }
+
836  break;
+
837 
+
838  case HCI_CONNECTED_STATE:
+
839  if(hci_check_flag(HCI_FLAG_CONNECT_COMPLETE)) {
+
840 #ifdef DEBUG_USB_HOST
+
841  Notify(PSTR("\r\nConnected to Device: "), 0x80);
+
842  for(int8_t i = 5; i > 0; i--) {
+
843  D_PrintHex<uint8_t > (disc_bdaddr[i], 0x80);
+
844  Notify(PSTR(":"), 0x80);
+
845  }
+
846  D_PrintHex<uint8_t > (disc_bdaddr[0], 0x80);
+
847 #endif
+
848  if(incomingPS4)
+
849  connectToHIDDevice = true; // We should always connect to the PS4 controller
+
850 
+
851  // Clear these flags for a new connection
+
852  l2capConnectionClaimed = false;
+
853  sdpConnectionClaimed = false;
+
854  rfcommConnectionClaimed = false;
+
855 
+
856  hci_event_flag = 0;
+
857  hci_state = HCI_DONE_STATE;
+
858  }
+
859  break;
+
860 
+
861  case HCI_DONE_STATE:
+
862  hci_counter++;
+
863  if(hci_counter > 1000) { // Wait until we have looped 1000 times to make sure that the L2CAP connection has been started
+
864  hci_counter = 0;
+
865  hci_state = HCI_SCANNING_STATE;
+
866  }
+
867  break;
+
868 
+
869  case HCI_DISCONNECT_STATE:
+
870  if(hci_check_flag(HCI_FLAG_DISCONNECT_COMPLETE)) {
+
871 #ifdef DEBUG_USB_HOST
+
872  Notify(PSTR("\r\nHCI Disconnected from Device"), 0x80);
+
873 #endif
+
874  hci_event_flag = 0; // Clear all flags
+
875 
+
876  // Reset all buffers
+
877  memset(hcibuf, 0, BULK_MAXPKTSIZE);
+
878  memset(l2capinbuf, 0, BULK_MAXPKTSIZE);
+
879 
+
880  connectToWii = incomingWii = pairWithWii = false;
+
881  connectToHIDDevice = incomingHIDDevice = pairWithHIDDevice = false;
+
882  incomingPS4 = false;
+
883 
+
884  hci_state = HCI_SCANNING_STATE;
+
885  }
+
886  break;
+
887  default:
+
888  break;
+
889  }
+
890 }
+
891 
+
892 void BTD::ACL_event_task() {
+
893  uint16_t length = BULK_MAXPKTSIZE;
+
894  uint8_t rcode = pUsb->inTransfer(bAddress, epInfo[ BTD_DATAIN_PIPE ].epAddr, &length, l2capinbuf); // Input on endpoint 2
+
895 
+
896  if(!rcode) { // Check for errors
+
897  if(length > 0) { // Check if any data was read
+
898  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++) {
+
899  if(btService[i])
+
900  btService[i]->ACLData(l2capinbuf);
+
901  }
+
902  }
+
903  }
+
904 #ifdef EXTRADEBUG
+
905  else if(rcode != hrNAK) {
+
906  Notify(PSTR("\r\nACL data in error: "), 0x80);
+
907  D_PrintHex<uint8_t > (rcode, 0x80);
+
908  }
+
909 #endif
+
910  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++)
+
911  if(btService[i])
+
912  btService[i]->Run();
+
913 }
+
914 
+
915 /************************************************************/
+
916 /* HCI Commands */
917 
918 /************************************************************/
-
919 /* HCI Commands */
-
920 
-
921 /************************************************************/
-
922 void BTD::HCI_Command(uint8_t* data, uint16_t nbytes) {
-
923  hci_clear_flag(HCI_FLAG_CMD_COMPLETE);
-
924  pUsb->ctrlReq(bAddress, epInfo[ BTD_CONTROL_PIPE ].epAddr, bmREQ_HCI_OUT, 0x00, 0x00, 0x00, 0x00, nbytes, nbytes, data, NULL);
-
925 }
-
926 
-
927 void BTD::hci_reset() {
-
928  hci_event_flag = 0; // Clear all the flags
-
929  hcibuf[0] = 0x03; // HCI OCF = 3
-
930  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
-
931  hcibuf[2] = 0x00;
+
919 void BTD::HCI_Command(uint8_t* data, uint16_t nbytes) {
+
920  hci_clear_flag(HCI_FLAG_CMD_COMPLETE);
+
921  pUsb->ctrlReq(bAddress, epInfo[ BTD_CONTROL_PIPE ].epAddr, bmREQ_HCI_OUT, 0x00, 0x00, 0x00, 0x00, nbytes, nbytes, data, NULL);
+
922 }
+
923 
+
924 void BTD::hci_reset() {
+
925  hci_event_flag = 0; // Clear all the flags
+
926  hcibuf[0] = 0x03; // HCI OCF = 3
+
927  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
+
928  hcibuf[2] = 0x00;
+
929 
+
930  HCI_Command(hcibuf, 3);
+
931 }
932 
-
933  HCI_Command(hcibuf, 3);
-
934 }
-
935 
-
936 void BTD::hci_write_scan_enable() {
-
937  hci_clear_flag(HCI_FLAG_INCOMING_REQUEST);
-
938  hcibuf[0] = 0x1A; // HCI OCF = 1A
-
939  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
-
940  hcibuf[2] = 0x01; // parameter length = 1
-
941  if(btdName != NULL)
-
942  hcibuf[3] = 0x03; // Inquiry Scan enabled. Page Scan enabled.
-
943  else
-
944  hcibuf[3] = 0x02; // Inquiry Scan disabled. Page Scan enabled.
+
933 void BTD::hci_write_scan_enable() {
+
934  hci_clear_flag(HCI_FLAG_INCOMING_REQUEST);
+
935  hcibuf[0] = 0x1A; // HCI OCF = 1A
+
936  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
+
937  hcibuf[2] = 0x01; // parameter length = 1
+
938  if(btdName != NULL)
+
939  hcibuf[3] = 0x03; // Inquiry Scan enabled. Page Scan enabled.
+
940  else
+
941  hcibuf[3] = 0x02; // Inquiry Scan disabled. Page Scan enabled.
+
942 
+
943  HCI_Command(hcibuf, 4);
+
944 }
945 
-
946  HCI_Command(hcibuf, 4);
-
947 }
-
948 
-
949 void BTD::hci_write_scan_disable() {
-
950  hcibuf[0] = 0x1A; // HCI OCF = 1A
-
951  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
-
952  hcibuf[2] = 0x01; // parameter length = 1
-
953  hcibuf[3] = 0x00; // Inquiry Scan disabled. Page Scan disabled.
+
946 void BTD::hci_write_scan_disable() {
+
947  hcibuf[0] = 0x1A; // HCI OCF = 1A
+
948  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
+
949  hcibuf[2] = 0x01; // parameter length = 1
+
950  hcibuf[3] = 0x00; // Inquiry Scan disabled. Page Scan disabled.
+
951 
+
952  HCI_Command(hcibuf, 4);
+
953 }
954 
-
955  HCI_Command(hcibuf, 4);
-
956 }
-
957 
-
958 void BTD::hci_read_bdaddr() {
-
959  hci_clear_flag(HCI_FLAG_READ_BDADDR);
-
960  hcibuf[0] = 0x09; // HCI OCF = 9
-
961  hcibuf[1] = 0x04 << 2; // HCI OGF = 4
-
962  hcibuf[2] = 0x00;
+
955 void BTD::hci_read_bdaddr() {
+
956  hci_clear_flag(HCI_FLAG_READ_BDADDR);
+
957  hcibuf[0] = 0x09; // HCI OCF = 9
+
958  hcibuf[1] = 0x04 << 2; // HCI OGF = 4
+
959  hcibuf[2] = 0x00;
+
960 
+
961  HCI_Command(hcibuf, 3);
+
962 }
963 
-
964  HCI_Command(hcibuf, 3);
-
965 }
-
966 
-
967 void BTD::hci_read_local_version_information() {
-
968  hci_clear_flag(HCI_FLAG_READ_VERSION);
-
969  hcibuf[0] = 0x01; // HCI OCF = 1
-
970  hcibuf[1] = 0x04 << 2; // HCI OGF = 4
-
971  hcibuf[2] = 0x00;
+
964 void BTD::hci_read_local_version_information() {
+
965  hci_clear_flag(HCI_FLAG_READ_VERSION);
+
966  hcibuf[0] = 0x01; // HCI OCF = 1
+
967  hcibuf[1] = 0x04 << 2; // HCI OGF = 4
+
968  hcibuf[2] = 0x00;
+
969 
+
970  HCI_Command(hcibuf, 3);
+
971 }
972 
-
973  HCI_Command(hcibuf, 3);
-
974 }
-
975 
-
976 void BTD::hci_accept_connection() {
-
977  hci_clear_flag(HCI_FLAG_CONNECT_COMPLETE);
-
978  hcibuf[0] = 0x09; // HCI OCF = 9
-
979  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
980  hcibuf[2] = 0x07; // parameter length 7
-
981  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
-
982  hcibuf[4] = disc_bdaddr[1];
-
983  hcibuf[5] = disc_bdaddr[2];
-
984  hcibuf[6] = disc_bdaddr[3];
-
985  hcibuf[7] = disc_bdaddr[4];
-
986  hcibuf[8] = disc_bdaddr[5];
-
987  hcibuf[9] = 0x00; // Switch role to master
+
973 void BTD::hci_accept_connection() {
+
974  hci_clear_flag(HCI_FLAG_CONNECT_COMPLETE);
+
975  hcibuf[0] = 0x09; // HCI OCF = 9
+
976  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
977  hcibuf[2] = 0x07; // parameter length 7
+
978  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
+
979  hcibuf[4] = disc_bdaddr[1];
+
980  hcibuf[5] = disc_bdaddr[2];
+
981  hcibuf[6] = disc_bdaddr[3];
+
982  hcibuf[7] = disc_bdaddr[4];
+
983  hcibuf[8] = disc_bdaddr[5];
+
984  hcibuf[9] = 0x00; // Switch role to master
+
985 
+
986  HCI_Command(hcibuf, 10);
+
987 }
988 
-
989  HCI_Command(hcibuf, 10);
-
990 }
-
991 
-
992 void BTD::hci_remote_name() {
-
993  hci_clear_flag(HCI_FLAG_REMOTE_NAME_COMPLETE);
-
994  hcibuf[0] = 0x19; // HCI OCF = 19
-
995  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
996  hcibuf[2] = 0x0A; // parameter length = 10
-
997  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
-
998  hcibuf[4] = disc_bdaddr[1];
-
999  hcibuf[5] = disc_bdaddr[2];
-
1000  hcibuf[6] = disc_bdaddr[3];
-
1001  hcibuf[7] = disc_bdaddr[4];
-
1002  hcibuf[8] = disc_bdaddr[5];
-
1003  hcibuf[9] = 0x01; // Page Scan Repetition Mode
-
1004  hcibuf[10] = 0x00; // Reserved
-
1005  hcibuf[11] = 0x00; // Clock offset - low byte
-
1006  hcibuf[12] = 0x00; // Clock offset - high byte
+
989 void BTD::hci_remote_name() {
+
990  hci_clear_flag(HCI_FLAG_REMOTE_NAME_COMPLETE);
+
991  hcibuf[0] = 0x19; // HCI OCF = 19
+
992  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
993  hcibuf[2] = 0x0A; // parameter length = 10
+
994  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
+
995  hcibuf[4] = disc_bdaddr[1];
+
996  hcibuf[5] = disc_bdaddr[2];
+
997  hcibuf[6] = disc_bdaddr[3];
+
998  hcibuf[7] = disc_bdaddr[4];
+
999  hcibuf[8] = disc_bdaddr[5];
+
1000  hcibuf[9] = 0x01; // Page Scan Repetition Mode
+
1001  hcibuf[10] = 0x00; // Reserved
+
1002  hcibuf[11] = 0x00; // Clock offset - low byte
+
1003  hcibuf[12] = 0x00; // Clock offset - high byte
+
1004 
+
1005  HCI_Command(hcibuf, 13);
+
1006 }
1007 
-
1008  HCI_Command(hcibuf, 13);
-
1009 }
-
1010 
-
1011 void BTD::hci_set_local_name(const char* name) {
-
1012  hcibuf[0] = 0x13; // HCI OCF = 13
-
1013  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
-
1014  hcibuf[2] = strlen(name) + 1; // parameter length = the length of the string + end byte
-
1015  uint8_t i;
-
1016  for(i = 0; i < strlen(name); i++)
-
1017  hcibuf[i + 3] = name[i];
-
1018  hcibuf[i + 3] = 0x00; // End of string
+
1008 void BTD::hci_set_local_name(const char* name) {
+
1009  hcibuf[0] = 0x13; // HCI OCF = 13
+
1010  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
+
1011  hcibuf[2] = strlen(name) + 1; // parameter length = the length of the string + end byte
+
1012  uint8_t i;
+
1013  for(i = 0; i < strlen(name); i++)
+
1014  hcibuf[i + 3] = name[i];
+
1015  hcibuf[i + 3] = 0x00; // End of string
+
1016 
+
1017  HCI_Command(hcibuf, 4 + strlen(name));
+
1018 }
1019 
-
1020  HCI_Command(hcibuf, 4 + strlen(name));
-
1021 }
-
1022 
-
1023 void BTD::hci_inquiry() {
-
1024  hci_clear_flag(HCI_FLAG_DEVICE_FOUND);
-
1025  hcibuf[0] = 0x01;
-
1026  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1027  hcibuf[2] = 0x05; // Parameter Total Length = 5
-
1028  hcibuf[3] = 0x33; // LAP: Genera/Unlimited Inquiry Access Code (GIAC = 0x9E8B33) - see https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
-
1029  hcibuf[4] = 0x8B;
-
1030  hcibuf[5] = 0x9E;
-
1031  hcibuf[6] = 0x30; // Inquiry time = 61.44 sec (maximum)
-
1032  hcibuf[7] = 0x0A; // 10 number of responses
+
1020 void BTD::hci_inquiry() {
+
1021  hci_clear_flag(HCI_FLAG_DEVICE_FOUND);
+
1022  hcibuf[0] = 0x01;
+
1023  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1024  hcibuf[2] = 0x05; // Parameter Total Length = 5
+
1025  hcibuf[3] = 0x33; // LAP: Genera/Unlimited Inquiry Access Code (GIAC = 0x9E8B33) - see https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
+
1026  hcibuf[4] = 0x8B;
+
1027  hcibuf[5] = 0x9E;
+
1028  hcibuf[6] = 0x30; // Inquiry time = 61.44 sec (maximum)
+
1029  hcibuf[7] = 0x0A; // 10 number of responses
+
1030 
+
1031  HCI_Command(hcibuf, 8);
+
1032 }
1033 
-
1034  HCI_Command(hcibuf, 8);
-
1035 }
-
1036 
-
1037 void BTD::hci_inquiry_cancel() {
-
1038  hcibuf[0] = 0x02;
-
1039  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1040  hcibuf[2] = 0x00; // Parameter Total Length = 0
+
1034 void BTD::hci_inquiry_cancel() {
+
1035  hcibuf[0] = 0x02;
+
1036  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1037  hcibuf[2] = 0x00; // Parameter Total Length = 0
+
1038 
+
1039  HCI_Command(hcibuf, 3);
+
1040 }
1041 
-
1042  HCI_Command(hcibuf, 3);
-
1043 }
-
1044 
-
1045 void BTD::hci_connect() {
-
1046  hci_connect(disc_bdaddr); // Use last discovered device
-
1047 }
-
1048 
-
1049 void BTD::hci_connect(uint8_t *bdaddr) {
-
1050  hci_clear_flag(HCI_FLAG_CONNECT_COMPLETE | HCI_FLAG_CONNECT_EVENT);
-
1051  hcibuf[0] = 0x05;
-
1052  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1053  hcibuf[2] = 0x0D; // parameter Total Length = 13
-
1054  hcibuf[3] = bdaddr[0]; // 6 octet bdaddr (LSB)
-
1055  hcibuf[4] = bdaddr[1];
-
1056  hcibuf[5] = bdaddr[2];
-
1057  hcibuf[6] = bdaddr[3];
-
1058  hcibuf[7] = bdaddr[4];
-
1059  hcibuf[8] = bdaddr[5];
-
1060  hcibuf[9] = 0x18; // DM1 or DH1 may be used
-
1061  hcibuf[10] = 0xCC; // DM3, DH3, DM5, DH5 may be used
-
1062  hcibuf[11] = 0x01; // Page repetition mode R1
-
1063  hcibuf[12] = 0x00; // Reserved
-
1064  hcibuf[13] = 0x00; // Clock offset
-
1065  hcibuf[14] = 0x00; // Invalid clock offset
-
1066  hcibuf[15] = 0x00; // Do not allow role switch
+
1042 void BTD::hci_connect() {
+
1043  hci_connect(disc_bdaddr); // Use last discovered device
+
1044 }
+
1045 
+
1046 void BTD::hci_connect(uint8_t *bdaddr) {
+
1047  hci_clear_flag(HCI_FLAG_CONNECT_COMPLETE | HCI_FLAG_CONNECT_EVENT);
+
1048  hcibuf[0] = 0x05;
+
1049  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1050  hcibuf[2] = 0x0D; // parameter Total Length = 13
+
1051  hcibuf[3] = bdaddr[0]; // 6 octet bdaddr (LSB)
+
1052  hcibuf[4] = bdaddr[1];
+
1053  hcibuf[5] = bdaddr[2];
+
1054  hcibuf[6] = bdaddr[3];
+
1055  hcibuf[7] = bdaddr[4];
+
1056  hcibuf[8] = bdaddr[5];
+
1057  hcibuf[9] = 0x18; // DM1 or DH1 may be used
+
1058  hcibuf[10] = 0xCC; // DM3, DH3, DM5, DH5 may be used
+
1059  hcibuf[11] = 0x01; // Page repetition mode R1
+
1060  hcibuf[12] = 0x00; // Reserved
+
1061  hcibuf[13] = 0x00; // Clock offset
+
1062  hcibuf[14] = 0x00; // Invalid clock offset
+
1063  hcibuf[15] = 0x00; // Do not allow role switch
+
1064 
+
1065  HCI_Command(hcibuf, 16);
+
1066 }
1067 
-
1068  HCI_Command(hcibuf, 16);
-
1069 }
-
1070 
-
1071 void BTD::hci_pin_code_request_reply() {
-
1072  hcibuf[0] = 0x0D; // HCI OCF = 0D
-
1073  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1074  hcibuf[2] = 0x17; // parameter length 23
-
1075  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
-
1076  hcibuf[4] = disc_bdaddr[1];
-
1077  hcibuf[5] = disc_bdaddr[2];
-
1078  hcibuf[6] = disc_bdaddr[3];
-
1079  hcibuf[7] = disc_bdaddr[4];
-
1080  hcibuf[8] = disc_bdaddr[5];
-
1081  if(pairWithWii) {
-
1082  hcibuf[9] = 6; // Pin length is the length of the Bluetooth address
-
1083  if(wiiUProController) {
-
1084 #ifdef DEBUG_USB_HOST
-
1085  Notify(PSTR("\r\nParing with Wii U Pro Controller"), 0x80);
-
1086 #endif
-
1087  for(uint8_t i = 0; i < 6; i++)
-
1088  hcibuf[10 + i] = my_bdaddr[i]; // The pin is the Bluetooth dongles Bluetooth address backwards
-
1089  } else {
-
1090  for(uint8_t i = 0; i < 6; i++)
-
1091  hcibuf[10 + i] = disc_bdaddr[i]; // The pin is the Wiimote's Bluetooth address backwards
-
1092  }
-
1093  for(uint8_t i = 16; i < 26; i++)
-
1094  hcibuf[i] = 0x00; // The rest should be 0
-
1095  } else {
-
1096  hcibuf[9] = strlen(btdPin); // Length of pin
-
1097  uint8_t i;
-
1098  for(i = 0; i < strlen(btdPin); i++) // The maximum size of the pin is 16
-
1099  hcibuf[i + 10] = btdPin[i];
-
1100  for(; i < 16; i++)
-
1101  hcibuf[i + 10] = 0x00; // The rest should be 0
-
1102  }
+
1068 void BTD::hci_pin_code_request_reply() {
+
1069  hcibuf[0] = 0x0D; // HCI OCF = 0D
+
1070  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1071  hcibuf[2] = 0x17; // parameter length 23
+
1072  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
+
1073  hcibuf[4] = disc_bdaddr[1];
+
1074  hcibuf[5] = disc_bdaddr[2];
+
1075  hcibuf[6] = disc_bdaddr[3];
+
1076  hcibuf[7] = disc_bdaddr[4];
+
1077  hcibuf[8] = disc_bdaddr[5];
+
1078  if(pairWithWii) {
+
1079  hcibuf[9] = 6; // Pin length is the length of the Bluetooth address
+
1080  if(wiiUProController) {
+
1081 #ifdef DEBUG_USB_HOST
+
1082  Notify(PSTR("\r\nParing with Wii U Pro Controller"), 0x80);
+
1083 #endif
+
1084  for(uint8_t i = 0; i < 6; i++)
+
1085  hcibuf[10 + i] = my_bdaddr[i]; // The pin is the Bluetooth dongles Bluetooth address backwards
+
1086  } else {
+
1087  for(uint8_t i = 0; i < 6; i++)
+
1088  hcibuf[10 + i] = disc_bdaddr[i]; // The pin is the Wiimote's Bluetooth address backwards
+
1089  }
+
1090  for(uint8_t i = 16; i < 26; i++)
+
1091  hcibuf[i] = 0x00; // The rest should be 0
+
1092  } else {
+
1093  hcibuf[9] = strlen(btdPin); // Length of pin
+
1094  uint8_t i;
+
1095  for(i = 0; i < strlen(btdPin); i++) // The maximum size of the pin is 16
+
1096  hcibuf[i + 10] = btdPin[i];
+
1097  for(; i < 16; i++)
+
1098  hcibuf[i + 10] = 0x00; // The rest should be 0
+
1099  }
+
1100 
+
1101  HCI_Command(hcibuf, 26);
+
1102 }
1103 
-
1104  HCI_Command(hcibuf, 26);
-
1105 }
-
1106 
-
1107 void BTD::hci_pin_code_negative_request_reply() {
-
1108  hcibuf[0] = 0x0E; // HCI OCF = 0E
-
1109  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1110  hcibuf[2] = 0x06; // parameter length 6
-
1111  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
-
1112  hcibuf[4] = disc_bdaddr[1];
-
1113  hcibuf[5] = disc_bdaddr[2];
-
1114  hcibuf[6] = disc_bdaddr[3];
-
1115  hcibuf[7] = disc_bdaddr[4];
-
1116  hcibuf[8] = disc_bdaddr[5];
+
1104 void BTD::hci_pin_code_negative_request_reply() {
+
1105  hcibuf[0] = 0x0E; // HCI OCF = 0E
+
1106  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1107  hcibuf[2] = 0x06; // parameter length 6
+
1108  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
+
1109  hcibuf[4] = disc_bdaddr[1];
+
1110  hcibuf[5] = disc_bdaddr[2];
+
1111  hcibuf[6] = disc_bdaddr[3];
+
1112  hcibuf[7] = disc_bdaddr[4];
+
1113  hcibuf[8] = disc_bdaddr[5];
+
1114 
+
1115  HCI_Command(hcibuf, 9);
+
1116 }
1117 
-
1118  HCI_Command(hcibuf, 9);
-
1119 }
-
1120 
-
1121 void BTD::hci_link_key_request_negative_reply() {
-
1122  hcibuf[0] = 0x0C; // HCI OCF = 0C
-
1123  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1124  hcibuf[2] = 0x06; // parameter length 6
-
1125  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
-
1126  hcibuf[4] = disc_bdaddr[1];
-
1127  hcibuf[5] = disc_bdaddr[2];
-
1128  hcibuf[6] = disc_bdaddr[3];
-
1129  hcibuf[7] = disc_bdaddr[4];
-
1130  hcibuf[8] = disc_bdaddr[5];
+
1118 void BTD::hci_link_key_request_negative_reply() {
+
1119  hcibuf[0] = 0x0C; // HCI OCF = 0C
+
1120  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1121  hcibuf[2] = 0x06; // parameter length 6
+
1122  hcibuf[3] = disc_bdaddr[0]; // 6 octet bdaddr
+
1123  hcibuf[4] = disc_bdaddr[1];
+
1124  hcibuf[5] = disc_bdaddr[2];
+
1125  hcibuf[6] = disc_bdaddr[3];
+
1126  hcibuf[7] = disc_bdaddr[4];
+
1127  hcibuf[8] = disc_bdaddr[5];
+
1128 
+
1129  HCI_Command(hcibuf, 9);
+
1130 }
1131 
-
1132  HCI_Command(hcibuf, 9);
-
1133 }
-
1134 
-
1135 void BTD::hci_authentication_request() {
-
1136  hcibuf[0] = 0x11; // HCI OCF = 11
-
1137  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1138  hcibuf[2] = 0x02; // parameter length = 2
-
1139  hcibuf[3] = (uint8_t)(hci_handle & 0xFF); //connection handle - low byte
-
1140  hcibuf[4] = (uint8_t)((hci_handle >> 8) & 0x0F); //connection handle - high byte
+
1132 void BTD::hci_authentication_request() {
+
1133  hcibuf[0] = 0x11; // HCI OCF = 11
+
1134  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1135  hcibuf[2] = 0x02; // parameter length = 2
+
1136  hcibuf[3] = (uint8_t)(hci_handle & 0xFF); //connection handle - low byte
+
1137  hcibuf[4] = (uint8_t)((hci_handle >> 8) & 0x0F); //connection handle - high byte
+
1138 
+
1139  HCI_Command(hcibuf, 5);
+
1140 }
1141 
-
1142  HCI_Command(hcibuf, 5);
-
1143 }
-
1144 
-
1145 void BTD::hci_disconnect(uint16_t handle) { // This is called by the different services
-
1146  hci_clear_flag(HCI_FLAG_DISCONNECT_COMPLETE);
-
1147  hcibuf[0] = 0x06; // HCI OCF = 6
-
1148  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
-
1149  hcibuf[2] = 0x03; // parameter length = 3
-
1150  hcibuf[3] = (uint8_t)(handle & 0xFF); //connection handle - low byte
-
1151  hcibuf[4] = (uint8_t)((handle >> 8) & 0x0F); //connection handle - high byte
-
1152  hcibuf[5] = 0x13; // reason
+
1142 void BTD::hci_disconnect(uint16_t handle) { // This is called by the different services
+
1143  hci_clear_flag(HCI_FLAG_DISCONNECT_COMPLETE);
+
1144  hcibuf[0] = 0x06; // HCI OCF = 6
+
1145  hcibuf[1] = 0x01 << 2; // HCI OGF = 1
+
1146  hcibuf[2] = 0x03; // parameter length = 3
+
1147  hcibuf[3] = (uint8_t)(handle & 0xFF); //connection handle - low byte
+
1148  hcibuf[4] = (uint8_t)((handle >> 8) & 0x0F); //connection handle - high byte
+
1149  hcibuf[5] = 0x13; // reason
+
1150 
+
1151  HCI_Command(hcibuf, 6);
+
1152 }
1153 
-
1154  HCI_Command(hcibuf, 6);
-
1155 }
-
1156 
-
1157 void BTD::hci_write_class_of_device() { // See http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html
-
1158  hcibuf[0] = 0x24; // HCI OCF = 24
-
1159  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
-
1160  hcibuf[2] = 0x03; // parameter length = 3
-
1161  hcibuf[3] = 0x04; // Robot
-
1162  hcibuf[4] = 0x08; // Toy
-
1163  hcibuf[5] = 0x00;
-
1164 
-
1165  HCI_Command(hcibuf, 6);
-
1166 }
-
1167 /*******************************************************************
-
1168  * *
-
1169  * HCI ACL Data Packet *
-
1170  * *
-
1171  * buf[0] buf[1] buf[2] buf[3]
-
1172  * 0 4 8 11 12 16 24 31 MSB
-
1173  * .-+-+-+-+-+-+-+-|-+-+-+-|-+-|-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
-
1174  * | HCI Handle |PB |BC | Data Total Length | HCI ACL Data Packet
-
1175  * .-+-+-+-+-+-+-+-|-+-+-+-|-+-|-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
-
1176  *
-
1177  * buf[4] buf[5] buf[6] buf[7]
-
1178  * 0 8 16 31 MSB
-
1179  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
-
1180  * | Length | Channel ID | Basic L2CAP header
-
1181  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
-
1182  *
-
1183  * buf[8] buf[9] buf[10] buf[11]
-
1184  * 0 8 16 31 MSB
-
1185  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
-
1186  * | Code | Identifier | Length | Control frame (C-frame)
-
1187  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-. (signaling packet format)
-
1188  */
+
1154 void BTD::hci_write_class_of_device() { // See http://bluetooth-pentest.narod.ru/software/bluetooth_class_of_device-service_generator.html
+
1155  hcibuf[0] = 0x24; // HCI OCF = 24
+
1156  hcibuf[1] = 0x03 << 2; // HCI OGF = 3
+
1157  hcibuf[2] = 0x03; // parameter length = 3
+
1158  hcibuf[3] = 0x04; // Robot
+
1159  hcibuf[4] = 0x08; // Toy
+
1160  hcibuf[5] = 0x00;
+
1161 
+
1162  HCI_Command(hcibuf, 6);
+
1163 }
+
1164 /*******************************************************************
+
1165  * *
+
1166  * HCI ACL Data Packet *
+
1167  * *
+
1168  * buf[0] buf[1] buf[2] buf[3]
+
1169  * 0 4 8 11 12 16 24 31 MSB
+
1170  * .-+-+-+-+-+-+-+-|-+-+-+-|-+-|-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
+
1171  * | HCI Handle |PB |BC | Data Total Length | HCI ACL Data Packet
+
1172  * .-+-+-+-+-+-+-+-|-+-+-+-|-+-|-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
+
1173  *
+
1174  * buf[4] buf[5] buf[6] buf[7]
+
1175  * 0 8 16 31 MSB
+
1176  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
+
1177  * | Length | Channel ID | Basic L2CAP header
+
1178  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
+
1179  *
+
1180  * buf[8] buf[9] buf[10] buf[11]
+
1181  * 0 8 16 31 MSB
+
1182  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-.
+
1183  * | Code | Identifier | Length | Control frame (C-frame)
+
1184  * .-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-. (signaling packet format)
+
1185  */
+
1186 /************************************************************/
+
1187 /* L2CAP Commands */
+
1188 
1189 /************************************************************/
-
1190 /* L2CAP Commands */
-
1191 
-
1192 /************************************************************/
-
1193 void BTD::L2CAP_Command(uint16_t handle, uint8_t* data, uint8_t nbytes, uint8_t channelLow, uint8_t channelHigh) {
-
1194  uint8_t buf[8 + nbytes];
-
1195  buf[0] = (uint8_t)(handle & 0xff); // HCI handle with PB,BC flag
-
1196  buf[1] = (uint8_t)(((handle >> 8) & 0x0f) | 0x20);
-
1197  buf[2] = (uint8_t)((4 + nbytes) & 0xff); // HCI ACL total data length
-
1198  buf[3] = (uint8_t)((4 + nbytes) >> 8);
-
1199  buf[4] = (uint8_t)(nbytes & 0xff); // L2CAP header: Length
-
1200  buf[5] = (uint8_t)(nbytes >> 8);
-
1201  buf[6] = channelLow;
-
1202  buf[7] = channelHigh;
+
1190 void BTD::L2CAP_Command(uint16_t handle, uint8_t* data, uint8_t nbytes, uint8_t channelLow, uint8_t channelHigh) {
+
1191  uint8_t buf[8 + nbytes];
+
1192  buf[0] = (uint8_t)(handle & 0xff); // HCI handle with PB,BC flag
+
1193  buf[1] = (uint8_t)(((handle >> 8) & 0x0f) | 0x20);
+
1194  buf[2] = (uint8_t)((4 + nbytes) & 0xff); // HCI ACL total data length
+
1195  buf[3] = (uint8_t)((4 + nbytes) >> 8);
+
1196  buf[4] = (uint8_t)(nbytes & 0xff); // L2CAP header: Length
+
1197  buf[5] = (uint8_t)(nbytes >> 8);
+
1198  buf[6] = channelLow;
+
1199  buf[7] = channelHigh;
+
1200 
+
1201  for(uint16_t i = 0; i < nbytes; i++) // L2CAP C-frame
+
1202  buf[8 + i] = data[i];
1203 
-
1204  for(uint16_t i = 0; i < nbytes; i++) // L2CAP C-frame
-
1205  buf[8 + i] = data[i];
-
1206 
-
1207  uint8_t rcode = pUsb->outTransfer(bAddress, epInfo[ BTD_DATAOUT_PIPE ].epAddr, (8 + nbytes), buf);
-
1208  if(rcode) {
-
1209  delay(100); // This small delay prevents it from overflowing if it fails
-
1210 #ifdef DEBUG_USB_HOST
-
1211  Notify(PSTR("\r\nError sending L2CAP message: 0x"), 0x80);
-
1212  D_PrintHex<uint8_t > (rcode, 0x80);
-
1213  Notify(PSTR(" - Channel ID: "), 0x80);
-
1214  D_PrintHex<uint8_t > (channelHigh, 0x80);
-
1215  Notify(PSTR(" "), 0x80);
-
1216  D_PrintHex<uint8_t > (channelLow, 0x80);
-
1217 #endif
-
1218  }
-
1219 }
-
1220 
-
1221 void BTD::l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t* scid, uint16_t psm) {
-
1222  l2capoutbuf[0] = L2CAP_CMD_CONNECTION_REQUEST; // Code
-
1223  l2capoutbuf[1] = rxid; // Identifier
-
1224  l2capoutbuf[2] = 0x04; // Length
-
1225  l2capoutbuf[3] = 0x00;
-
1226  l2capoutbuf[4] = (uint8_t)(psm & 0xff); // PSM
-
1227  l2capoutbuf[5] = (uint8_t)(psm >> 8);
-
1228  l2capoutbuf[6] = scid[0]; // Source CID
-
1229  l2capoutbuf[7] = scid[1];
+
1204  uint8_t rcode = pUsb->outTransfer(bAddress, epInfo[ BTD_DATAOUT_PIPE ].epAddr, (8 + nbytes), buf);
+
1205  if(rcode) {
+
1206  delay(100); // This small delay prevents it from overflowing if it fails
+
1207 #ifdef DEBUG_USB_HOST
+
1208  Notify(PSTR("\r\nError sending L2CAP message: 0x"), 0x80);
+
1209  D_PrintHex<uint8_t > (rcode, 0x80);
+
1210  Notify(PSTR(" - Channel ID: "), 0x80);
+
1211  D_PrintHex<uint8_t > (channelHigh, 0x80);
+
1212  Notify(PSTR(" "), 0x80);
+
1213  D_PrintHex<uint8_t > (channelLow, 0x80);
+
1214 #endif
+
1215  }
+
1216 }
+
1217 
+
1218 void BTD::l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t* scid, uint16_t psm) {
+
1219  l2capoutbuf[0] = L2CAP_CMD_CONNECTION_REQUEST; // Code
+
1220  l2capoutbuf[1] = rxid; // Identifier
+
1221  l2capoutbuf[2] = 0x04; // Length
+
1222  l2capoutbuf[3] = 0x00;
+
1223  l2capoutbuf[4] = (uint8_t)(psm & 0xff); // PSM
+
1224  l2capoutbuf[5] = (uint8_t)(psm >> 8);
+
1225  l2capoutbuf[6] = scid[0]; // Source CID
+
1226  l2capoutbuf[7] = scid[1];
+
1227 
+
1228  L2CAP_Command(handle, l2capoutbuf, 8);
+
1229 }
1230 
-
1231  L2CAP_Command(handle, l2capoutbuf, 8);
-
1232 }
-
1233 
-
1234 void BTD::l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid, uint8_t result) {
-
1235  l2capoutbuf[0] = L2CAP_CMD_CONNECTION_RESPONSE; // Code
-
1236  l2capoutbuf[1] = rxid; // Identifier
-
1237  l2capoutbuf[2] = 0x08; // Length
-
1238  l2capoutbuf[3] = 0x00;
-
1239  l2capoutbuf[4] = dcid[0]; // Destination CID
-
1240  l2capoutbuf[5] = dcid[1];
-
1241  l2capoutbuf[6] = scid[0]; // Source CID
-
1242  l2capoutbuf[7] = scid[1];
-
1243  l2capoutbuf[8] = result; // Result: Pending or Success
-
1244  l2capoutbuf[9] = 0x00;
-
1245  l2capoutbuf[10] = 0x00; // No further information
-
1246  l2capoutbuf[11] = 0x00;
+
1231 void BTD::l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid, uint8_t result) {
+
1232  l2capoutbuf[0] = L2CAP_CMD_CONNECTION_RESPONSE; // Code
+
1233  l2capoutbuf[1] = rxid; // Identifier
+
1234  l2capoutbuf[2] = 0x08; // Length
+
1235  l2capoutbuf[3] = 0x00;
+
1236  l2capoutbuf[4] = dcid[0]; // Destination CID
+
1237  l2capoutbuf[5] = dcid[1];
+
1238  l2capoutbuf[6] = scid[0]; // Source CID
+
1239  l2capoutbuf[7] = scid[1];
+
1240  l2capoutbuf[8] = result; // Result: Pending or Success
+
1241  l2capoutbuf[9] = 0x00;
+
1242  l2capoutbuf[10] = 0x00; // No further information
+
1243  l2capoutbuf[11] = 0x00;
+
1244 
+
1245  L2CAP_Command(handle, l2capoutbuf, 12);
+
1246 }
1247 
-
1248  L2CAP_Command(handle, l2capoutbuf, 12);
-
1249 }
-
1250 
-
1251 void BTD::l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t* dcid) {
-
1252  l2capoutbuf[0] = L2CAP_CMD_CONFIG_REQUEST; // Code
-
1253  l2capoutbuf[1] = rxid; // Identifier
-
1254  l2capoutbuf[2] = 0x08; // Length
-
1255  l2capoutbuf[3] = 0x00;
-
1256  l2capoutbuf[4] = dcid[0]; // Destination CID
-
1257  l2capoutbuf[5] = dcid[1];
-
1258  l2capoutbuf[6] = 0x00; // Flags
-
1259  l2capoutbuf[7] = 0x00;
-
1260  l2capoutbuf[8] = 0x01; // Config Opt: type = MTU (Maximum Transmission Unit) - Hint
-
1261  l2capoutbuf[9] = 0x02; // Config Opt: length
-
1262  l2capoutbuf[10] = 0xFF; // MTU
-
1263  l2capoutbuf[11] = 0xFF;
+
1248 void BTD::l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t* dcid) {
+
1249  l2capoutbuf[0] = L2CAP_CMD_CONFIG_REQUEST; // Code
+
1250  l2capoutbuf[1] = rxid; // Identifier
+
1251  l2capoutbuf[2] = 0x08; // Length
+
1252  l2capoutbuf[3] = 0x00;
+
1253  l2capoutbuf[4] = dcid[0]; // Destination CID
+
1254  l2capoutbuf[5] = dcid[1];
+
1255  l2capoutbuf[6] = 0x00; // Flags
+
1256  l2capoutbuf[7] = 0x00;
+
1257  l2capoutbuf[8] = 0x01; // Config Opt: type = MTU (Maximum Transmission Unit) - Hint
+
1258  l2capoutbuf[9] = 0x02; // Config Opt: length
+
1259  l2capoutbuf[10] = 0xFF; // MTU
+
1260  l2capoutbuf[11] = 0xFF;
+
1261 
+
1262  L2CAP_Command(handle, l2capoutbuf, 12);
+
1263 }
1264 
-
1265  L2CAP_Command(handle, l2capoutbuf, 12);
-
1266 }
-
1267 
-
1268 void BTD::l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t* scid) {
-
1269  l2capoutbuf[0] = L2CAP_CMD_CONFIG_RESPONSE; // Code
-
1270  l2capoutbuf[1] = rxid; // Identifier
-
1271  l2capoutbuf[2] = 0x0A; // Length
-
1272  l2capoutbuf[3] = 0x00;
-
1273  l2capoutbuf[4] = scid[0]; // Source CID
-
1274  l2capoutbuf[5] = scid[1];
-
1275  l2capoutbuf[6] = 0x00; // Flag
-
1276  l2capoutbuf[7] = 0x00;
-
1277  l2capoutbuf[8] = 0x00; // Result
-
1278  l2capoutbuf[9] = 0x00;
-
1279  l2capoutbuf[10] = 0x01; // Config
-
1280  l2capoutbuf[11] = 0x02;
-
1281  l2capoutbuf[12] = 0xA0;
-
1282  l2capoutbuf[13] = 0x02;
+
1265 void BTD::l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t* scid) {
+
1266  l2capoutbuf[0] = L2CAP_CMD_CONFIG_RESPONSE; // Code
+
1267  l2capoutbuf[1] = rxid; // Identifier
+
1268  l2capoutbuf[2] = 0x0A; // Length
+
1269  l2capoutbuf[3] = 0x00;
+
1270  l2capoutbuf[4] = scid[0]; // Source CID
+
1271  l2capoutbuf[5] = scid[1];
+
1272  l2capoutbuf[6] = 0x00; // Flag
+
1273  l2capoutbuf[7] = 0x00;
+
1274  l2capoutbuf[8] = 0x00; // Result
+
1275  l2capoutbuf[9] = 0x00;
+
1276  l2capoutbuf[10] = 0x01; // Config
+
1277  l2capoutbuf[11] = 0x02;
+
1278  l2capoutbuf[12] = 0xA0;
+
1279  l2capoutbuf[13] = 0x02;
+
1280 
+
1281  L2CAP_Command(handle, l2capoutbuf, 14);
+
1282 }
1283 
-
1284  L2CAP_Command(handle, l2capoutbuf, 14);
-
1285 }
-
1286 
-
1287 void BTD::l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid) {
-
1288  l2capoutbuf[0] = L2CAP_CMD_DISCONNECT_REQUEST; // Code
-
1289  l2capoutbuf[1] = rxid; // Identifier
-
1290  l2capoutbuf[2] = 0x04; // Length
-
1291  l2capoutbuf[3] = 0x00;
-
1292  l2capoutbuf[4] = dcid[0];
-
1293  l2capoutbuf[5] = dcid[1];
-
1294  l2capoutbuf[6] = scid[0];
-
1295  l2capoutbuf[7] = scid[1];
+
1284 void BTD::l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid) {
+
1285  l2capoutbuf[0] = L2CAP_CMD_DISCONNECT_REQUEST; // Code
+
1286  l2capoutbuf[1] = rxid; // Identifier
+
1287  l2capoutbuf[2] = 0x04; // Length
+
1288  l2capoutbuf[3] = 0x00;
+
1289  l2capoutbuf[4] = dcid[0];
+
1290  l2capoutbuf[5] = dcid[1];
+
1291  l2capoutbuf[6] = scid[0];
+
1292  l2capoutbuf[7] = scid[1];
+
1293 
+
1294  L2CAP_Command(handle, l2capoutbuf, 8);
+
1295 }
1296 
-
1297  L2CAP_Command(handle, l2capoutbuf, 8);
-
1298 }
-
1299 
-
1300 void BTD::l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid) {
-
1301  l2capoutbuf[0] = L2CAP_CMD_DISCONNECT_RESPONSE; // Code
-
1302  l2capoutbuf[1] = rxid; // Identifier
-
1303  l2capoutbuf[2] = 0x04; // Length
-
1304  l2capoutbuf[3] = 0x00;
-
1305  l2capoutbuf[4] = dcid[0];
-
1306  l2capoutbuf[5] = dcid[1];
-
1307  l2capoutbuf[6] = scid[0];
-
1308  l2capoutbuf[7] = scid[1];
+
1297 void BTD::l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t* dcid, uint8_t* scid) {
+
1298  l2capoutbuf[0] = L2CAP_CMD_DISCONNECT_RESPONSE; // Code
+
1299  l2capoutbuf[1] = rxid; // Identifier
+
1300  l2capoutbuf[2] = 0x04; // Length
+
1301  l2capoutbuf[3] = 0x00;
+
1302  l2capoutbuf[4] = dcid[0];
+
1303  l2capoutbuf[5] = dcid[1];
+
1304  l2capoutbuf[6] = scid[0];
+
1305  l2capoutbuf[7] = scid[1];
+
1306 
+
1307  L2CAP_Command(handle, l2capoutbuf, 8);
+
1308 }
1309 
-
1310  L2CAP_Command(handle, l2capoutbuf, 8);
-
1311 }
-
1312 
-
1313 void BTD::l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh) {
-
1314  l2capoutbuf[0] = L2CAP_CMD_INFORMATION_RESPONSE; // Code
-
1315  l2capoutbuf[1] = rxid; // Identifier
-
1316  l2capoutbuf[2] = 0x08; // Length
-
1317  l2capoutbuf[3] = 0x00;
-
1318  l2capoutbuf[4] = infoTypeLow;
-
1319  l2capoutbuf[5] = infoTypeHigh;
-
1320  l2capoutbuf[6] = 0x00; // Result = success
-
1321  l2capoutbuf[7] = 0x00; // Result = success
-
1322  l2capoutbuf[8] = 0x00;
-
1323  l2capoutbuf[9] = 0x00;
-
1324  l2capoutbuf[10] = 0x00;
-
1325  l2capoutbuf[11] = 0x00;
+
1310 void BTD::l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh) {
+
1311  l2capoutbuf[0] = L2CAP_CMD_INFORMATION_RESPONSE; // Code
+
1312  l2capoutbuf[1] = rxid; // Identifier
+
1313  l2capoutbuf[2] = 0x08; // Length
+
1314  l2capoutbuf[3] = 0x00;
+
1315  l2capoutbuf[4] = infoTypeLow;
+
1316  l2capoutbuf[5] = infoTypeHigh;
+
1317  l2capoutbuf[6] = 0x00; // Result = success
+
1318  l2capoutbuf[7] = 0x00; // Result = success
+
1319  l2capoutbuf[8] = 0x00;
+
1320  l2capoutbuf[9] = 0x00;
+
1321  l2capoutbuf[10] = 0x00;
+
1322  l2capoutbuf[11] = 0x00;
+
1323 
+
1324  L2CAP_Command(handle, l2capoutbuf, 12);
+
1325 }
1326 
-
1327  L2CAP_Command(handle, l2capoutbuf, 12);
-
1328 }
-
1329 
-
1330 /* PS3 Commands - only set Bluetooth address is implemented in this library */
-
1331 void BTD::setBdaddr(uint8_t* bdaddr) {
-
1332  /* Set the internal Bluetooth address */
-
1333  uint8_t buf[8];
-
1334  buf[0] = 0x01;
-
1335  buf[1] = 0x00;
+
1327 /* PS3 Commands - only set Bluetooth address is implemented in this library */
+
1328 void BTD::setBdaddr(uint8_t* bdaddr) {
+
1329  /* Set the internal Bluetooth address */
+
1330  uint8_t buf[8];
+
1331  buf[0] = 0x01;
+
1332  buf[1] = 0x00;
+
1333 
+
1334  for(uint8_t i = 0; i < 6; i++)
+
1335  buf[i + 2] = bdaddr[5 - i]; // Copy into buffer, has to be written reversed, so it is MSB first
1336 
-
1337  for(uint8_t i = 0; i < 6; i++)
-
1338  buf[i + 2] = bdaddr[5 - i]; // Copy into buffer, has to be written reversed, so it is MSB first
-
1339 
-
1340  // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0xF5), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data
-
1341  pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL);
-
1342 }
-
1343 
-
1344 void BTD::setMoveBdaddr(uint8_t* bdaddr) {
-
1345  /* Set the internal Bluetooth address */
-
1346  uint8_t buf[11];
-
1347  buf[0] = 0x05;
-
1348  buf[7] = 0x10;
-
1349  buf[8] = 0x01;
-
1350  buf[9] = 0x02;
-
1351  buf[10] = 0x12;
+
1337  // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0xF5), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data
+
1338  pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0xF5, 0x03, 0x00, 8, 8, buf, NULL);
+
1339 }
+
1340 
+
1341 void BTD::setMoveBdaddr(uint8_t* bdaddr) {
+
1342  /* Set the internal Bluetooth address */
+
1343  uint8_t buf[11];
+
1344  buf[0] = 0x05;
+
1345  buf[7] = 0x10;
+
1346  buf[8] = 0x01;
+
1347  buf[9] = 0x02;
+
1348  buf[10] = 0x12;
+
1349 
+
1350  for(uint8_t i = 0; i < 6; i++)
+
1351  buf[i + 1] = bdaddr[i];
1352 
-
1353  for(uint8_t i = 0; i < 6; i++)
-
1354  buf[i + 1] = bdaddr[i];
-
1355 
-
1356  // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x05), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data
-
1357  pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL);
-
1358 }
+
1353  // bmRequest = Host to device (0x00) | Class (0x20) | Interface (0x01) = 0x21, bRequest = Set Report (0x09), Report ID (0x05), Report Type (Feature 0x03), interface (0x00), datalength, datalength, data
+
1354  pUsb->ctrlReq(bAddress, epInfo[BTD_CONTROL_PIPE].epAddr, bmREQ_HID_OUT, HID_REQUEST_SET_REPORT, 0x05, 0x03, 0x00, 11, 11, buf, NULL);
+
1355 }
static const uint8_t BTD_DATAOUT_PIPE
Definition: BTD.h:557
uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr)
Definition: Usb.cpp:766
bool incomingWii
Definition: BTD.h:507
Definition: address.h:83
-
void hci_connect()
Definition: BTD.cpp:1045
+
void hci_connect()
Definition: BTD.cpp:1042
uint8_t bNumEP
Definition: BTD.h:546
EpInfo * epinfo
Definition: address.h:76
const char * btdName
Definition: BTD.h:480
-
void hci_reset()
Definition: BTD.cpp:927
-
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
Definition: BTD.cpp:1234
+
void hci_reset()
Definition: BTD.cpp:924
+
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
Definition: BTD.cpp:1231
#define HCI_SCANNING_STATE
Definition: BTD.h:54
bool lowspeed
Definition: address.h:79
#define USB_ERROR_EPINFO_IS_NULL
Definition: UsbCore.h:67
-
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
Definition: BTD.cpp:1221
+
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
Definition: BTD.cpp:1218
#define EV_COMMAND_STATUS
Definition: BTD.h:98
#define EV_REMOTE_NAME_COMPLETE
Definition: BTD.h:85
uint8_t bmNakPower
Definition: address.h:42
bool sdpConnectionClaimed
Definition: BTD.h:475
#define bmREQ_HCI_OUT
Definition: BTD.h:36
-
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1287
+
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1284
Definition: address.h:75
bool rfcommConnectionClaimed
Definition: BTD.h:477
uint8_t hci_version
Definition: BTD.h:497
uint16_t idVendor
Definition: usb_ch9.h:106
#define EV_INQUIRY_COMPLETE
Definition: BTD.h:79
-
void hci_inquiry()
Definition: BTD.cpp:1023
+
void hci_inquiry()
Definition: BTD.cpp:1020
static const uint8_t BTD_EVENT_PIPE
Definition: BTD.h:553
#define PS3MOVE_PID
Definition: BTD.h:27
Definition: usb_ch9.h:141
@@ -1480,12 +1477,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
bool pairWithWii
Definition: BTD.h:509
uint8_t bLength
Definition: usb_ch9.h:142
uint8_t bMaxPacketSize0
Definition: usb_ch9.h:105
-
void hci_write_scan_disable()
Definition: BTD.cpp:949
+
void hci_write_scan_disable()
Definition: BTD.cpp:946
#define NotifyFail(...)
Definition: message.h:55
#define HCI_SET_NAME_STATE
Definition: BTD.h:47
virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
Definition: BTD.cpp:314
#define EV_LINK_KEY_REQUEST
Definition: BTD.h:91
#define HCI_DONE_STATE
Definition: BTD.h:59
+
#define BTD_NUM_SERVICES
Definition: BTD.h:190
#define EV_DATA_BUFFER_OVERFLOW
Definition: BTD.h:93
#define HCI_DISCONNECT_STATE
Definition: BTD.h:60
#define HCI_FLAG_CONNECT_COMPLETE
Definition: BTD.h:64
@@ -1494,8 +1492,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
const char * btdPin
Definition: BTD.h:482
bool motionPlusInside
Definition: BTD.h:511
#define EV_AUTHENTICATION_COMPLETE
Definition: BTD.h:84
-
void hci_remote_name()
Definition: BTD.cpp:992
-
uint8_t remote_name[30]
Definition: BTD.h:491
+
void hci_remote_name()
Definition: BTD.cpp:989
#define HCI_FLAG_CONNECT_EVENT
Definition: BTD.h:71
#define HCI_FLAG_DISCONNECT_COMPLETE
Definition: BTD.h:65
#define HCI_REMOTE_NAME_STATE
Definition: BTD.h:56
@@ -1504,18 +1501,19 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define PS3_VID
Definition: BTD.h:24
#define NotifyFailGetDevDescr(...)
Definition: message.h:50
BTD(USB *p)
Definition: BTD.cpp:27
+
char remote_name[30]
Definition: BTD.h:491
#define hrJERR
Definition: max3421e.h:225
uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo *eprecord_ptr)
Definition: Usb.cpp:64
virtual void Reset()
#define EV_MAX_SLOTS_CHANGE
Definition: BTD.h:94
static const uint8_t BTD_DATAIN_PIPE
Definition: BTD.h:555
-
void hci_set_local_name(const char *name)
Definition: BTD.cpp:1011
+
void hci_set_local_name(const char *name)
Definition: BTD.cpp:1008
#define EV_QOS_SETUP_COMPLETE
Definition: BTD.h:96
-
void hci_write_scan_enable()
Definition: BTD.cpp:936
+
void hci_write_scan_enable()
Definition: BTD.cpp:933
virtual uint8_t Release()
Definition: BTD.cpp:365
virtual void FreeAddress(uint8_t addr)=0
uint8_t epAttribs
Definition: address.h:37
-
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1300
+
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1297
uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p)
Definition: Usb.cpp:126
virtual UsbDevice * GetUsbDevicePtr(uint8_t addr)=0
bool watingForConnection
Definition: BTD.h:471
@@ -1547,12 +1545,12 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
Definition: BTD.cpp:122
#define Notifyc(...)
Definition: message.h:46
Definition: address.h:32
-
void hci_disconnect(uint16_t handle)
Definition: BTD.cpp:1145
+
void hci_disconnect(uint16_t handle)
Definition: BTD.cpp:1142
#define HCI_RESET_STATE
Definition: BTD.h:43
uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data)
Definition: Usb.cpp:292
#define hrNAK
Definition: max3421e.h:216
-
void hci_read_bdaddr()
Definition: BTD.cpp:958
-
void hci_inquiry_cancel()
Definition: BTD.cpp:1037
+
void hci_read_bdaddr()
Definition: BTD.cpp:955
+
void hci_inquiry_cancel()
Definition: BTD.cpp:1034
#define L2CAP_CMD_INFORMATION_RESPONSE
Definition: BTD.h:173
uint16_t wMaxPacketSize
Definition: usb_ch9.h:146
uint8_t my_bdaddr[6]
Definition: BTD.h:485
@@ -1589,16 +1587,16 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define L2CAP_CMD_DISCONNECT_RESPONSE
Definition: BTD.h:171
#define EV_READ_REMOTE_VERSION_INFORMATION_COMPLETE
Definition: BTD.h:95
#define EV_COMMAND_COMPLETE
Definition: BTD.h:97
-
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
Definition: BTD.cpp:1313
+
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
Definition: BTD.cpp:1310
uint16_t idProduct
Definition: usb_ch9.h:107
#define L2CAP_CMD_CONNECTION_RESPONSE
Definition: BTD.h:167
#define L2CAP_CMD_CONFIG_RESPONSE
Definition: BTD.h:169
#define hci_set_flag(flag)
Definition: BTD.h:75
-
void hci_write_class_of_device()
Definition: BTD.cpp:1157
+
void hci_write_class_of_device()
Definition: BTD.cpp:1154
#define HCI_CONNECTED_DEVICE_STATE
Definition: BTD.h:52
#define HCI_INIT_STATE
Definition: BTD.h:42
#define bmREQ_HID_OUT
Definition: BTD.h:38
-
void hci_pin_code_negative_request_reply()
Definition: BTD.cpp:1107
+
void hci_pin_code_negative_request_reply()
Definition: BTD.cpp:1104
#define EV_CHANGE_CONNECTION_LINK
Definition: BTD.h:87
uint8_t bNumConfigurations
Definition: usb_ch9.h:112
#define USB_ERROR_OUT_OF_ADDRESS_SPACE_IN_POOL
Definition: UsbCore.h:64
@@ -1610,14 +1608,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Definition: UsbCore.h:176
virtual void Run()
uint8_t bConfNum
Definition: BTD.h:544
-
void hci_link_key_request_negative_reply()
Definition: BTD.cpp:1121
+
void hci_link_key_request_negative_reply()
Definition: BTD.cpp:1118
#define EV_LOOPBACK_COMMAND
Definition: BTD.h:99
-
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
Definition: BTD.cpp:1193
-
#define BTD_NUMSERVICES
Definition: BTD.h:190
+
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
Definition: BTD.cpp:1190
#define EV_LINK_KEY_NOTIFICATION
Definition: BTD.h:92
-
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
Definition: BTD.cpp:1268
-
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
Definition: BTD.cpp:1251
-
void hci_pin_code_request_reply()
Definition: BTD.cpp:1071
+
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
Definition: BTD.cpp:1265
+
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
Definition: BTD.cpp:1248
+
void hci_pin_code_request_reply()
Definition: BTD.cpp:1068
#define L2CAP_CMD_CONNECTION_REQUEST
Definition: BTD.h:166
uint8_t RegisterDeviceClass(USBDeviceConfig *pdev)
Definition: UsbCore.h:196
@@ -1626,17 +1623,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define hci_clear_flag(flag)
Definition: BTD.h:76
USB * pUsb
Definition: BTD.h:533
#define NotifyStr(...)
Definition: message.h:45
-
void hci_authentication_request()
Definition: BTD.cpp:1135
-
void hci_read_local_version_information()
Definition: BTD.cpp:967
+
void hci_authentication_request()
Definition: BTD.cpp:1132
+
void hci_read_local_version_information()
Definition: BTD.cpp:964
#define HCI_FLAG_REMOTE_NAME_COMPLETE
Definition: BTD.h:66
-
void hci_accept_connection()
Definition: BTD.cpp:976
+
void hci_accept_connection()
Definition: BTD.cpp:973
#define EV_PAGE_SCAN_REP_MODE
Definition: BTD.h:100
#define HCI_FLAG_DEVICE_FOUND
Definition: BTD.h:70
#define HCI_CLASS_STATE
Definition: BTD.h:44
uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr)
defined(USB_METHODS_INLINE)
Definition: Usb.cpp:761
#define NotifyFailSetDevTblEntry(...)
Definition: message.h:51
#define USB_ERROR_CONFIG_REQUIRES_ADDITIONAL_RESET
Definition: UsbCore.h:72
-
void HCI_Command(uint8_t *data, uint16_t nbytes)
Definition: BTD.cpp:922
+
void HCI_Command(uint8_t *data, uint16_t nbytes)
Definition: BTD.cpp:919
Definition: usb_ch9.h:98
diff --git a/_b_t_d_8h.html b/_b_t_d_8h.html index 7e8ccfbd..6c40d86d 100644 --- a/_b_t_d_8h.html +++ b/_b_t_d_8h.html @@ -105,7 +105,7 @@ This graph shows which files directly or indirectly include this file:
- +

Go to the source code of this file.

@@ -353,8 +353,8 @@ Macros   #define BTD_MAX_ENDPOINTS   4   -#define BTD_NUMSERVICES   4 -  +#define BTD_NUM_SERVICES   4 +  #define PAIR   1   #define UHS_ACL_HANDLE_OK(x, y)   ((x[0] == (y & 0xff)) && (x[1] == ((y >> 8) | 0x20))) @@ -2023,12 +2023,12 @@ Macros - +
- +
#define BTD_NUMSERVICES   4#define BTD_NUM_SERVICES   4
diff --git a/_b_t_d_8h__dep__incl.map b/_b_t_d_8h__dep__incl.map index 792f0e4d..23dd3813 100644 --- a/_b_t_d_8h__dep__incl.map +++ b/_b_t_d_8h__dep__incl.map @@ -1,13 +1,12 @@ - - - + + + - - - - + + + diff --git a/_b_t_d_8h__dep__incl.md5 b/_b_t_d_8h__dep__incl.md5 index 01d32675..c136623d 100644 --- a/_b_t_d_8h__dep__incl.md5 +++ b/_b_t_d_8h__dep__incl.md5 @@ -1 +1 @@ -359d0fb9802ea91c25ab343278928ac0 \ No newline at end of file +a586d33041837831328e4bd5a24cb1bb \ No newline at end of file diff --git a/_b_t_d_8h__dep__incl.png b/_b_t_d_8h__dep__incl.png index 7b28b3304af420bb60040c2dc31ae26e06226c9d..8d7511cee8466c2e1933b91e5380fc0d3a3046d8 100644 GIT binary patch literal 17818 zcmX_|Wk4Lkl7Mk{cMXuRAvnQd< znV#yZ>gxKc2vLv|M@Jz+fr5fUmz4Ob1O)|s0KD!&LI8f|M;`ouf)av~{3@*C3VouB zn2Ogo#e5oRx19e1X4aZ-J4>y5GYG#&ay;i9OukABDd`heV;p zQmlw7w z6F|{;694}J791W-cWxdn5{$nu6%`T^48b>{#M*D9Vxe@voB#bRHbL<1FaLR?fd_3k zMPNluxfzN)w!vg*$v_xa~a1B0OtYOe?a-g$D#mQS?Hyx1>4MNLWY5F1lL3~gQ ztCAV!pcihqJ%WKQ3LP$iNn6Zi&Fk}Qnf9N~PNO6iY|SbocqZNExWm~J!eQ0;W@MNk zDk>0I)FAFFoZnyUec2+55_VSc|Af1K4sy_VpS5rR5MtYL4HsD|D0ju z;C@Q-W&K9||7Y*iLPCnISM!hn|3?sS@?Zd-JWb(m;Qv2~0Tb{Y?Gk}pj{lQ|zb`KE zv~usaMgCu0z>T_d%VsH*Nd9}>5Z{IWy-_Cx(n_maY!D{psoKKvVvTYKHC)6-gy57F=iuj)Zc7T;A2*xUz!-o5|nbe$HpBvK8$QjH9VM$|mSy z-dp|XHx1s;?plp@SyvPrnUp?H(HLahLIz8j=%id&WW{LYym9C4%v!CktmM3of9GkD zaRE`_V*QS;CYyfjy%&!pi~FS8EHt^D1jzTRuWxBC zEtI?-K3wU~&Y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index c6e00629..d3242b15 100644 --- a/_b_t_d_8h_source.html +++ b/_b_t_d_8h_source.html @@ -278,7 +278,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
187 #define WI_PROTOCOL_BT 0x01 // Bluetooth Programming Interface
188 
189 #define BTD_MAX_ENDPOINTS 4
-
190 #define BTD_NUMSERVICES 4 // Max number of Bluetooth services - if you need more than 4 simply increase this number
+
190 #define BTD_NUM_SERVICES 4 // Max number of Bluetooth services - if you need more than 4 simply increase this number
191 
192 #define PAIR 1
193 
@@ -338,13 +338,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
306  };
318  virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep);
322  void disconnect() {
-
323  for(uint8_t i = 0; i < BTD_NUMSERVICES; i++)
+
323  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++)
324  if(btService[i])
325  btService[i]->disconnect();
326  };
327 
-
334  for(uint8_t i = 0; i < BTD_NUMSERVICES; i++) {
+
334  for(uint8_t i = 0; i < BTD_NUM_SERVICES; i++) {
335  if(!btService[i]) {
336  btService[i] = pService;
337  return i; // Return ID
@@ -391,7 +391,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
485  uint8_t my_bdaddr[6];
487  uint16_t hci_handle;
489  uint8_t disc_bdaddr[6];
-
491  uint8_t remote_name[30];
+
491  char remote_name[30];
497  uint8_t hci_version;
498 
@@ -434,7 +434,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
564 
565 private:
566  void Initialize(); // Set all variables, endpoint structs etc. to default values
-
567  BluetoothService* btService[BTD_NUMSERVICES];
+
568 
569  uint16_t PID, VID; // PID and VID of device connected
570 
@@ -445,15 +445,15 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
575  uint8_t classOfDevice[3]; // Class of device of last device
576 
577  /* Variables used by high level HCI task */
-
578  uint8_t hci_state; //current state of bluetooth hci connection
-
579  uint16_t hci_counter; // counter used for bluetooth hci reset loops
-
580  uint16_t hci_num_reset_loops; // this value indicate how many times it should read before trying to reset
-
581  uint16_t hci_event_flag; // hci flags of received bluetooth events
+
578  uint8_t hci_state; // Current state of Bluetooth HCI connection
+
579  uint16_t hci_counter; // Counter used for Bluetooth HCI reset loops
+
580  uint16_t hci_num_reset_loops; // This value indicate how many times it should read before trying to reset
+
581  uint16_t hci_event_flag; // HCI flags of received Bluetooth events
582  uint8_t inquiry_counter;
583 
-
584  uint8_t hcibuf[BULK_MAXPKTSIZE]; //General purpose buffer for hci data
-
585  uint8_t l2capinbuf[BULK_MAXPKTSIZE]; //General purpose buffer for l2cap in data
-
586  uint8_t l2capoutbuf[14]; //General purpose buffer for l2cap out data
+
584  uint8_t hcibuf[BULK_MAXPKTSIZE]; // General purpose buffer for HCI data
+
585  uint8_t l2capinbuf[BULK_MAXPKTSIZE]; // General purpose buffer for L2CAP in data
+
586  uint8_t l2capoutbuf[14]; // General purpose buffer for L2CAP out data
587 
588  /* State machines */
589  void HCI_event_task(); // Poll the HCI event pipe
@@ -467,41 +467,42 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
597 #endif
static const uint8_t BTD_DATAOUT_PIPE
Definition: BTD.h:557
bool incomingWii
Definition: BTD.h:507
-
void hci_connect()
Definition: BTD.cpp:1045
+
void hci_connect()
Definition: BTD.cpp:1042
uint8_t bNumEP
Definition: BTD.h:546
const char * btdName
Definition: BTD.h:480
-
void hci_reset()
Definition: BTD.cpp:927
-
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
Definition: BTD.cpp:1234
-
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
Definition: BTD.cpp:1221
+
void hci_reset()
Definition: BTD.cpp:924
+
void l2cap_connection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid, uint8_t result)
Definition: BTD.cpp:1231
+
void l2cap_connection_request(uint16_t handle, uint8_t rxid, uint8_t *scid, uint16_t psm)
Definition: BTD.cpp:1218
bool sdpConnectionClaimed
Definition: BTD.h:475
Definition: BTD.h:230
virtual boolean DEVCLASSOK(uint8_t klass)
Definition: BTD.h:287
-
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1287
+
void l2cap_disconnection_request(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1284
bool rfcommConnectionClaimed
Definition: BTD.h:477
uint8_t hci_version
Definition: BTD.h:497
-
void hci_inquiry()
Definition: BTD.cpp:1023
+
void hci_inquiry()
Definition: BTD.cpp:1020
static const uint8_t BTD_EVENT_PIPE
Definition: BTD.h:553
#define PS3MOVE_PID
Definition: BTD.h:27
bool pairWithWii
Definition: BTD.h:509
-
void hci_write_scan_disable()
Definition: BTD.cpp:949
+
void hci_write_scan_disable()
Definition: BTD.cpp:946
virtual void EndpointXtract(uint8_t conf, uint8_t iface, uint8_t alt, uint8_t proto, const USB_ENDPOINT_DESCRIPTOR *ep)
Definition: BTD.cpp:314
virtual uint8_t GetAddress()
Definition: BTD.h:270
+
#define BTD_NUM_SERVICES
Definition: BTD.h:190
const char * btdPin
Definition: BTD.h:482
bool motionPlusInside
Definition: BTD.h:511
-
void hci_remote_name()
Definition: BTD.cpp:992
-
uint8_t remote_name[30]
Definition: BTD.h:491
+
void hci_remote_name()
Definition: BTD.cpp:989
#define PS3_VID
Definition: BTD.h:24
BTD(USB *p)
Definition: BTD.cpp:27
+
char remote_name[30]
Definition: BTD.h:491
uint8_t readPollInterval()
Definition: BTD.h:531
virtual void Reset()
static const uint8_t BTD_DATAIN_PIPE
Definition: BTD.h:555
-
void hci_set_local_name(const char *name)
Definition: BTD.cpp:1011
-
void hci_write_scan_enable()
Definition: BTD.cpp:936
+
void hci_set_local_name(const char *name)
Definition: BTD.cpp:1008
+
void hci_write_scan_enable()
Definition: BTD.cpp:933
virtual uint8_t Release()
Definition: BTD.cpp:365
-
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1300
+
void l2cap_disconnection_response(uint16_t handle, uint8_t rxid, uint8_t *dcid, uint8_t *scid)
Definition: BTD.cpp:1297
#define USB_CLASS_WIRELESS_CTRL
Definition: UsbCore.h:55
bool watingForConnection
Definition: BTD.h:471
bool connectToHIDDevice
Definition: BTD.h:519
@@ -518,10 +519,10 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
virtual uint8_t Init(uint8_t parent, uint8_t port, bool lowspeed)
Definition: BTD.cpp:122
Definition: address.h:32
void pairWithHID()
Definition: BTD.h:516
-
void hci_disconnect(uint16_t handle)
Definition: BTD.cpp:1145
+
void hci_disconnect(uint16_t handle)
Definition: BTD.cpp:1142
-
void hci_read_bdaddr()
Definition: BTD.cpp:958
-
void hci_inquiry_cancel()
Definition: BTD.cpp:1037
+
void hci_read_bdaddr()
Definition: BTD.cpp:955
+
void hci_inquiry_cancel()
Definition: BTD.cpp:1034
uint8_t my_bdaddr[6]
Definition: BTD.h:485
virtual uint8_t Poll()
Definition: BTD.cpp:371
virtual boolean VIDPIDOK(uint16_t vid, uint16_t pid)
Definition: BTD.h:298
@@ -538,27 +539,26 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
#define PS3_PID
Definition: BTD.h:25
#define BTD_MAX_ENDPOINTS
Definition: BTD.h:189
#define PS3NAVIGATION_PID
Definition: BTD.h:26
-
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
Definition: BTD.cpp:1313
-
void hci_write_class_of_device()
Definition: BTD.cpp:1157
-
void hci_pin_code_negative_request_reply()
Definition: BTD.cpp:1107
+
void l2cap_information_response(uint16_t handle, uint8_t rxid, uint8_t infoTypeLow, uint8_t infoTypeHigh)
Definition: BTD.cpp:1310
+
void hci_write_class_of_device()
Definition: BTD.cpp:1154
+
void hci_pin_code_negative_request_reply()
Definition: BTD.cpp:1104
#define HCI_CHECK_DEVICE_SERVICE
Definition: BTD.h:48
Definition: UsbCore.h:176
virtual void Run()
uint8_t bConfNum
Definition: BTD.h:544
-
void hci_link_key_request_negative_reply()
Definition: BTD.cpp:1121
+
void hci_link_key_request_negative_reply()
Definition: BTD.cpp:1118
void pairWithWiimote()
Definition: BTD.h:500
virtual bool isReady()
Definition: BTD.h:278
-
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
Definition: BTD.cpp:1193
-
#define BTD_NUMSERVICES
Definition: BTD.h:190
-
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
Definition: BTD.cpp:1268
-
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
Definition: BTD.cpp:1251
-
void hci_pin_code_request_reply()
Definition: BTD.cpp:1071
+
void L2CAP_Command(uint16_t handle, uint8_t *data, uint8_t nbytes, uint8_t channelLow=0x01, uint8_t channelHigh=0x00)
Definition: BTD.cpp:1190
+
void l2cap_config_response(uint16_t handle, uint8_t rxid, uint8_t *scid)
Definition: BTD.cpp:1265
+
void l2cap_config_request(uint16_t handle, uint8_t rxid, uint8_t *dcid)
Definition: BTD.cpp:1248
+
void hci_pin_code_request_reply()
Definition: BTD.cpp:1068
virtual void disconnect()
USB * pUsb
Definition: BTD.h:533
-
void hci_authentication_request()
Definition: BTD.cpp:1135
-
void hci_read_local_version_information()
Definition: BTD.cpp:967
-
void hci_accept_connection()
Definition: BTD.cpp:976
-
void HCI_Command(uint8_t *data, uint16_t nbytes)
Definition: BTD.cpp:922
+
void hci_authentication_request()
Definition: BTD.cpp:1132
+
void hci_read_local_version_information()
Definition: BTD.cpp:964
+
void hci_accept_connection()
Definition: BTD.cpp:973
+
void HCI_Command(uint8_t *data, uint16_t nbytes)
Definition: BTD.cpp:919