maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   N900 will not allow USB OTG! (https://talk.maemo.org/showthread.php?t=31921)

andree 2010-01-09 23:52

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Siggen (Post 461754)
Well it cant force the ID pin to ground anyway, so we are still not able to get host. :(

well, once you make the n900's usb controller to think he is the host (by using the force_host option, if it works on omap3430/twl4030), you only need to use a special cable (and probably inject cutom power source too)...

it's all only about setting up of the host-client session on data bus (which should be very much only a software problem - I've read somewhere, that for a long time now, most (even the simplest) embedded client usb controllers support at least a primitive host mode)...)

the only obsticle I can see is that either the hardware is horifically badly designed (like it can't be a host, because of some electrical out-of-usb-spec issues when connecting other device.. i think there were some problems with host mode on otg port of BeagleBoard too (with older revisions), so it could be something similar) - or omap3430 doesn't implement the force_host (correctly)...

please, Siggen, post the answer(s) here again, if you get some...

qole 2010-01-10 01:32

Re: N900 will not allow USB OTG!
 
I'm curious: what is left to try now that even setting test mode in a patched kernel has failed?

andree 2010-01-10 09:16

Re: N900 will not allow USB OTG!
 
for starters we don't know if the testmode had any effect on the chipset operations at all... we don't know whether the kernel module works correctly (i.e. whether it detects host mode and initiates required comm protocols - there are tons of stuff one has to do even before a client session,so it's possible we left out something) etc. - someone with usb-debugging skills (at sw and hw level) has to look into this to give a final verdict.. for me, the official "n900 doesn't support otg on hw level" statement is too vague...

sarahn 2010-01-10 19:04

Re: N900 will not allow USB OTG!
 
FWIW, I think the patches against 2.6.28 could be applied to a different kernel with theoretically no loss in functionality, but the other way around may be easier.

EugeneS 2010-01-11 09:48

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by qole (Post 461883)
I'm curious: what is left to try now that even setting test mode in a patched kernel has failed?

My speculation - msusb not provide direct connection
to USB connector. All USB communication going
through ISP1707 ULPI interface.
If this true, you can configure USB host, peripheral or OTG
mode. Also ISP1707 have internal resistors for DP, DM and ID pins. ;)
You can found data sheet for ISP1704A (same as ISP1707,
but without CHRG_DET_POL feature)

SpeedEvil 2010-01-11 21:17

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by andree (Post 461800)
well, once you make the n900's usb controller to think he is the host (by using the force_host option, if it works on omap3430/twl4030), you only need to use a special cable (and probably inject cutom power source too)...


The twl4030 has nothing to do with USB.
The chip doing USB is the http://wiki.maemo.org/N900_Hardware_isp1707 - it is unclear if the statement in that page about rework is accurate - though it was allegedly made by someone who had schematics - the datasheets of similar chips do not seem to support it.

It seems likely that the statement 'you need to rework to get USB host' seems to only be true for devices with unchangable kernels that cannot be told to ignore the setting.

andree 2010-01-12 00:36

Re: N900 will not allow USB OTG!
 
lovely...

well, twl4030 is still used for usb - only now we know, that the PHY is isp1707... As EugeneS said, and as it is written in ULPI specification - it should be possible to do some stuff with the pulldown resistors of PHY, I've even found interesting code in drivers/usb/musb/musb_core.c:

functions musb_verify_charger / musb_ulpi_readb / musb_ulpi_writeb

and definitions like

ISP1704_OTG_CTRL_DP_PULLDOWN / ISP1704_OTG_CTRL_DM_PULLDOWN

which means, we can control the PHY to some extent - and maybe also force it into host mode...

(erm, to be precise - the PHY probably doesn't know too much about host/peripheral modes, when it comes to logic.. it probably only cares about electronics stuff (like power pump (which however might be not present in n900) for host mode, those pulldown resistors, maybe initial speed/OTG negotiation) - so additional work still might need to be done inside the MUSB code, to make it all work together properly...)

I'll have to read the usb/ulpi specification more carefuly - if anyone with greater knowledge is interested - please, don't hasitate to join the discussion :-)

this seems to continue being fun... :)

SpeedEvil 2010-01-12 01:58

Re: N900 will not allow USB OTG!
 
Hmm - I may have been confused and the twl4030 drives the phy - I thought it had it integrated.

It's almost certain the resistors are integrated into the devices.
In all comparable devices I've seen - lookes at maybe 5 datasheets - they are.
Hence they can't be left out.

EugeneS 2010-01-12 12:19

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by andree (Post 465457)
lovely...

(erm, to be precise - the PHY probably doesn't know too much about host/peripheral modes, when it comes to logic.. it probably only cares about electronics stuff (like power pump (which however might be not present in n900) for host mode, those pulldown resistors, maybe initial speed/OTG negotiation) - so additional work still might need to be done inside the MUSB code, to make it all work together properly...)

I'll have to read the usb/ulpi specification more carefuly - if anyone with greater knowledge is interested - please, don't hasitate to join the discussion :-)

this seems to continue being fun... :)

ISP1707 have all ULPI registers in range 0x0 - 0x1B,
plus PWR_CTRL registers 0x3D - 0x3F.
Most interesting - OTG_CTRL 0xA - 0xC and
Function Control 0x4 - 0x6.

Aydan 2010-01-12 13:38

Re: N900 will not allow USB OTG!
 
Hi,

I don't know if this has already be mentioned somewhere, if so just ignore this post:

If you want to claim support for OTG you have to source power from the connector. Period. If you don't then even if the controller would be able to do OTG, it's not compliant.

The N900 doesn't seem to do this (just like the n800 doesn't) and that is the hardware limitation.

Circumventing the hardware limitation by sourcing externally, it might be possible to do OTG though.

just my 2 cents and I'd really like this to work because then I could connect my model plane charger and record charge curves from it. Now I do this with an old subnote which barely runs XP :(

Axdan

sarahn 2010-01-12 17:43

Re: N900 will not allow USB OTG!
 
The closest you are likely to get for isp datasheets without asking nicely

http://www.stericsson.com/technical_...ISP1704A_2.pdf

Offhand the apparent notable difference is charger detect pin polarity (1704 only does high and 1707 does low / high.)

bowen 2010-01-19 22:30

Re: N900 will not allow USB OTG!
 
Er, that chip is a BGA, and the ID pin (D3) is right in the middle.
I think SpeedEvil made quite an understatement when he said on the wiki that this would be a "challenging" rework job.. @_@

Even with the schematic it could still be next to impossible with a multi-layer PCB.

This is a real shame.. I was literally just about to buy one of these as I am developing some robot control software for the USB AVRs. 3G connection and fast processing on an n900 would have been wonderful..

titan 2010-01-20 12:16

Re: N900 will not allow USB OTG!
 
just a crazy idea for a workaround:

