Game Development Reference
In-Depth Information
Dissecting the Wiimote
If you wish to provide external controller support in your game, you must include the
Wiimote, which at tens of millions of units sold is the most popular controller. Luckily,
Nintendo has made it quite easy to integrate the Wiimote into your game thanks to
Bluetooth. This section covers the Wiimote in more detail, including the following aspects:
Inquiry process : This is used to gather information about the device.
Device connection : This section describes the Data and Control Pipes
used to send messages to the controller.
Report types : These are some of the messages supported by the
Wiimote to receive button information, LED status, and other controller
tricks.
But first, we need to make the Wiimote accessible by a host via the standard Bluetooth
protocol API. To do so the Wiimote must be placed in discoverable mode by pressing the
SYNC button on its back under the battery cover or holding down the 1 and 2 buttons
continuously (see Figure 8-1 ).
Move
A
Plus
Home
One
Two
Figure 8-1. When in discoverable mode, the LEDs at the base of the controller will blink
Inquiry Process
To kick things off, the host can perform a Bluetooth device inquiry to find all discoverable
nearby Wiimotes. With this information, the host can establish a Bluetooth baseband
connection to the Wiimote; no Bluetooth pairing is necessary.
The Wiimote can be queried with the Bluetooth service discovery protocol (SDP) and it will
report back the information in Table 8-1 .
 
Search WWH ::




Custom Search