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)

L0cutus 2007-11-28 06:45

Re: N800 USB Host Mode Experiment
 
we need some photos ! :)
how about the cables ?
n800 is able to give the needed power to a simple keyboard ?

thanks !

Tirithen 2007-11-28 09:23

Re: N800 USB Host Mode Experiment
 
Yesterday I tried to connect a PS/2 keyboard with a PS/2 -> USB adapter, added ~5v from 4AA batteries and connected it to my N800 with OS2008 installed on it.

I don't have and drivers so I guess nothing should have happened, the only thing that was noticeble was that when I only had the batteries connected to the keyboard caps, num and scrollock was flashing and when I connected them to the N800 they stopped flashing and became lit when I used echo host > /sys/devices/platform/musb_hdrc/mode num lock stayed lit and the other two was flashing. When I connected the same things on OS2007 some months ago it said usb connected but the tablet did not say anything this time.

Did you who got this working do anything else than use "echo host > /sys/devices/platform/musb_hdrc/mode"?

penguinbait 2007-11-28 12:41

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by miind (Post 101209)
did I understand this correct when I say that its possible to just connect a usb harddrive when having the OS2008?

yup!!

I also ran a usb thumb drive by directly connecting it to usb, no power sources needed. n800 supplied the power!!!


I used nokia usb cable and 1 gender bender

convulted 2007-11-28 12:52

Re: N800 USB Host Mode Experiment
 
penguinbait: Nice. So no recompile of the kernel is needed; i.e., will stock OS2008/N800 accept usb drives by default? Sorry, I keep getting conflicting messages here...

EDIT: "Conflicting messages" = different people saying different things.

penguinbait 2007-11-28 13:24

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by convulted (Post 101323)
penguinbait: Nice. So no recompile of the kernel is needed; i.e., will stock OS2008/N800 accept usb drives by default? Sorry, I keep getting conflicting messages here...

EDIT: "Conflicting messages" = different people saying different things.


I am using stock kernel from 2008OS (not the new beta, I am using the original 2008OS, I assume the new beta is the same?)

convulted 2007-11-28 13:26

Re: N800 USB Host Mode Experiment
 
That is exactly what I wanted to hear. As soon as I get hold of a gender changer I will try this out on the beta version of OS2008.

sjgadsby 2007-11-28 13:34

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by penguinbait (Post 101332)
I am using stock kernel from 2008OS (not the new beta, I am using the original 2008OS, I assume the new beta is the same?)

I'm using the beta N800 release of OS2008, and yes, it seems to work the same.

sjgadsby 2007-11-28 13:39

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by convulted (Post 101337)
As soon as I get hold of a gender changer I will try this out on the beta version of OS2008.

I purchased (and am using) this adapter, though you may be able to find a better deal elsewhere.

EDIT: The linked USB adapter is not wired correctly to let OS2008 on an N800 do its USB mode autoswitching magic.

sjgadsby 2007-11-28 13:59

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by L0cutus (Post 101228)
we need some photos ! :)

Umm, okay. Here's my N800 connected to a keyboard. For what are you looking, specifically?

EDIT: And here's my N800 connected to my digital camera. Upon connection, the N800 opened the File Manager automatically, and I could access files on the camera's SmartMedia card.

Mara 2007-11-28 14:03

Re: N800 USB Host Mode Experiment
 
Wasn't it so that USB-OTG should be able to work in two modes: host and peripheral? And this detection in which mode to operate should be automatic?

In other words, is it really needed to do the echo command to enable host mode? Did anyone try just plugging in the keyboard or disk drive and see what happens?

EDIT: When I read some internal release notes documents describing the USB operation in OS2008, I get this understanding that the role switching should work automagically... please try it?

sjgadsby 2007-11-28 14:18

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Mara (Post 101346)
When I read some internal release notes documents describing the USB operation in OS2008, I get this understanding that the role switching should work automagically... please try it?

Done. I manually set the mode of my N800 back to "b_idle" and then plugged my keyboard in again. The mode automatically updated to "a_host", and the keyboard worked (though still with all the "Device not supported" messages).

Thanks, Mara!

EDIT: Initially, I thought the adapter I have was wired correctly to allow automatic switching between host and gadget modes. However, that switch is not happening consistently. Nuts.

fanoush 2007-11-28 14:50

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Mara (Post 101346)
EDIT: When I read some internal release notes documents describing the USB operation in OS2008, I get this understanding that the role switching should work automagically... please try it?

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. see http://muru.com/linux/n800-usb-host/

Tirithen 2007-11-28 14:53

Re: N800 USB Host Mode Experiment
 
I got my wireless USB keyboard working but it dropped a lot of characters until I added 5v from 4AA batteries. My mouse that is connected to the same reciver wrote different characters like qweui, mabye it writing qwertyui in that order. Is would it now be possible to change the language of the keyboard so that special characters works...
Would it be possible t oconnect more than one device with a USB hub...

frethop 2007-11-28 15:05

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Tirithen (Post 101366)
Would it be possible t oconnect more than one device with a USB hub...

And the answer to that is YES. I have a keyboard and two USB flash drives hooked up and things are working! Wow!

I get "USB hub not supported" and "Unable to connect. Device not supported." error messages, but everything works.

-- Mike

Tirithen 2007-11-28 15:15

Re: N800 USB Host Mode Experiment
 
Wow, been waiting for this a log time. I get the errormessages to. I've now connected to my H320 hd mp3 player and are playing mp3's from it on the tablet. When the clock apps alarm on the tablet came up it made the media player to stop playing and aftervards the sound sounds awful seemes like it boosted the volume and it won't help turning it down in the volume control.. but restarting it solved it.

