Line 130:
Line 130:
== HID Interface ==
== HID Interface ==
−
Establishing a HID connection can be done on PSM 0x11 for writing and PSM 0x13 for reading using the Bluetooth L2CAP protocol. On Windows you don't need to deal with L2CAP yourself, and can use high-level windows HID functions.
+
Establishing a HID connection with the Wii Remote can be done on PSM 0x11 for writing and PSM 0x13 for reading using the Bluetooth L2CAP protocol. On Windows you don't need to deal with L2CAP yourself, and can use high-level windows HID functions. Wii Remote Plus controllers which that identify as "Nintendo RVL-CNT-01-TR" use PSM 0x13 for writing, as opposed to PSM 0x11; they also use PSM 0x11 for reading.
The HID standard allows devices to be self-describing, using a HID descriptor block. This block includes an enumeration of reports that the device understands. A report can be thought of similar to a network port assigned to a particular service. Reports are unidirectional however, and the HID descriptor lists for each port the direction (Input or Output) and the payload size for each port. Like all Bluetooth HID devices, the Wii Remote reports its HID descriptor block when queried using the SDP protocol. However, no information regarding the actual data units within each report is returned, only the length in bytes.
The HID standard allows devices to be self-describing, using a HID descriptor block. This block includes an enumeration of reports that the device understands. A report can be thought of similar to a network port assigned to a particular service. Reports are unidirectional however, and the HID descriptor lists for each port the direction (Input or Output) and the payload size for each port. Like all Bluetooth HID devices, the Wii Remote reports its HID descriptor block when queried using the SDP protocol. However, no information regarding the actual data units within each report is returned, only the length in bytes.
−
Note: An "Input" report is sent by the Wii Remote to the host. An "Output" report is sent by the host to the Wii Remote.
+
Note: An "Input" report is sent by the Wii Remote to the host. An "Output" report is sent by the host to the Wii Remote. When using a Wii Remote, all input reports are prepended with 0xa1 and all output reports are prepended with 0x52; this is the "(52)" in many example reports below. When using a Wii Remote Plus that identifies as "Nintendo RVL-CNT-01-TR", all output reports must be prepended with 0xa2 instead of 0x52.
These are the reports the Wii Remote uses, and their use:
These are the reports the Wii Remote uses, and their use: