Game Development Reference
In-Depth Information
When communicating with a Wiimote, a device understands a series of reports. Reports can
be of two types: Input or Output. Think of a report as a network port assigned to a particular
service. Reports are unidirectional (Input or Output), and the HID descriptor lists the direction
and the payload size for each port. Table 8-2 shows some of the reports the Wiimote supports.
Table 8-2. Wiimote Report Types and Sizes (I=Input, O=Output)
I/O
ID(s)
Size
Description
O
0x10
1
Unknown
O
0x11
1
Player LEDs
O
0x12
2
Data reporting mode
O
0x13
1
IR camera enable
O
0x14
1
Speaker enable
O
0x15
1
Status information request
O
0x16
21
Write memory and registers
O
0x17
6
Read memory and registers
O
0x18
21
Speaker data
O
0x19
1
Speaker mute
O
0x1a
1
IR camera enable 2
I
0x20
6
Status information
I
0x21
21
Read memory and registers data
I
0x22
4
Acknowledge output report, return function result
I
0x30-0x3f
2-21
Data reports
Internally, I/O reports are encoded as a hexadecimal array of bytes. Input reports always
begin with (0xa1) and output reports with (0xa2). To request a given report, the host must
simply send an array of bytes for the report type through the Data Pipe. The next several
sections provide some examples of the most useful reports.
Device Status
A status report is commonly used to get information about the core buttons, battery level,
LED state, and whether an expansion is currently connected. To request a status report, you
need to send the following array of bytes over the Data Pipe:
a2 15 00
The first byte, 0xa2, indicates the report type (Output), 0x15 is the report name (device status),
and 0x00 is the payload.
 
 
Search WWH ::




Custom Search