Welcome! Log In Create A New Profile

Advanced

USB mass storage woes

Posted by JuanCierva 
USB mass storage woes
September 07, 2009 11:53AM
Hello

I'm tryin to make code to control an USB hard drive. I'm using libogc 1.7.1. Problem is, all CBWs are ETIMEDOUT (something like that). I get the descriptors, find out the vendor and product ID, all looks good, then send the first CBW, and bam, always return time-out error. Retry will time out. Send other command (test unit ready, inquire, req. sense), all time-out.

I try send USB_ResetDevice, inside it calls some IOS IOCtl, returns 8. I have no idea what it means. After reseting, CBWs continue time-out.

Can anybody refer an example, how to use libogc usbstorage.c, so I compare what I do wrong?

Thx!
Re: USB mass storage woes
September 09, 2009 11:30AM
What do you want? If you want access to the files on the 1st FAT partition, try this:
#include

__io_usbstorage.startup();
fatMountSimple("usb", &__io_usbstorage);

[...]
fp = fopen("usb:/test.bin", "rb");
[...]

fatUnmount("usb");
__io_usbstorage.shutdown();

If you can't access the files with this, your usb device seems to be not compatible.
Re: USB mass storage woes
September 09, 2009 12:26PM
Thanks for reply. I want to make work this USB drive that is "not compatible". I cant figure out why it is not compatible, when Windows can read/write it just fine. Why is Wii so picky??? Is because it has limited memory, and its USB code cant do extra checks/delays to compatible more USB drfives?

You say to try mount FAT partition. I know I will fail, because the problem below is, commands to the disk are failing. If command to read sectors fail (time out), then no way can mount FAT. I wonder if there are sources for evne lower level, like sending frames / transactions to USB. This code is inside IOS yes?
Sorry, only registered users may post in this forum.

Click here to login