implement USB/IP (http://usbip.sourceforge.net/) on the N900 and on
an external microcontroller with USB host ports (i.e. a smarter USB hub),
e.g. http://microcontrollershop.com/produ...oducts_id=2649,
and connect them via USBnet (N900=slave, hub=repeater)?

andree 2010-01-20 22:00

Re: N900 will not allow USB OTG!
 
titan, that ain't crazy at all - previously mentioned workarounds were using a similar concept - only the "router" was a bluetooth device (but none was found, that would provide bluetooth connection and an usb host port)...

this two-port thingie seems to be a nice workaround - if it is fast enough, then using usb/ip (didn't know someone already invented that :-) ) you could bring usb host functionality to virtually any device, if you can port the usb/ip stack to the kernel, of course...

and if it is possible to to flash the device with appropriate firmware... well, there are some "if"s... but it's a start of new solution - if other approaches fail...

titan 2010-01-21 00:42

Re: N900 will not allow USB OTG!
 
ok, let's call this solution "USB/IP hub" (tm).
after some googling it turned out to more feasible than I initially thought:

USB/IP is implemented in Linux 2.6.28 (staging) and consists
of a pseudo USB driver on the server (the hub, where the USB device is connected)
which redirects all IO through a user-space daemon to the client (N900), which
has a simple virtual HCI and standard USB device drivers in the kernel.

The simplest solution would be have Linux (e.g. 2.6.28) on both sides.
We could already try that out by recompiling the N900 kernel and connecting it to a USB/IP enabled Linux desktop via USBnet/wifi/bluetooth.

If that works reasonably well the next step would be to look for a small embedded Linux (2.6) board which has more than one USB host port and can be powered by battery.
for example, http://www.tigal.com/product.asp?pid=1333&lang=EN (too large),
http://eshop.acmesystems.it/ or, my current favorite:
http://www.ic-board.de/product_info....0-OEMplus.html
features:
Linux 2.6.28
3x USB2.0 High Speed Host (one reserved for connecting to the N900)
10/100 MBit Ethernet (LAN port for the N900)
small size: 40mm x 35mm x 6mm, weight 50g ! (w/o USB ports and battery)
if you want you could even add a SD card reader, serial ports, LCD etc.
you could also connect a Bluetooth module via SPI and have 3 free USB host ports.

the only drawback: the price
but if you build it yourself (eagle files are free) I'm sure it's much less and
sparkfun.com is willing to do mass production for cool projects (UBW32).

It contains a very attractive USB controller http://www.stericsson.com/product/222228.jsp
and with an appropriate battery we could not only power the USB devices
but also charge the N900.

The advantages would be :
* up to 3 USB host ports with power supply
* LAN port
* no need to hack the N900 USB controller
* minimal software changes: compile existing USB/IP
code into client and server
* could also be used as a USB extender (USB over Internet)
or with other computer or Windows

cheers, (dreams to be continued in my bed)

KiberGus 2010-01-21 22:02

Re: N900 will not allow USB OTG!
 
USB over IP over USB? Too easy. May be it is reasonable to add VPN? we have openVPN r n900. USB over IP over VPN over IP over USB.

titan 2010-01-22 16:52

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by KiberGus (Post 487589)
USB over IP over USB? Too easy. May be it is reasonable to add VPN? we have openVPN r n900. USB over IP over VPN over IP over USB.

Don't forget USB over IPoAC (RFC 1149/2549) or IP over Status LED. ;)

seriously, if you already need one of those embedded Linux boards with USB
for other purposes (e.g. robot control), then the USBhost over IP over USBnet/Bluetooth/Wifi could be a viable but expensive solution.

I suppose USBnet would have the lowest latency, maximum bandwidth and lowest power consumption of those three.

Bernard 2010-01-22 20:36

Re: N900 will not allow USB OTG!
 
I think this is a very cool idea.
I think the USB over IP method could be used for a lot of different cool things. I'm hoping that a USB DVB-T adapter could be used for example (provided the bandwidth over wifi is sufficient ).

I intend to start my experimenting on my desktop PC.
Some links with how-to's:
http://howtoforge.com/how-to-set-up-...h-debian-lenny
http://howtoforge.com/how-to-modify-...over-ip-server

I also came across some ready to go images for the linksys NSLU2 device. That could be an easy and cheap solution to start experimenting with embedded USB over IP server solutions:
http://usb-server.com/nslu2.html
http://www.nslu2-linux.org/wiki/HowT...sbIpOnTheNSLU2
http://sourceforge.net/projects/usbi.../topic/1786127

I don't have a NSLU2 yet, so maybe other people could give their view about if that is a could way to start.

titan 2010-01-22 21:15

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Bernard (Post 489398)
I think the USB over IP method could be used for a lot of different cool things.

For example, if you use the tiny
http://www.gumstix.com/store/catalog...roducts_id=211
http://www.gumstix.com/store/catalog...roducts_id=230
you would have Ethernet, 2x USB host and DVI output via HDMI !!
(just run a VNC client on the board and x11vnc on the N900)
So you could even connect a monitor without TV-out or run
a X server with higher resolution on the embedded Linux.
Or with http://www.armadeus.com/english/prod...rds-apf27.html
you could do crazy stuff with the FPGA (motion tracking?)
and have 3x USB host, Ethernet etc
Quote:

I intend to start my experimenting on my desktop PC.
cool! please keep me posted.
I guess we would first need to compile a custom kernel with the full USB stack for the N900 but that's currently impossible (please vote for bug https://bugs.maemo.org/show_bug.cgi?id=7972)
wow! that company has been selling the USB/IP stuff for over two years.
so it be must already be working well enough.

Bec 2010-01-22 21:49

Re: N900 will not allow USB OTG!
 
How about a bluetooth USB hub?

http://www.inspector-gadget.co.uk/blog_134.shtml
http://www.inspector-gadget.co.uk/pi...h_usb_port.jpg

Bernard 2010-01-22 22:02

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Bec (Post 489526)

First, I never heard of this device, it seems very fake to me. There is no link to any manufacturers webpage, not even the name is mentioned, and no link to a shop that supposed to sell these devices.

Second, even if it existed it would still need drivers. Will it support the N900 and linux in general, maybe, maybe not?
And third even the fastest current BT implementation is just 3mbit/s, that is a third of USB 1.1 speeds. So it would be way to slow for a DVB-T USB dongle (my personal goal), that requires USB 2.0 speeds in most cases, depending on the transmitted bitrates.
So no, it isn't an option for my goals

titan 2010-01-22 22:03

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Bec (Post 489526)

Quote:

The Bluetooth USB Hub has [...] a Bluetooth dongle, which will allow you to connect the hub itself to your PC, should your PC not be Bluetooth enabled already
LOL! give me a perpetuum mobile

the funny thing is that we can make this joke real!

titan 2010-01-22 22:11

Re: N900 will not allow USB OTG!
 
BTW, should we start a new thread for the USB/IP idea?

It should also be possible to eliminate to the IP layer
by replacing the USBnet driver on both sides with a direct
PTP protocol which simply encapsulates USB server IO in USB data packets.
that would probably have the highest throughput.

Bernard 2010-01-22 22:22

Re: N900 will not allow USB OTG!
 
USB over IP is a very different idea than the USB OTG subject, so I think it would be a good idea to start a new topic. But I'm not sure that the USB over IP software can (easily) be implemented on Maemo. So if the idea will be going anywhere i can't say yet.

Cheap USB over IP solution could open up a HUGE amount of creative new possibilities, could be interesting for those N900 push challenges

Bec 2010-01-22 22:23

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by titan (Post 489574)
BTW, should we start a new thread for the USB/IP idea?

Definitely!

I tried looking for more devices like this but they are far from pocketable or practical (belkin & io gear have some).

BT would be pointlessly slow indeed for such an application...

titan 2010-01-22 22:42

Re: N900 will not allow USB OTG!
 
The new USB/IP thread is here http://talk.maemo.org/showthread.php?p=489609

Quote:

Originally Posted by Bernard (Post 489589)
But I'm not sure that the USB over IP software can (easily) be implemented on Maemo. So if the idea will be going anywhere i can't say yet.

why do you think it could be more difficult than on normal Linux desktops?

Bernard 2010-01-22 22:53

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by titan (Post 489620)
The new USB/IP thread is here http://talk.maemo.org/showthread.php?p=489609

why do you think it could be more difficult than on normal Linux desktops?

I don't have any motivation actually. I hope it isn't. Because I think I can get it to work on a normal debian install.

dyce 2010-01-24 00:48

Re: N900 will not allow USB OTG!
 
http://www.electronicproductonline.c...oducts_id=2043

thats what they use for the n800, can it be used for n900? of course with miniusb to microusb

sjgadsby 2010-01-24 01:05

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by dyce (Post 491270)
thats what they use for the n800, can it be used for n900? of course with miniusb to microusb

Not for USB host, no.

HumanPenguin 2010-02-02 10:56

Re: N900 will not allow USB OTG!
 
http://www.inspector-gadget.co.uk/blog_134.shtml

Writing drivers to support the above may be a solution to the whole usb host mode problem. Assuming they are acctually available.

Id love to get something like this if it could be made to work.

sjgadsby 2010-02-02 13:59

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by HumanPenguin (Post 506567)
http://www.inspector-gadget.co.uk/blog_134.shtml

Writing drivers to support the above may be a solution to the whole usb host mode problem.

While that device has repeatedly been put forth as a solution in this thread, it is not one, unfortunately. It only looks like a solution because the device reviewer was terribly confused. I've posted the following previously:

Quote:

Originally Posted by sjgadsby (Post 352148)
Sadly, it appears the review at inspector-gadget is entirely off-base and this device is simply another USB hub with built-in Bluetooth adapter, not a magical USB-Bluetooth bridge. The first clue was that QVC UK (of all places) sells it. The second was the product description and review there.

If the N900 had a working host mode, that "Inspector Gadget" device could provide it additional USB ports and another Bluetooth radio. That's it. Sadly, the device is not the mythical wireless USB hub for which everyone keeps hoping.

mrebanza 2010-02-02 14:09

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by Bernard (Post 489561)
First, I never heard of this device, it seems very fake to me. There is no link to any manufacturers webpage, not even the name is mentioned, and no link to a shop that supposed to sell these devices.

Second, even if it existed it would still need drivers. Will it support the N900 and linux in general, maybe, maybe not?
And third even the fastest current BT implementation is just 3mbit/s, that is a third of USB 1.1 speeds. So it would be way to slow for a DVB-T USB dongle (my personal goal), that requires USB 2.0 speeds in most cases, depending on the transmitted bitrates.
So no, it isn't an option for my goals

http://j.mydashop.info/da_shop/20-778.jpg

they got em on eBay

http://cgi.ebay.com/2-Port-USB-HUB-C...item27ae59f4e1

sjgadsby 2010-02-02 14:12

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by mrebanza (Post 506881)
they got em on eBay

That's just another USB hub with a built-in Bluetooth dongle though. Like the Inspector Gadget one, it adds additional USB ports and a Bluetooth radio to a PC, but it doesn't help the N900.

jsa 2010-02-10 09:38

Re: N900 will not allow USB OTG!
 
USB host mode on Motorola Droid. Droid uses OMAP3430 just like the N900, I wonder if it's impossible to do with the N900 after all?

dymaxion 2010-02-11 10:22

Re: N900 will not allow USB OTG!
 
Beginning to wonder if I should have bought a Droid instead of fighting to big up the N900 to all my mates.... USB host : Droid 1, N900 Nil :-(

Bec 2010-02-11 11:20

Re: N900 will not allow USB OTG!
 
Could it be so hard for nokia getting it ALL right for once at least???
Stupid droids are indeed badly built and run a dumbed linux... but still they're pretty slim and have OTG:mad:

I hope they get it right at least with the N9-10-20, it would be about time!

kevloral 2010-02-11 12:04

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by dymaxion (Post 520890)
Beginning to wonder if I should have bought a Droid instead of fighting to big up the N900 to all my mates.... USB host : Droid 1, N900 Nil :-(

I have both and, believe me, you made the right choice.

Bratag 2010-02-12 14:13

Re: N900 will not allow USB OTG!
 
I know many smarter people than I have looked at this issue, but could

http://www.tombom.co.uk/blog/?p=124

Possibly be of any use. Reading the article as a layman it seems as though the Droid suffered from the same HW limitation.

EDIT: Never mind AS I posted this, someone else already did.

qole 2010-02-15 05:54

Re: N900 will not allow USB OTG!
 
Thought this might be a fun picture for you all.

Here I am copying files between my N900 and a 250GB HD via USB, using equipment that is both lightweight and very portable. The worst part is the cables. I need to get shorter and less bulky ones.

http://farm5.static.flickr.com/4019/...9822d2b7_b.jpg

The hard drive obviously needs power injection in order to spin up. The N900, sadly, also needs power injection. It won't go into USB mode without enough power to start charging from USB. :( :mad: (I tested with just the N900 and N800, it wouldn't work without the batteries.)

Thankfully, the 4 AA rechargable batteries have enough juice to power both the HD and the N900 through the power injection cable.

The N800's file manager shows both the hard drive and the N900's file systems.

sarahn 2010-02-15 06:30

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by qole (Post 526888)
Thought this might be a fun picture for you all.

Here I am copying files between my N900 and a 250GB HD via USB, using equipment that is both lightweight and very portable. The worst part is the cables. I need to get shorter and less bulky ones.

http://farm5.static.flickr.com/4019/...9822d2b7_b.jpg

The hard drive obviously needs power injection in order to spin up. The N900, sadly, also needs power injection. It won't go into USB mode without enough power to start charging from USB. :( :mad: (I tested with just the N900 and N800, it wouldn't work without the batteries.)

Wait, are you using the n800 as a bridge or do you have the n900 in host mode?


All times are GMT. The time now is 15:09.

vBulletin® Version 3.8.8