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)

thoughtfix 2007-01-19 07:29

N800 USB Host Mode Experiment
 
... First attempt was a failure, but I only tried a keyboard and did not check XTerminal for the dmesg. I'll give it another go this weekend and report back.

At least there are pretty pictures in the post.

fanoush 2007-01-19 08:49

Re: N800 USB Host Mode Experiment
 
Host mode seems to be disabled in n800 kernel configuration, if nokia build the kernel from the source and configuration file available on maemo.org there is zero chance for it to work. But still please do try, miracles happen.

I guess for further experiments at least kernel recompilation is needed with enabled usb host mode side of the drivers (they are present in the source but disabled in kernel config)

Yalp 2007-01-19 10:04

Re: N800 USB Host Mode Experiment
 
Hi,

Jakub Pavelek from Nokia said on the maemo dev mailling list (here) that the HW connector of the N800 doesn't handle the USB OTG .

thoughtfix 2007-01-19 19:51

Re: N800 USB Host Mode Experiment
 
I got a tip in my blog comments about fixing xterm (I used the wrong repository) so I'll fix that tonight and do more testing.

Swatje 2007-01-27 20:57

Re: N800 USB Host Mode Experiment
 
maybe it's easier to load the 770 firmware with usbhost mode enabled on the n800, and then check if it's working, than recompile the kernel again?

mwiktowy 2007-01-27 21:12

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Yalp (Post 30496)
Hi,

Jakub Pavelek from Nokia said on the maemo dev mailling list (here) that the HW connector of the N800 doesn't handle the USB OTG .

Neither did the connector on the 770's. Switching to host/client mode manaully is quite different from USB OTG support.

http://en.wikipedia.org/wiki/USB_On-The-Go

penguinbait 2007-01-27 21:37

Re: N800 USB Host Mode Experiment
 
What pisses me off is I ordered a Y cable a battery powered USB hub and Female to Female converter. Plugged in my 770 switched on host mode, and I had USB devices. I used it one time and sent off my 770 for repair, I never got it back, nokia gave me cash and I bought an N800.

Now I am stuck waiting for someone to compile in support and hopefully it can be, or I can buy a 770 or sell my USB equipment. Hopefully someone will hook it up soon. Sometime when I am at work locations I can get wires, but not wireless. I find it almost impossible to believe that the hardware support is not in there.

Is there actual hardware that would support host mode and slave mode, or is it just firmware and drivers that change it between master and slave?

thoughtfix 2007-01-28 20:31

Re: N800 USB Host Mode Experiment
 
Someone DID compile USB support and sent me a little HOWTO on it. I've been waiting for the time to analyze it properly and clarify the howto. Do you want me to privately send you what he sent me in the meantime?

penguinbait 2007-01-28 22:01

Re: N800 USB Host Mode Experiment
 
I would like to see what you have I have been trying to compile the kernel with the support all day, and I keep failing

I was looking at this, OTG is definetly supported on this thing, but I can not get past compilation errors on usb host mode. Is it just me or if there a fix for the driver?

The device can function as both a reduced function
USB host controller (with a customer developed target peripheral list) as well as a
standard USB high-speed peripheral device.
http://focus.ti.com/lit/ml/sllb095/sllb095.pdf

CC drivers/usb/musb/musb_host.o
drivers/usb/musb/musb_host.c: In function `__musb_giveback':
drivers/usb/musb/musb_host.c:286: error: too few arguments to function `usb_hcd_
giveback_urb'
make[2]: *** [drivers/usb/musb/musb_host.o] Error 1
make[1]: *** [drivers/usb/musb] Error 2
make: *** [drivers] Error 2

So clost but yet so far!!!

hostman 2007-02-07 06:57

Re: N800 USB Host Mode Experiment
 
Probably not the smartest way to do it, but I was able to get the kernel to compile by adding an argument of NULL to musb_host.c line 286's call to usb_hcd_giveback_urb'...

Robert Vogt IV
Caflor

lbattraw 2007-02-07 12:37

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by thoughtfix (Post 32111)
Someone DID compile USB support and sent me a little HOWTO on it. I've been waiting for the time to analyze it properly and clarify the howto. Do you want me to privately send you what he sent me in the meantime?

Please send it along to me.

Thanks-
Larry

penguinbait 2007-02-07 13:24

Re: N800 USB Host Mode Experiment
 
I also still would like to see this mysterious information:D

hostman 2007-02-07 15:34

Re: N800 USB Host Mode Experiment
 
Also interested. Thus far, I've changed the following from the default kernel:

CBUS_TAHVO_USB=y
CONFIG_USB=y
CONFIG_USB_OTG=y
CONFIG_MUSB_HDRC=y
CONFIG_MUSB_HDRC_HCD=y

Also, added some modules for HID, FS, etc. OHCI seems to get turned on somehow, and it seems to conflict with TAHVO_USB...

-Robert

hostman 2007-02-07 15:41

Re: N800 USB Host Mode Experiment
 
Ok, so TAHVO_USB stopped erroring about OHCI once OTG was enabled, but it won't link because there's an unresolved extern to a deprecated function otg_set_transceiver... I saw a patch in a nokia thread somewhere where they completely cut out that part of the code as it's no longer necessary, but I need to find it again before making the changes...

-Robert

tarkness 2007-03-11 23:35

Re: N800 USB Host Mode Experiment
 
Hey Hey,
is anybody working on this at the moment or did you all give up?!? Please summ up the facts
about possibility ect. So that i know if there's a chance
:)
can noone of all the big minds out there to do it?

tarkness 2007-03-11 23:42

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by thoughtfix (Post 32111)
Someone DID compile USB support and sent me a little
HOWTO on it. I've been waiting for the time to analyze it properly and clarify the howto.
Do you want me to privately send you what he sent me in the meantime?

could i please see it too? Perhaps it'll help ;)

lbattraw 2007-03-12 01:36

Re: N800 USB Host Mode Experiment
 
Getting host mode really enabled is a matter of recompiling the kernel with the host mode flag on and enabling it with the flasher. Flash the new kernel, and you're in business-- kind of. It crashes, a LOT. I never got further than plugging in something and then trying a thing or two before it crashed. It never seemed to recognize the device fully (printing the new device attached message) without crashing, so I gave it up for the moment. I'm waiting for improvements in the kernel before trying again. It's one of those things that has hit the road-map (to hopefully be done at some point), so I guess we'll see how it turns out.

Larry

jonstatt 2007-03-12 13:30

Re: N800 USB Host Mode Experiment
 
Going a bit OT.

So if the FM radio was not the Easter Egg...and OTG support looks impossible if the hardware connector doesn't support it...then what is the real HW Easter Egg?

tarkness 2007-03-12 14:53

Re: N800 USB Host Mode Experiment
 
[QUOTE=jonstatt;38704]Going a bit OT.

[QUOTE=jonstatt;38704]Going a bit OT.

Perhaps it's WiMax?! Or even something you could never imagine :)

tarkness 2007-03-12 14:59

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by lbattraw (Post 38670)
Getting host mode really enabled is a matter of recompiling the kernel with the host mode flag on and enabling it with the flasher. Flash the new kernel, and you're in business-- kind of. It crashes, a LOT. I never got further than plugging in something and then trying a thing or two before it crashed. It never seemed to recognize the device fully (printing the new device attached message) without crashing, so I gave it up for the moment. I'm waiting for improvements in the kernel before trying again. It's one of those things that has hit the road-map (to hopefully be done at some point), so I guess we'll see how it turns out.

Larry

Thanks for your quick reply.. so.. what happens If you boot the n800 from an other system e.g. debian?

tarkness 2007-03-23 17:45

Re: N800 USB Host Mode Experiment
 
hey, now theres a new version of OS2007, so ...
did anything change? :)
i`m sorry posting that often, but i really want to get host-mode working!

because a few days ago my computer stopped working so i have to do everything on the n800 ;)

luketoh 2007-04-15 10:24

Re: N800 USB Host Mode Experiment
 
Anyone working on Host mode for N800? Any latest news?

Milhouse 2007-04-19 01:05

Re: N800 USB Host Mode Experiment
 
This post just appeared in the Maemo developers newsgroup...

http://www.gossamer-threads.com/list...rs/21371#21371

Source code only so far.

Might be time to give it a try? :)

dunsun 2007-04-19 07:38

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by Milhouse (Post 45001)
This post just appeared in the Maemo developers newsgroup...

http://www.gossamer-threads.com/list...rs/21371#21371

Source code only so far.

Might be time to give it a try? :)

Yap, this is exactly what i'm waiting for. Hmm but now I don't have time to struggle with it :-( Hope someone will just try to tune it a little bit.
With this I could use my cammera, flash disk, keyboard maybe mouse... sounds very promissing to me.

torx 2007-05-22 17:28

Re: N800 USB Host Mode Experiment
 
this is so long overdue! why won't maemo developers help with this? Certainly they want it too!

Texrat 2007-05-22 17:51

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by torx (Post 49424)
this is so long overdue! why won't maemo developers help with this? Certainly they want it too!

I like how the next post after is from a Nokia employee. ;)

Karel Jansens 2007-05-22 18:05

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by torx (Post 49424)
this is so long overdue! why won't maemo developers help with this? Certainly they want it too!

Here:

http://www.gossamer-threads.com/list...velopers/21371

Let us know how (and if) it works.

hostman 2007-06-09 03:15

Re: N800 USB Host Mode Experiment
 
Hi all,

I've posted the resulting kernel from all of the latest patches (as of today, at least).

http://caflor.net/iosix/zImage-usb-host

I've verified it will flash and boot, but I have not yet tried the host mode, as I am out of Michigan (and all of my cables/usb devices) right now (in sunny Florida). Please let me know if this works for you, thanks.

Robert Vogt IV
Caflor Industries

hostman 2007-06-11 19:30

Re: N800 USB Host Mode Experiment
 
A little update - looks like I'm getting 5V out when I turn host mode on...

-Robert

hostman 2007-06-12 22:08

Re: N800 USB Host Mode Experiment
 
Alas, just the one time. Did this work for anyone? Peripheral mode seems to be not working as well ... but it works with the old kernel re-loaded...

-Robert

lbattraw 2007-06-13 12:23

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by hostman (Post 51976)
Alas, just the one time. Did this work for anyone? Peripheral mode seems to be not working as well ... but it works with the old kernel re-loaded...

-Robert

I tried it but it didn't seem to recognize a USB keyboard plugged in (which has been verified to consume a very low amount of power). No messages about failures, it just didn't do anything. Incidentally, has anyone compile a version with SDHC support? I can't do much playing with it without that.

Larry

pcman 2007-08-09 02:38

Re: N800 USB Host Mode Experiment
 
Is anybody getting any success with using an external keyboard or usb external storage device?

MoridinBG 2007-10-08 09:35

Re: N800 USB Host Mode Experiment
 
After lots of reading here and there I finally made it to compile working kernel with the needed patches. Flashes OK to the device. After that Peripheral mode stops working, as noted here. dmesg on the desktop is completely silent when I attach the tablet to the PC. This makes mi think it should work. Then I got a modified cable from a friend. Hi made it as part of an attempt to enable OTG on HTC Universal (which fell from the 8th floor unfortunately before we could see if it works).
He claims the miniUSB cable is moded properly.
After I "echo host > /sys/devices/platform/musb_hdrc/mode" dmesg in xterm is silent. Connecting a device does nothing. So far I has tried a LG USB Key, which I think needs external power, as it has blue LED on it. Also tried some cheap chinese self powered MP3 Player. And it starts, but I think that's just because it is connected to something. dmesg again doesn't say even a word!.
I also tried "echo otg > /sys/devices/platform/musb_hdrc/mode" while dmesg remains completely silent. "echo peripheral > /sys/devices/platform/musb_hdrc/mode" finaly made it say something, "musb_platform_set_mode 616: Cannot be peripheral with mini-A cable otg_stat: 00000184".

Then I tried normal USB-miniUSB cable, which I use to connect mu photo to the PC. None mode setting produces even a single line in dmesg.

Am I wrong somewhere? I just applied the patches at muru.com, patched the .config, which enables various USB settings and compiled. It produced an error, complaining that tusb6010_test.c could not be compiled, so I disabled the TUSB6010 Loopback test support.

I will trie with the most simple flash key I can find, but most people, who has tried at least get lots of errors in dmesg.

P.S. I has also increased the debug level of the USB driver with
# echo 8 > /proc/sysrq-trigger
# echo D3 > /proc/driver/musb_hdrc

bluehash 2007-10-08 15:13

Re: N800 USB Host Mode Experiment
 
Hey,Keep trying.Good work!Sorry cant help much though.

MoridinBG 2007-10-08 16:12

Re: N800 USB Host Mode Experiment
 
OK, so I dissassembled the miniUSB cable and after some measurments can confirm it is mini-A type cable.
It is suggested to load g_file_storage, but it is compiled directly into the kernel.
I just tried with a USB keyboard. Logitech Corded. Nobody. Nothing in dmesg, no LEDs on the keyboard. AC pluged into the tablet, also unpluged. Just nobody.

I revised the kernel settings. It's all OK. As far as I can see everything that should be included IS included.
So I tweaked logging level for the USB subsystem (increased it in kernel .config) and I am recompiling at the moment.

So I think I have correctly configured and compiled kernel, but nobody responds on the USB. Should I inject power for devices like simple USB stick and keyboard?

Does anybody has any clues? I will also post on maemo-developers.



EDIT: Damn it! I recompiled with increased verbose level. Again nothing. Nobody. Silence.

According to this topic there should be at least something. Could it be that the tablet can't power even a simple flash key?
I will now try to cook cable with option to inject power.

EDIT2: That's it. I did everythong I could think of. I measured the power lines on the USB, coming from the tablet. 0.00V. So I found an old USB-B to USB-A (The big ones) cable. Cut the B end (the square one), pluged the A end into the PC and got 5.02V btween black and red. Then I took the cable coming from the tablet, cut blag and red and connected the ones coming from the PC to the ones going to the peripheral.

So after all here is what I got:
- Nokia N800 flashed with kernel with latest patches (patches-tusb-n800-2007-07-03.tar.gz)
- mini-A cabel plugged into the tablet
- Replaced power lines coming from the tablet with those coming from the PC, providing 5V@0.5A
- USB Keyboard/USB Flash connected on the end of this cascade

- NOTHING in dmesg; Neither in /sys/bus/usb/devices


I also noticed that "cat /sys/devices/platform/musb_hdrc/mode" returns b_idle.


Guys, I am desperate!

linuxrebel 2007-11-28 00:18

Re: N800 USB Host Mode Experiment
 
OK... using the above info .. on the latest 0S2008 .. I can do this.

1. Enabled R&D mode (not tested outside this mode)

2. echo host > /sys/devices/platform/musb_hdrc/mode

3. Using female to female gender bender I conncected a USB keyboard to the n800.

4. It gives error message about unsupported device and then. POOF I have a keyboard.

5. Disconnected keyboard inserted USB key Drive.
It complained about unsupoorted device. Opened the File manager and POOF showed me the files.

6. Just for fun I plan on try a USB DVD reader and USB HDD (both with independent power) and see what I get.... wii!

linuxrebel 2007-11-28 01:33

Re: N800 USB Host Mode Experiment
 
Did the USB DVD/CD r/w thing. No dice on it. However since both a USB key drive and a USB drive are usb-mass storage devices I'm holding out hope there.

penguinbait 2007-11-28 03:25

Re: N800 USB Host Mode Experiment
 
I did the echo, on original 2008OS, not in R&Dmode.

Connected USB hard drive, and it automounted 27GB EXT3 partition :)

Awesome

[16120.085937] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[16120.085937] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[16120.210937] usb 1-1: new high speed USB device using musb_hdrc and address 12
[16120.343750] usb 1-1: default language 0x0409
[16120.343750] usb 1-1: new device strings: Mfr=56, Product=78, SerialNumber=100
[16120.343750] usb 1-1: Product: USB2.0 Storage Device
[16120.343750] usb 1-1: Manufacturer: Cypress Semiconductor
[16120.343750] usb 1-1: SerialNumber: DEF10BEEF1C7
[16120.343750] usb 1-1: device v04b4 p6830 is not supported
[16120.343750] usb 1-1: uevent
[16120.343750] usb 1-1: usb_probe_device
[16120.343750] usb 1-1: configuration #1 chosen from 1 choice
[16120.343750] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[16120.343750] usb 1-1:1.0: uevent
[16120.343750] usb-storage 1-1:1.0: usb_probe_interface
[16120.343750] usb-storage 1-1:1.0: usb_probe_interface - got id
[16120.421875] scsi0 : SCSI emulation for USB Mass Storage devices
[16120.429687] drivers/usb/core/inode.c: creating file '012'
[16120.429687] hub 1-0:1.0: 200mA power budget left
[16120.429687] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[16120.429687] hub 1-0:1.0: port 1 enable change, status 00000503
[16120.453125] usb-storage: device found at 12
[16120.453125] usb-storage: waiting for device to settle before scanning
[16125.453125] scsi 0:0:0:0: Direct-Access TOSHIBA MK3021GAS 0000 PQ
: 0 ANSI: 0
[16125.460937] SCSI device sda: 58605120 512-byte hdwr sectors (30006 MB)
[16125.476562] sda: Write Protect is off
[16125.476562] sda: Mode Sense: 27 00 00 00
[16125.476562] sda: assuming drive cache: write through
[16125.484375] SCSI device sda: 58605120 512-byte hdwr sectors (30006 MB)
[16125.484375] sda: Write Protect is off
[16125.484375] sda: Mode Sense: 27 00 00 00
[16125.484375] sda: assuming drive cache: write through
[16125.484375] sda: sda1 sda2 < sda5 >
[16125.968750] sd 0:0:0:0: Attached scsi disk sda
[16126.007812] usb-storage: device scan complete

_______________________________________





My lite-dvd burner is detected perfectly, but no driver support is present for CD

[16481.390625] musb_stage0_irq 646: CONNECT (a_host) devctl 5d
[16481.390625] hub 1-0:1.0: state 8 ports 1 chg 0000 evt 0000
[16481.390625] usb usb1: usb auto-resume
[16481.390625] usb usb1: finish resume
[16481.390625] hub 1-0:1.0: hub_resume
[16481.414062] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[16481.570312] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x
101
[16481.695312] usb 1-1: new high speed USB device using musb_hdrc and address 15
[16481.859375] usb 1-1: default language 0x0409
[16482.031250] usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=3
[16482.031250] usb 1-1: Product: ATAPI-6 Bridge Controller
[16482.031250] usb 1-1: Manufacturer: Prolific Technology Inc.
[16482.031250] usb 1-1: SerialNumber: 300000000D05
[16482.031250] usb 1-1: device v2116 p0320 is not supported
[16482.031250] usb 1-1: uevent
[16482.031250] usb 1-1: usb_probe_device
[16482.031250] usb 1-1: configuration #1 chosen from 1 choice
[16482.031250] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[16482.031250] usb 1-1:1.0: uevent
[16482.031250] usb-storage 1-1:1.0: usb_probe_interface
[16482.031250] usb-storage 1-1:1.0: usb_probe_interface - got id
[16482.031250] scsi3 : SCSI emulation for USB Mass Storage devices
[16482.039062] drivers/usb/core/inode.c: creating file '015'
[16482.039062] hub 1-0:1.0: 198mA power budget left
[16482.039062] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[16482.039062] hub 1-0:1.0: port 1 enable change, status 00000503
[16482.039062] usb-storage: device found at 15
[16482.039062] usb-storage: waiting for device to settle before scanning
[16487.125000] scsi 3:0:0:0: CD-ROM LITE-ON DVDRW LDW-851S GS0P PQ : 0 ANSI: 0
[16487.164062] usb-storage: device scan complete

sjgadsby 2007-11-28 03:28

Re: N800 USB Host Mode Experiment
 
Quote:

Originally Posted by linuxrebel (Post 101098)
1. Enabled R&D mode (not tested outside this mode)

It seems R&D mode is not necessary. I'm typing this using a PS/2 keyboard connected to my N800 via a PS/2-to-USB converter (and a KVM, which may be feeding the keyboard some power). I've not used R&D mode, just becomeroot.

EDIT: Penguinbait beat me to it.

miind 2007-11-28 05:27

Re: N800 USB Host Mode Experiment
 
did I understand this correct when I say that its possible to just connect a usb harddrive when having the OS2008?


All times are GMT. The time now is 06:51.

vBulletin® Version 3.8.8