Line 2:
Line 2:
[[Category:Wii U Filesystem]]
[[Category:Wii U Filesystem]]
/dev/usb/btrm is the IOSU device node for the internal Bluetooth module. It provides an interface to communicate with the Wii Remote, Wii Balance Board, and Wii U Pro controller, which is exposed to Cafe OS by [[padscore.rpl]]. Inside IOSU, it uses [[:/dev/uhs|/dev/uhs/1]] to talk to the Bluetooth module, which is connected via internal USB.
/dev/usb/btrm is the IOSU device node for the internal Bluetooth module. It provides an interface to communicate with the Wii Remote, Wii Balance Board, and Wii U Pro controller, which is exposed to Cafe OS by [[padscore.rpl]]. Inside IOSU, it uses [[:/dev/uhs|/dev/uhs/1]] to talk to the Bluetooth module, which is connected via internal USB.
+
+
==ioctl() interface==
+
===0x01 - Init smd===
+
Initializes the Simply Message Dequeue(?) used to send HID packages between the IOSU and PPC.
+
===0x02 - Create disconnect timer===
+
===0x03===
+
Sends an event to the resource queue
+
===0x04 - Isolate channels===
+
Sets the afh channels
+
===0x05 - Sys update===
+
Flashes a bluetooth firmware image
+
===0x06 - Init OHCI===
+
===0x07 - Report process data===
+
===0x08 - Set devInfo===
+
===0x09 - BT Disconnect===
+
===0x0a - Set btConfig===
==ioctlv() interface==
==ioctlv() interface==
Line 11:
Line 27:
This structure identifies which function call to make. It is 0x1008 bytes long, with a request buffer passed to each function. The main identifiers for a function call are two bytes, a library and a function.
This structure identifies which function call to make. It is 0x1008 bytes long, with a request buffer passed to each function. The main identifiers for a function call are two bytes, a library and a function.
<syntaxhighlight lang="C">
<syntaxhighlight lang="C">
−
/* Function identifier */
+
/* Function request */
typedef struct
typedef struct
{
{
Line 63:
Line 79:
| 0x05
| 0x05
|
|
−
| Waits for an event from the resource queue
+
| Sends a message to the resource queue and waits for a reply
|}
|}