Difference between revisions of "/dev/usb/oh0"

From WiiBrew
< /dev‎ | usb
Jump to: navigation, search
m (Formatting)
(Add some ioctlvs)
Line 1: Line 1:
 
==Description==
 
==Description==
 
/dev/usb/oh0 is the external USB bus in the Wii
 
/dev/usb/oh0 is the external USB bus in the Wii
 +
 +
This interface is very similar to OH1.
 +
 +
== Host device (/dev/usb/oh0) ==
 +
{| class="wikitable"
 +
|-
 +
! Ioctl !! Name !! Input !! Output
 +
! Notes
 +
|-
 +
| 12 (ioctlv) || [https://github.com/devkitPro/libogc/blob/b8c0882a73de7833467a844e9adebb9ff8768ba5/libogc/usb.c#L1370 USBV0_IOCTL_GETDEVLIST] || 2 || 2
 +
|
 +
* in 0: u8 - number of descriptors to return
 +
* in 1: u8 - interface class
 +
* out 0: u8 - number of devices
 +
* out 1: u32* of size num_descriptors * 8 - device list
 +
 +
|-
 +
| 27 (ioctlv) || USBV0_IOCTL_DEVINSERTHOOK || 2 || 0
 +
|
 +
Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.
 +
* in 0: u16 - VID
 +
* in 1: u16 - PID
 +
 +
|-
 +
| 30 (ioctlv) || ? || 3 || 1
 +
|
 +
Unknown.
 +
* in 0: u16 - VID
 +
* in 1: u16 - PID
 +
* in 2: u8 - Unknown (00)
 +
* out 0: u8* of size 4 - Unknown (00 a3 f4 c0 -- for 046d:0a03)
 +
|}
  
 
== Known Devices ==
 
== Known Devices ==

Revision as of 20:26, 11 November 2016

Description

/dev/usb/oh0 is the external USB bus in the Wii

This interface is very similar to OH1.

Host device (/dev/usb/oh0)

Ioctl Name Input Output Notes
12 (ioctlv) USBV0_IOCTL_GETDEVLIST 2 2
  • in 0: u8 - number of descriptors to return
  • in 1: u8 - interface class
  • out 0: u8 - number of devices
  • out 1: u32* of size num_descriptors * 8 - device list
27 (ioctlv) USBV0_IOCTL_DEVINSERTHOOK 2 0

Returns when a device with the requested VID/PID is plugged in, or immediately if the device is already inserted.

  • in 0: u16 - VID
  • in 1: u16 - PID
30 (ioctlv) ? 3 1

Unknown.

  • in 0: u16 - VID
  • in 1: u16 - PID
  • in 2: u8 - Unknown (00)
  • out 0: u8* of size 4 - Unknown (00 a3 f4 c0 -- for 046d:0a03)

Known Devices

  • /dev/usb/oh0/0b95/7720: ASIX AX88772 USB2.0 to Fast Ethernet Adapter (referenced in IOS eth driver)
  • /dev/usb/oh0/57e/308: Nintendo Wii Speak (microphone)

Errors

-4 (IPC_EINVAL): might be caused by an invalid device fd

-7003: STALL (according to gc-linux)

-7004: STALL (according to gc-linux)

-7005: NAK (according to gc-linux)

-7008

-7022