Line 79:
Line 79:
Now "pin" contains your bluetooth pin that should be used for pairing your devices.
Now "pin" contains your bluetooth pin that should be used for pairing your devices.
</pre>
</pre>
+
+
If connecting by holding down the 1+2 buttons, the PIN is the bluetooth address of the wiimote backwards, if connecting by pressing the "sync" button on the back of the wiimote, then the PIN is the bluetooth address of the host backwards.
After sending the PIN to the bluetooth device via HCI commands, the wiimote will return a "Authentication Accepted" command and the pairing is established (both devices are '''bonded''' now). After pairing you continue with [[#HID Interface | establishing the HID connection]] the ''same way as without pairing''.
After sending the PIN to the bluetooth device via HCI commands, the wiimote will return a "Authentication Accepted" command and the pairing is established (both devices are '''bonded''' now). After pairing you continue with [[#HID Interface | establishing the HID connection]] the ''same way as without pairing''.