Usb Host


fells

Still Fresh
Joined
Jul 6, 2009
Messages
39
Did a search on this forum for "USB Host" and found a lot of people saying (earlier this year) that the kernel build on the devboards did not have USB host support baked in. But does the release Wizzes? I have the pinout with the +/- pins identified and will try to wire up a cable. But will this do anything? Has anyone used USB Host on a release Wiz?
 
I just came around to try it and what do you know, it works!

Code:
Using /lib/modules/2.6.24/kernel/drivers/usb/core/usbcore.ko
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Using /lib/modules/2.6.24/kernel/drivers/usb/host/ohci-hcd.ko
pollux-hcd pollux-hcd.0: POLLUX OHCI
pollux-hcd pollux-hcd.0: new USB bus registered, assigned bus number 1
pollux-hcd pollux-hcd.0: irq 28, io mem 0xf000d000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: Product: POLLUX OHCI
usb usb1: Manufacturer: Linux 2.6.24 ohci_hcd
usb usb1: SerialNumber: pollux
Using /lib/modules/2.6.24/kernel/drivers/hid/hid.ko
usb 1-1: new low speed USB device using pollux-hcd and address 2
Using /lib/modules/2.6.24/kernel/drivers/hid/usbhid/usbhid.ko
usb 1-1: configuration #1 chosen from 1 choice
usb 1-1: Product: 2Axes 10Keys Game  Pad
usbcore: registered new interface driver hiddev
input,hidraw0: USB HID v1.10 Gamepad [2Axes 10Keys Game  Pad] on usb-pollux-1
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver

root@wiz:/usr/gp2x# ls -l /dev/input/
crw-r-----    1 root     root      13,  64 Jan  1  1970 event0
crw-r-----    1 root     root      13,  65 Jul 28 22:59 event1
crw-r--r--    1 root     root      13,  63 Jan  1  1970 mice
crw-r--r--    1 root     root      13,  32 Jan  1  1970 mouse0
root@wiz:/usr/gp2x# cd /mnt/sd/stuff/
root@wiz:/mnt/sd/stuff# ./evtest /dev/input/event1 
Input driver version is 1.0.0
Input device ID: bus 0x3 vendor 0x12bd product 0xd014 version 0x110
Input device name: "2Axes 10Keys Game  Pad"

As you can see it detects my generic gamepad. It can control GPH menu and it even works in my PicoDrive WIP version! I have scans of my devboard here, if anyone wants to clone the USB part:
http://notaz.gp2x.de/img/hw/gp2x_wiz_devboard_front.jpg
http://notaz.gp2x.de/img/hw/gp2x_wiz_devboard_back.jpg
note it's a prototype Wiz so I don't know if it works on the final.
 
Very interesting! Nice find, notaz. A German forum member got an email from GPH claiming that the USB host mode is not working yet. :D
 
Oh man, awesome!! I got my USB cable soldered last night but didn't even try to use it because I assumed it wouldn't work. This is great news, I'll report back
 
Yep, confirmed works for me too. I also tried a usb gamepad which let me control the menu. A USB sound card lit up and was recognized but probably needed some kernel modules insmod'd before they would work, but I'll keep playing.

I just wired USB-, USB+, ground and 5+ from the Wiz, no extra components. Sadly the +5V pin of my connector broke when I was soldering it up so I have to get 5V from my computer for now, but I'm getting another connector set on the way...
 
Nice. Do you use the same pin-out described here? I guess you have a retail Wiz? Firmware 1.1.0?

http://www.gp32x.de/board/index.php?/topic/47776-wiz-ext-pinout/page__view__findpost__p__727072
 
Last edited by a moderator:
Yep, I used sbock's / andy's pinout for both this and my serial connection. I now have a cable that's got USB slave male and USB host female on one end and wiz connector on the other. The usb slave is for serial, the host is for whatever.

Yes, release Wiz 1.1.0 firmware.

USB MIDI should "just work" provided the usbmidi driver was compiled into their kernel. I have a usb midi adapter at work, I'll bring it home and try it tonight hopefully.
 
Wait, does the USB Slave->Serial "just work" as well .. in other words, there is a usb-serial gadget driver being loaded, but we can't get to it because we don't have the cable? That is handy to know because it means in order to get a console, I can just wire up the USB Slave pins, and not have to bother with the MAXRS232 TTL conversion components for plain ol' serial, not that it would be *bad* to have it, just that its easier to add without needing any further components.

As for USB MIDI, it'd be great to know whats up with that .. I guess I'm going to have to build my own cable in the meantime, though. Sure wish there was a 'full breakout' cable available by now, alas ..
 
Ah no, I meant my cable goes from serial TX/RX (3.3V) to a FT USB board that converts those to USB serial for console. I have a post on the developer forum called something like "build your own cable for $25" last week that describes it. The board is tiny, is $14, does everything you need-- you just wire TX, RX and ground from the wiz to the pins on the little board and the other end of the little board is a mini-USB jack. Very simple.
 
fells said:
Yep, I used sbock's / andy's pinout for both this and my serial connection. I now have a cable that's got USB slave male and USB host female on one end and wiz connector on the other. The usb slave is for serial, the host is for whatever.

Yes, release Wiz 1.1.0 firmware.

USB MIDI should "just work" provided the usbmidi driver was compiled into their kernel. I have a usb midi adapter at work, I'll bring it home and try it tonight hopefully.

Thanks! I edited my pinout post.
 
Last edited by a moderator:
Back
Top