I used the d2X CIOS with several USB memory sticks.
Everything was working fine but unfortunately I start having problems when I tried to use the USB port to access the HDD of
my Emtec movie cube.
It would be so nice for me to be able to access the HDD inside it (I have placed it just on the side of the wii console...)
that I didn't give up and I started study why this USB HDD was now working.
(At this point I have to thank davebaol and the others coders for having released the source code of the CIOS...)
After several nights of tests I found the reason(s) why the CIOS was not working with this USB HDD and modified the ehci
module to let it work.
I release the modified CIOS and the source code, maybe this can help other people with "problematic" HDDs.
You can find them here...
http://www.hackwii.i...20058-1400.html
For who are interested in technical details:
There were two problems:
The first problem was related to a strange way to answer to the __usb_getdesc(fd, buffer, USB_DT_CONFIG, iConf,
ucd->wTotalLength) function in USB_GetDescriptors().
In my case between the configration descriptor and the interface descriptors there were 3 bytes of an "OTG"
descriptor (Id=09).
Here is the dump of the answer:
There are the 9 bytes of the configuration descriptor (id=02) followed by the 3 unexpected bytes...
The result of a lsusb command:
The original code was not handling this and everything was going wrong without finding the interface descriptord anymore.
The second problem was in the USBStorage_ReadCapacity function.
Specs defines that SCSI_READ_CAPACITY has a Command Descriptor Block that is 10 bytes long.
http://www.usb.org/d...bmass-ufi10.pdf PAG 32
http://en.wikipedia....apacity_Command
My Emtec HDD was strictly requiring that, while the ofiginal ehci code was sending only the first 2 nonzero bytes.
After fixing this two things in the ehci module everything was working.
Hope this can help.
Everything was working fine but unfortunately I start having problems when I tried to use the USB port to access the HDD of
my Emtec movie cube.
It would be so nice for me to be able to access the HDD inside it (I have placed it just on the side of the wii console...)
that I didn't give up and I started study why this USB HDD was now working.
(At this point I have to thank davebaol and the others coders for having released the source code of the CIOS...)
After several nights of tests I found the reason(s) why the CIOS was not working with this USB HDD and modified the ehci
module to let it work.
I release the modified CIOS and the source code, maybe this can help other people with "problematic" HDDs.
You can find them here...
http://www.hackwii.i...20058-1400.html
For who are interested in technical details:
There were two problems:
The first problem was related to a strange way to answer to the __usb_getdesc(fd, buffer, USB_DT_CONFIG, iConf,
ucd->wTotalLength) function in USB_GetDescriptors().
In my case between the configration descriptor and the interface descriptors there were 3 bytes of an "OTG"
descriptor (Id=09).
Here is the dump of the answer:
There are the 9 bytes of the configuration descriptor (id=02) followed by the 3 unexpected bytes...
Code:
Configuration descr. OTG Interface descriptor Endpoint descriptors...
C Ci:1:008:0 0 35 = 09022300 010104e0 01030903 09040000 02080650 05 070581 02000200 07050102
1 2 3 4 5 6 7 8 9 ^^^^^^ 1 2 3 4 5 6 7 8 9
The result of a lsusb command:
Code:
Bus 001 Device 005: ID 0525:a4a5 Netchip Technology, Inc. Linux-USB File Storage Gadget
libusb couldn't open USB device /dev/bus/usb/001/005: Permission denied.
libusb requires write access to USB device nodes.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0525 Netchip Technology, Inc.
idProduct 0xa4a5 Linux-USB File Storage Gadget
bcdDevice 3.99
iManufacturer 1
iProduct 2
iSerial 3
bNumConfigurations 1
OTG Descriptor:
bLength 3
bDescriptorType 9
bmAttributes 0x03
SRP (Session Request Protocol)
HNP (Host Negotiation Protocol)
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 35
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 4
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 2mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk (Zip)
iInterface 5
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
The original code was not handling this and everything was going wrong without finding the interface descriptord anymore.
The second problem was in the USBStorage_ReadCapacity function.
Specs defines that SCSI_READ_CAPACITY has a Command Descriptor Block that is 10 bytes long.
http://www.usb.org/d...bmass-ufi10.pdf PAG 32
http://en.wikipedia....apacity_Command
My Emtec HDD was strictly requiring that, while the ofiginal ehci code was sending only the first 2 nonzero bytes.
After fixing this two things in the ehci module everything was working.
Hope this can help.