maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   N800 USB Host Mode Experiment (https://talk.maemo.org/showthread.php?t=4177)

fanoush 2007-11-29 13:37

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by LurkerN (Post 101543)
What are the architecture requirements for sourcing USB driver modules for OS 2008? Do they simply have to be compiled for ARM, ARM11, any TI OMAP, or specifically the OMAP 2420? Does the kernel version have to match exactly, or will any module compiled for a 2.6-series kernel work?

USB modules need to be compiled for specific kernel version and should be compiled with same or very similar gcc compiler as the kernel.

For OS2008 based N810 or N800 kernel version is 2.6.21 and gcc is 3.4.4 (2005q3-2 from codesourcery.com). Best is to use scratchbox and Maemo SDK

For details see
http://maemo.org/development/documen...for_maemo.html

As for USB drivers, there are plenty of them directly in kernel but most of them are disabled at compile time. One should simply compile the kernel with additional stuff enabled. All or almost all of them could be enabled as dynamic kernel modules so you can still use Nokia kernel and just insert specific driver modules you need at runtime.

For example of such kernel and set of modules see
http://www.internettablettalk.com/fo...312#post101312

dormant 2007-11-29 16:26

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by bexley (Post 101818)
If it does need extra power, how would I add it? I know of those battery hacks made to supply the right current, but how would it be plugged in to supply power? Are there cables that split the pins for power to a female plug--letting you plug in a power source via USB?

One possibility might be something like this - a two-into-one USB power cable. All you need then is a power source that outputs using USB.

I can see the collection of cables and adapters being bigger than the device.

penguinbait 2007-11-29 16:30

Re: N800 USB Host Mode Experiment
 
I plugged in logitech mouse via usb

It creates /dev/input/mouse0 and /dev/input/event4

[ 662.414062] musb_stage0_irq 646: CONNECT (a_host) devctl 3d
[ 662.414062] hub 1-0:1.0: state 8 ports 1 chg 0000 evt 0000
[ 662.414062] usb usb1: usb auto-resume
[ 662.414062] usb usb1: finish resume
[ 662.414062] hub 1-0:1.0: hub_resume
[ 662.437500] hub 1-0:1.0: port 1, status 0301, change 0001, 1.5 Mb/s
[ 662.593750] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x301
[ 662.718750] usb 1-1: new low speed USB device using musb_hdrc and address 4
[ 662.851562] usb 1-1: skipped 1 descriptor after interface
[ 662.851562] usb 1-1: default language 0x0409
[ 662.851562] usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0
[ 662.851562] usb 1-1: Product: USB-PS/2 Optical Mouse
[ 662.851562] usb 1-1: Manufacturer: Logitech
[ 662.851562] usb 1-1: device v046d pc00e is not supported
[ 662.851562] usb 1-1: uevent
[ 662.851562] usb 1-1: usb_probe_device
[ 662.851562] usb 1-1: configuration #1 chosen from 1 choice
[ 662.851562] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 662.851562] usb 1-1:1.0: uevent
[ 662.851562] usbhid 1-1:1.0: usb_probe_interface
[ 662.851562] usbhid 1-1:1.0: usb_probe_interface - got id
[ 662.851562] drivers/usb/input/hid-core.c: HID probe called for ifnum 0
[ 662.859375] input: Logitech USB-PS/2 Optical Mouse as /class/input/input4
[ 662.859375] input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-musb_hdrc-1
[ 662.859375] drivers/usb/core/inode.c: creating file '004'
[ 662.859375] hub 1-0:1.0: 102mA power budget left
[ 662.859375] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[ 662.859375] hub 1-0:1.0: port 1 enable change, status 00000303



If I cat /dev/input/mouse0 and move the mouse I can see it is working, how can we make use of it?

sjgadsby 2007-11-29 21:21

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by fanoush (Post 101365)
AFAIK the role switching works automagically only with proper cable. It must be switched manually when using normal USB cable that comes with the tablet and female to female adapter.

Folks, if you like the possibilities opened up by USB host support in your Internet tablet, but don't like the idea of having to hack up a USB cable or sudo gainroot to flip a switch every time you want to change modes, please vote for maemo bug 368. Thank you.

heavyt 2007-11-29 21:29

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by sjgadsby (Post 102166)
Folks, if you like the possibilities opened up by USB host support in your Internet tablet, but don't like the idea of having to hack up a USB cable or sudo gainroot to flip a switch every time you want to change modes, please vote for maemo bug 368. Thank you.

Got my vote.

convulted 2007-11-29 21:58

Re: N800 USB Host Mode Experiment
 
It has been said that if you use the correct cable the selection is automatic, without the need for ANY intervention on one's part. What is required is a USB A (Female) to USB Mini-B (Male) OTG cable (sometimes called a OTG convertor cable). The OTG part is the all-important part there. I managed to find one for £12 here in the UK (see, for example, [1]), including shipping, at Amazon. In the US you can get one for $10 or so.
For the N810, the male side of the cable has to be a Micro-B.
In other words, the mucking about using X-term and the like is only required if you use the Nokia-supplied cable (or similar) and a gender changer.

EDIT: penguinbait, I found the following line rather interesting:
Quote:

[ 662.859375] hub 1-0:1.0: 102mA power budget left
This means that the OTG chip inside the N8x0 can supply 102mA even with a mouse connected to it. Might turn out to be much more useful after all :)


[1] http://www.amazon.co.uk/exec/obidos/...e-21/ref=nosim

sjgadsby 2007-11-29 22:52

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by convulted (Post 102183)
It has been said that if you use the correct cable the selection is automatic, without the need for ANY intervention on one's part. What is required is a USB A (Female) to USB Mini-B (Male) OTG cable (sometimes called a OTG convertor cable).

My adapter is supposedly of the OTG variety, and it does not eliminate the need for switching manually in software. Yours does work correctly?

penguinbait 2007-11-30 01:31

Re: N800 USB Host Mode Experiment
 
Here is how to make the CDROM work :)

http://www.internettablettalk.com/fo...1&goto=newpost

Beni 2007-11-30 01:38

Re: N800 USB Host Mode Experiment
 
With this new development. Someone otta make a N800 Dock that has built in case, and USB Dock with 3 USB ports and a Compact Flash Slot (For extra memory) and it also has a built in case for your n800. That'd be awesome.

xPAKxMaster 2007-11-30 12:09

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Beni (Post 102293)
With this new development. Someone otta make a N800 Dock that has built in case, and USB Dock with 3 USB ports and a Compact Flash Slot (For extra memory) and it also has a built in case for your n800. That'd be awesome.

great idea! im gona get on the Hack5 forums and try to plan with them to develop a homemade edition:D, cant be too hard, i can get a small usb hub move the interfaces arround, installing a bunch of components, all i need is to think of a design.


All times are GMT. The time now is 05:47.

vBulletin® Version 3.8.8