View Single Post
Old 05-22-2009, 12:45 PM   #1
scotsman
Enthusiast
scotsman doesn't litterscotsman doesn't litter
 
Posts: 32
Karma: 106
Join Date: Mar 2009
Device: irex DR1000S
USB host mode hacking

Hi there,

as we are still stuck without bluetooth and thus external keyboards, I want to inspire some joint effort to get the USB port into host mode. I think it is feasible. Below is what I could find out and tried so far:

1. Hardware: as wallcraft has already investigated, hardware-wise, we have two USB OTG ports which could be switched into host mode:
Quote:
Originally Posted by wallcraft View Post
Its a safe bet that as delivered the USB port won't work with a keyboard. The Freescale i.MX31L FactSheet mentions USB On-The-Go and 2x USB Hosts. So (a) it might be possible to reconfigure the USB for OTG (which would allow some keyboards to work), and (b) there is an unused "iPod-like connector" located at the bottom of the DR1000 (see Post #75). I'm not sure what "iPod-like" means, but if this is a USB port then it can probably be made to work with memory sticks and keyboards.
2. switching on the Nokia N8x0: works both via software and hardware (special plug): the software version addresses files that we don't have on the DR1000, so the OS are too far apart to simply use that solution. I faintly tried the hardware version by bridging pin 4 and 5 on the connector with a needle, and it had no effect. But this could be due to not having properly soldered it. Reference. http://www.harbaum.org/till/n800_usb/index.shtml

3. host mode on other freescale machines: http://www.mail-archive.com/uclinux-.../msg02473.html
For the host, we need the ehci-hcd kernel module.

4. what we have got: I wrote some scripts to play around with modprobe. Here the results: available modules (modprobe -l)
/lib/modules/2.6.24-irex/kernel/drivers/net/mii.ko
/lib/modules/2.6.24-irex/kernel/drivers/net/usb/usbnet.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/core/usbcore.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/host/ehci-hcd.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/g_file_storage.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/arcotg_udc.ko
/lib/modules/2.6.24-irex/kernel/drivers/usb/gadget/gadgetfs.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/slaves/w1_smem.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/wire.ko
/lib/modules/2.6.24-irex/kernel/drivers/w1/masters/mxc_w1.ko

active modules (lsmod): none. I suspect that there is some script running once you confirm connection to the PC which then loads the modules, and unloads them again when you disconnect.
When I load most of these modules, except ehci-hcd, and then try to connect to the PC, it does not work. I guess that the script runs modprobe --first-time, and then gets an error if the script is already loaded.


5. inserting modules: I can insert e.g. usbnet, and then get as active this one and usbcore. No problems, but no effect.
Inserting ehci-hcd has an effect, but not switching to host, but crashing the machine.
This happens both when I load the other modules first, and when I don't.

6. after a reset the list of active modules is empty again, and the PC connection works fine.

7. future investigation: it may be helpful to check some of the shell scripts in /etc for connecting to the computer. Maybe one can learn from there how to proceed. I have attached the complete output of ls -aR /

8. could someone port a terminal? Working with desktop links, redirected output and leafpad is horribly slow for trying out things.

This is as far as I have got until now. I think checking out the shell scripts used in the system can help us further. It would be just too lovely to get the thing working.

I hope you join and enjoy this endeavor!
Attached Files
File Type: txt DIRS-l_part1.txt (627.5 KB, 195 views)
File Type: txt DIRS-l_part2.txt (745.5 KB, 209 views)
scotsman is offline   Reply With Quote