From d445689813810721cd85adc4126fa1fb46d0e5c0 Mon Sep 17 00:00:00 2001 From: Kristian Lauszus Date: Sun, 7 Oct 2012 19:44:27 +0200 Subject: [PATCH] Fixed bug when pairing --- BTD.cpp | 12 ++++++------ BTD.h | 0 Wii.cpp | 0 Wii.h | 0 4 files changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 BTD.cpp mode change 100644 => 100755 BTD.h mode change 100644 => 100755 Wii.cpp mode change 100644 => 100755 Wii.h diff --git a/BTD.cpp b/BTD.cpp old mode 100644 new mode 100755 index a7a9f986..96d6d4aa --- a/BTD.cpp +++ b/BTD.cpp @@ -869,12 +869,12 @@ void BTD::hci_pin_code_request_reply() { hcibuf[8] = disc_bdaddr[5]; if(pairWithWii) { hcibuf[9] = 6; // Pin length is the length of the bt address - hcibuf[10] = disc_bdaddr[5]; // The pin is the Wiimotes bt address backwards - hcibuf[11] = disc_bdaddr[4]; - hcibuf[12] = disc_bdaddr[3]; - hcibuf[13] = disc_bdaddr[2]; - hcibuf[14] = disc_bdaddr[1]; - hcibuf[15] = disc_bdaddr[0]; + hcibuf[10] = disc_bdaddr[0]; // The pin is the Wiimotes bt address backwards + hcibuf[11] = disc_bdaddr[1]; + hcibuf[12] = disc_bdaddr[2]; + hcibuf[13] = disc_bdaddr[3]; + hcibuf[14] = disc_bdaddr[4]; + hcibuf[15] = disc_bdaddr[5]; for(uint8_t i = 16; i < 26; i++) hcibuf[i] = 0x00; // The rest should be 0 } else { diff --git a/BTD.h b/BTD.h old mode 100644 new mode 100755 diff --git a/Wii.cpp b/Wii.cpp old mode 100644 new mode 100755 diff --git a/Wii.h b/Wii.h old mode 100644 new mode 100755