bukubuku 2007-11-28 15:27

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by frethop (Post 101375)
And the answer to that is YES. I have a keyboard and two USB flash drives hooked up and things are working! Wow!

I get "USB hub not supported" and "Unable to connect. Device not supported." error messages, but everything works.

-- Mike

Need extra power supply for the USB Hub or not?

frethop 2007-11-28 15:38

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by bukubuku (Post 101388)
Need extra power supply for the USB Hub or not?

Short answer: No.

Longer answer: I have a powered hub with a power indicator light. It worked with power. WHen I disconnected the power and connected the N800, the power light went on. The hub worked also without power.

-- Mike

bukubuku 2007-11-28 15:47

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by frethop (Post 101393)
Short answer: No.

Longer answer: I have a powered hub with a power indicator light. It worked with power. WHen I disconnected the power and connected the N800, the power light went on. The hub worked also without power.

-- Mike

Woo~So we just need to flash OS2008,hook up the usb device,then it works?SO GREAT:)

Benson 2007-11-28 16:03

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. see http://muru.com/linux/n800-usb-host/

Beat me to it!
Yes, that's how it should work. Can't wait to get an adaptor and start using thumb-drive with N800.

Let's see -- what other USB devices do/might/should work?
  • Mass storage - works
  • HID - keyboards work, mice have same troubles as BT mice
  • CD/DVDs - has no drivers
  • Network adapters (Will power be an issue for some of these?)
    • Ethernet - Helpful, but do they work?
    • 802.11b/g - Redundant, probably less range
    • 802.11a,n - Could be helpful, do they work?
    • BT - Redundant, unless you need longer range... Then power draw probably kills you.
  • Serial adapters (including USB interface on HP49G+) - Probably no drivers?
  • Audio (USB speakers) - Not persuaded of utility, but might work. Probably no drivers?
Anything else?

Could people who have this working try any of those devices they have laying about and see if they work?
Since we're running a modular kernel, drivers should be simple to add for, e.g., usb-serial, or various network adapters. More complications arise in pursuit of, say, DVD burning, requiring a variety of drivers and userland tools.

ShyBoy 2007-11-28 16:15

Re: N800 USB Host Mode Experiment
 
I wish if I can use my LAPTOP USB GPS receiver with N800 :-)

frethop 2007-11-28 17:16

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Benson (Post 101409)
Could people who have this working try any of those devices they have laying about and see if they work?

External card reader: worked with multiple cards simultaneously (e.g. Compact Flash + RS-MMC)
External HD: did NOT work when HD needed USB power. I tried to get power from the N800 and plugged a separate power plug into my powered hub. Did not work either way.
N95: Tried my Nokia N95 phone. Worked as a mass storage device; did not work when the device wanted PC suite (duh)
Web camera: nothing. THe N800 recognized the device as an unsupported one (aren't they all?) but this was really unsupported.

-- Mike

dblank 2007-11-28 18:11

Re: N800 USB Host Mode Experiment
 
Make sure you guys are careful with any storage devices if trying to power directly from the N8X, most will need more than 100mA when actively transferring files, so I'd imagine file corruption is a possibility.

pearl62 2007-11-28 19:53

Re: N800 USB Host Mode Experiment
 
I tried an Ethernet adapter (3Com 3C19250 based) and it wasn't recognized. I would love to have Ethernet working, as we have WiFi locked down at work.

Kozzi 2007-11-28 19:56

Re: N800 USB Host Mode Experiment
 
Any hope with HSDPA USB Modem ?

dblank 2007-11-28 20:14

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by pearl62 (Post 101515)
I tried an Ethernet adapter (3Com 3C19250 based) and it wasn't recognized. I would love to have Ethernet working, as we have WiFi locked down at work.

The "kaweth" kernel module might work:
http://kaweth.sourceforge.net/

Needs to be compiled, though.

dormant 2007-11-28 20:24

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Benson (Post 101409)
Let's see -- what other USB devices do/might/should work?
  • Mass storage - works
  • HID - keyboards work, mice have same troubles as BT mice
  • CD/DVDs - has no drivers
  • Network adapters (Will power be an issue for some of these?)
    • Ethernet - Helpful, but do they work?
    • 802.11b/g - Redundant, probably less range
    • 802.11a,n - Could be helpful, do they work?
    • BT - Redundant, unless you need longer range... Then power draw probably kills you.
  • Serial adapters (including USB interface on HP49G+) - Probably no drivers?
  • Audio (USB speakers) - Not persuaded of utility, but might work. Probably no drivers?
Anything else?

Digital cameras. I guess they should work in mass storage mode, but will they work in PTP mode?

LurkerN 2007-11-28 20:42

Re: N800 USB Host Mode Experiment
 
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?

(please excuse my noobness :o )

realitygaps 2007-11-29 05:35

Re: N800 USB Host Mode Experiment
 
are usb joysticks working? Would be great for lxdoom and emulators....

bexley 2007-11-29 07:30

Re: N800 USB Host Mode Experiment
 
I'm praying that a USB ethernet adapter will work without extra power. I'll hate to be in a place without wifi but with ethernet when I get my N810.

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?

xPAKxMaster 2007-11-29 08:21

Re: N800 USB Host Mode Experiment
 
has anybody tried plugin an usb gps reciever to the N800?
i have the microsoft's universal from streets and trips but i lack an internet tablet(getting one on xmas).

in theory it should work because all you should have to do, is direct the gps software to switch coms...

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 23:40.

vBulletin® Version 3.8.8