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)

joerg_rw 2010-05-11 20:03

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by blue_led (Post 654034)
the only one i found is different length of pins inside receptacle ( tolerances or overheat & melted plastic of receptacle body during manufacturing process of adapter )
different connection is made first : ground , vbus and datalines and sometimes something go wrong

Usually GND and +5V should be noticeably longer than data line contacts, so always power and GND make first break last. At least that's the specs.
/j

blue_led 2010-05-11 22:47

Re: N900 will not allow USB OTG!
 
if datalines pins on the ends of F-F adapter have different length this can matter when busreset .

On topic:
[joke] why , why .... i'm gonna cry [/joke]
rx51_defconfig
.....
1410 # CONFIG_USB_DEVICE_CLASS is not set

javispedro 2010-05-11 23:43

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by blue_led (Post 654259)
....
1410 # CONFIG_USB_DEVICE_CLASS is not set

Deprecated, not required AFAIU.

See http://cateee.net/lkddb/web-lkddb/USB_DEVICE_CLASS.html

Benson 2010-05-12 00:52

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by joerg_rw (Post 653883)
We really need to check why 'echo host >mode' seems to have no effect - evidence for the missing effect is the usage of the whitelist.
Probably there are parts missing in the source, for handling plain vanilla hostmode.

Isn't that just because of:
Quote:

Originally Posted by blue_led
and rx51_defconfig
1436 # CONFIG_USB_MUSB_HOST is not set
1437 # CONFIG_USB_MUSB_PERIPHERAL is not set
1438 CONFIG_USB_MUSB_OTG=y

Or is your kernel configured with CONFIG_USB_MUSB_HOST?

(EDIT: Or am I completely wrong and we don't want CONFIG_USB_MUSB_HOST?)

egoshin 2010-05-12 06:19

Re: N900 does now allow USB hostmode!
 
@Joerg

Again, good news - I repeated test suggested by you but replaced 'stop bme' to 'killall -SIGSTOP bme_RX-51'.

Quote:

Originally Posted by joerg_rw (Post 650247)
[*]And finally, maybe you can replace the TWL4030 VBUS boostmode call by a call to bq24150 (or a system() call [man 3 system] to invoke my above posted cmdline like
Code:

/bin/sh -c '/sbin/stop bme && sleep 3 && /usr/local/i2cset -y -m 0x07 2 0x6b 0x01 0x05 && while sleep 28; do /usr/local/i2cset -y -m 0x80 2 0x6b 0x00 0x80; done &'
)

Now it works, even on stock (unmodified) kernel.

However, I doesn't work well with my USB memory stick because read returns error -32 (EPIPE). But it still exchanges some info because device "not accepting address 8" (or ever). A modified kernel is needed to find out details why it reads descriptors with EPIPE.

And it also works only around 30-50secs because DSME reboots N900 due to BME failure.

So, conclusion - BME disables somehow host mechanism then it exits. Probably - to prepare a hardware charging.

EDIT: exact sequence on unmodified kernel:

1. plug to PC, answer "PC suite"
2. echo host >/sys/devices/platform/musb_hdrc/mode
3. echo H >/proc/driver/musb_hdrc
4. /bin/sh -c 'killall -SIGSTOP bme_RX-51 && sleep 3 && /usr/local/i2cset -y -m 0x07 2 0x6b 0x01 0x05 && while sleep 28; do /usr/local/i2cset -y -m 0x80 2 0x6b 0x00 0x80; done &
5. disconnect USB from PC and connect to USB memory stick or extrnal hard disk or HUB.
6. lsusb -- or just wait
7. Look into /var/log/syslog for messages.

(Sometime I add yet another additional steps 2 and 3 after 4).

titan 2010-05-12 06:24

Re: N900 will not allow USB OTG!
 
I have build a special version of the power-user kernel with USB debugging and verbose enumeration enabled, and the USB blacklist disabled (w/o whitelist it ended up in a reboot loop).
Modules for all common USB device classes are already included (for USB/IP).
I hope it can help you to get USB hostmode working on the N900.

download and install in this order
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
the kernel configuration is http://maemory.com/N900/kernel/testi...ower_defconfig

good luck!

phedders 2010-05-12 07:14

Re: N900 will not allow USB OTG!
 
Unfortunately... it didnt work - I'll have to think again :O)

~/.bin $ uname -a
Linux Nokia-N900 2.6.28.10powerusb28 #2 PREEMPT Wed May 12 08:03:07 CEST 2010 armv7l unknown

So definately the right kernel. Huge thanks for building it - I'll shout when I work out what module or includes are really needed.

Quote:

Originally Posted by titan (Post 654575)
I have build a special version of the power-user kernel with USB debugging and verbose enumeration enabled, and the USB blacklist disabled (w/o whitelist it ended up in a reboot loop).
Modules for all common USB device classes are already included (for USB/IP).
I hope it can help you to get USB hostmode working on the N900.

download and install in this order
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
the kernel configuration is http://maemory.com/N900/kernel/testi...ower_defconfig

good luck!


EDIT: Am I a dope or what?

CONFIG_IP_MULTIPLE_TABLES and CONFIG_IP_ROUTE_MULTIPATH << has to be the ones.... :D

titan 2010-05-12 07:25

Re: N900 will not allow USB OTG!
 
note that phedders' comment is about a network function I added as well.
it's not about the USB host mode.

for discussion about the kernel please go to http://talk.maemo.org/showthread.php?t=43420

Quote:

Originally Posted by phedders (Post 654636)
Unfortunately... it didnt work - I'll have to think again :O)


javispedro 2010-05-12 09:21

Re: N900 does now allow USB hostmode!
 
Quote:

Originally Posted by egoshin (Post 654566)
So, conclusion - BME disables somehow host mechanism then it exits. Probably - to prepare a hardware charging.

I think this is the most interesting discovery so far. Now the question is: how? (and of course, what).
Should a strace of bme terminating help?

joerg_rw 2010-05-12 13:25

Re: N900 will not allow USB OTG!
 
Quote:

Originally Posted by titan (Post 654575)
I have build a special version of the power-user kernel with USB debugging and verbose enumeration enabled, and the USB blacklist disabled (w/o whitelist it ended up in a reboot loop).
Modules for all common USB device classes are already included (for USB/IP).
I hope it can help you to get USB hostmode working on the N900.

download and install in this order
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
http://maemory.com/N900/kernel/testi...mo28_armel.deb
the kernel configuration is http://maemory.com/N900/kernel/testi...ower_defconfig

good luck!

Thanks a lot, Titan! :)
/j


All times are GMT. The time now is 07:30.

vBulletin® Version 3.8.8