Closed Thread
Thread Tools
Posts: 38 | Thanked: 8 times | Joined on Apr 2010
#681
"No" or No ?
 
Posts: 310 | Thanked: 383 times | Joined on Jan 2010
#682
Quite a long thread; I'm sure I'm the millionth person to ask this, but what's the current thinking re: host mode? Is it likely to be possible using an external power supply?

If it's just a wiring and driver issue I'll have some free time in the next couple weeks to look into it.

Alternatively, anyone know if the Belkin USB over 802.11 hub speaks some common protocol supported in the kernel? Anyone know of a more portable (small / battery powered) version?
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#683
5V VBUS supply WORKS!


./i2cset -y -m 0x07 2 0x6b 0x01 0x05

lights up all the fancy LEDs on a connected USB hub.

BEWARE: this is an intermediate result and not yet tested to be safe for anything. Also bme intercepts the boost mode setting of bq24150 and stops 5V after ~0.5..1sec

So this is just meant to let you know the chances getting better for USB hostmode every day. We need someone to fix the obviously broken musb_hdrc driver (http://mxr.maemo.org/fremantle/sourc...sb_core.c#2010)

/jOERG
[edit]
refer: Selecting_USB_host_modes (on Openmoko GTA02 - well it's Linux too )

The bme assumption seems correct:
Code:
killall -SIGSTOP bme_RX-51; \
./i2cset -y -m 0x07 2 0x6b 0x01 0x05; sleep 10; \
 killall -SIGCONT bme_RX-51
which gives 10 seconds of VBUS power.

alas we need bme to tickle the system watchdog, otherwise reboot after a short time


Also bq24150 itself has a watchdog timer that'll stop boostmode if not reset properly on a regular schedule. To check this, you may replace sleep 10 by sleep 40 in above cmdline, and watch VBUS 5V drop after 32s on bq24150 watchdog timeout, even though bme still stopped

Last edited by joerg_rw; 2010-04-30 at 23:43.
 

The Following 36 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#684
Originally Posted by joerg_rw View Post
5V VBUS supply WORKS!


./i2cset -y -m 0x07 2 0x6b 0x01 0x05

lights up all the fancy LEDs on a connected USB hub.

BEWARE: this is an intermediate result and not yet tested to be safe for anything. Also bme intercepts the boost mode setting of bq24150 and stops 5V after ~0.5..1sec

So this is just meant to let you know the chances getting better for USB hostmode every day. We need someone to fix the obviously broken musb_hdrc driver (http://mxr.maemo.org/fremantle/sourc...sb_core.c#2010)

/jOERG

The bme assumption seems correct:
Code:
killall -SIGSTOP bme_RX-51; \
./i2cset -y -m 0x07 2 0x6b 0x01 0x05; sleep 10; \
 killall -SIGCONT bme_RX-51
which gives 10 seconds of VBUS power.

alas we need bme to tickle the system watchdog, otherwise reboot after a short time


Also bq24150 itself has a watchdog timer that'll stop boostmode if not reset properly on a regular schedule. To check this, you may replace sleep 10 by sleep 40 in above cmdline, and watch VBUS 5V drop after 32s on bq24150 watchdog timeout, even though bme still stopped
Say me what to do with chip. I tried to follow up this thread but I lost.
 

The Following User Says Thank You to egoshin For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#685
well, let's call it the day hostmode-0.0.1 was put to work.

I got a usb hub with a red power-LED and 4 green action LEDs for the 4 downstream ports.

The cmdline
Code:
'killall -SIGSTOP bme_RX-51; ./i2cset -y -m 0x07 2 0x6b 0x01 0x05; sleep 10;  killall -SIGCONT bme_RX-51'
makes the red LED shine for 10 sec, and the moment BME starts again, it obviously talks to the hub chip so all the 4 green LED flash up for <0.5s, then VBUS is disabled.

This clearly indicates to me BME or whatever friggin driver (musb_hdrc?) is *talking* to the hub, and that's hostmode basically.
It just needs to stop talking gibberish, and act like a serious host -> decent driver support is all that's missing

[edit]
Q: maybe the green LEDs just flash because voltage drop?
A: fired the sleep10 cmdline, plugged power wallwart to hub while still powered from N900 -> red powerLED continues shining, but still the green LEDs flash when bme kicks in

Last edited by joerg_rw; 2010-04-30 at 18:25.
 

The Following 8 Users Say Thank You to joerg_rw For This Useful Post:
Posts: 310 | Thanked: 383 times | Joined on Jan 2010
#686
Originally Posted by joerg_rw View Post
well, let's call it the day hostmode-0.0.1 was put to work.

I got a usb hub with a red power-LED and 4 green action LEDs for the 4 downstream ports.

The cmdline
Code:
'killall -SIGSTOP bme_RX-51; ./i2cset -y -m 0x07 2 0x6b 0x01 0x05; sleep 10;  killall -SIGCONT bme_RX-51'
makes the red LED shine for 10 sec, and the moment BME starts again, it obviously talks to the hub chip so all the 4 green LED flash up for <0.5s, then VBUS is disabled.

This clearly indicates to me BME or whatever friggin driver (musb_hdrc?) is *talking* to the hub, and that's hostmode basically.
It just needs to stop talking gibberish, and act like a serious host -> decent driver support is all that's missing

[edit]
Q: maybe the green LEDs just flash because voltage drop?
A: fired the sleep10 cmdline, plugged power wallwart to hub while still powered from N900 -> red powerLED continues shining, but still the green LEDs flash when bme kicks in
Just curious; did you try running lsusb while the hub was powered? Is anything registered?
 

The Following 3 Users Say Thank You to nightfire For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#687
Originally Posted by nightfire View Post
Just curious; did you try running lsusb while the hub was powered? Is anything registered?
No. But I checked dmesg. usually nothing in there.
But one single time after reboot, I got the "mass storage or PC mode?" requester when enabling VBUS. Probably caused by >>VBUS detected; bme due to race not yet noticed boostmode; no short D+/- so no charger -> this has to be a host PC plugged in to N900<< (I simply did the i2cset without suspending bme)
Funny part 1: VBUS stayed on for several minutes, until I finally hit 'PC mode' on requester.
Funny part2: this is the resulting dmesg:
Code:
[76624.034576] wlan0: associated
[78399.983673] regulator_disable: not in use by this consumer
[78399.983734] regulator_disable: not in use by this consumer
[78709.753387] musb_hdrc musb_hdrc: remove, state 4
[78709.753448] usb usb1: USB disconnect, address 1
[78709.774261] musb_hdrc musb_hdrc: USB bus 1 deregistered
[78709.918060] g_nokia gadget: using random self ethernet address
[78709.918090] g_nokia gadget: using random host ethernet address
[78710.038238] usb0: MAC 2a:a5:a9:7c:a5:1c
[78710.038269] usb0: HOST MAC 5e:b2:fd:34:32:fa
[78710.038299] g_nokia gadget: USB CDC Phonet function
[78710.038299] g_nokia gadget: using musb_hdrc, OUT ep1out, IN ep1in
[78710.038391] g_nokia gadget: USB CDC Phonet function
[78710.038421] g_nokia gadget: using musb_hdrc, OUT ep1out, IN ep1in
[78710.038665] g_nokia gadget: N900 (PC-Suite Mode)
[78710.038665] g_nokia gadget: g_nokia ready
[78710.038696] musb_hdrc musb_hdrc: MUSB HDRC host driver
[78710.040313] musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
[78710.041015] usb usb1: configuration #1 chosen from 1 choice
[78710.041412] hub 1-0:1.0: USB hub found
[78710.041534] hub 1-0:1.0: 1 port detected
[79807.406707] regulator_disable: not in use by this consumer
[79807.406768] regulator_disable: not in use by this consumer
Nokia-N900-02-8:/home/user/i2c#
(http://paste.debian.net/71423/)

Will check lsusb and lsmod in a minute
/jOERG

[edit]
Nokia-N900-02-8:/home/user/i2c# killall -SIGSTOP bme_RX-51; ./i2cset -y -m 0x07 2 0x6b 0x01 0x05; sleep 10;lsusb; sleep 10; killall -SIGCONT bme_RX-51
Bus 001 Device 001: ID 1d6b:0002
Nokia-N900-02-8:/home/user/i2c# lsusb
Bus 001 Device 001: ID 1d6b:0002
Nokia-N900-02-8:/home/user/i2c#

Last edited by joerg_rw; 2010-04-30 at 19:06.
 

The Following 12 Users Say Thank You to joerg_rw For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#688
Originally Posted by egoshin View Post
Say me what to do with chip. I tried to follow up this thread but I lost.
Sorry I'm not sure what you want to ask me. Please elaborate

/jOERG
 

The Following User Says Thank You to joerg_rw For This Useful Post:
Posts: 82 | Thanked: 214 times | Joined on Jan 2010 @ Cape town
#689
joerg, great work on piecing all this together... I recall your work on the Openmoko project.

It appears as if this is even better than what I thought, which was that host mode would be possible eventually, just with a mess of cabling and an external power supply (a la GTA01).

Crossing fingers, it looks like 'all' we will eventually need is a cable that plugs into the N900's microUSB port, and gives a simple USB female port, that will allow us to plug in any device we wish. Although with the state of the drivers, that still looks like it's a long way off... It would be interesting to know how much current it can provide, hopefully the full 500mA.
 

The Following User Says Thank You to cb22 For This Useful Post:
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#690
Originally Posted by cb22 View Post
It would be interesting to know how much current it can provide, hopefully the full 500mA.
I(BO) Maximum output current for boost
at V(BUS_B) = 5.05 V, 2.5 V < V(AUXPWR=Vbat) < 4.5 V
= 200 mA

Thanks for thanking
/j
 

The Following 6 Users Say Thank You to joerg_rw For This Useful Post:
Closed Thread

Tags
awesomeness in the works, boulevard of broken deals, host, i am the dealbreaker, inspector gadget lies, mobidapter is a scam, nokia fanbois, otg, over 9000, usb, usbcontrol


 
Forum Jump


All times are GMT. The time now is 00:45.