Active Topics

 


Reply
Thread Tools
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#1101
Upstream kernel has already debugfs for musb. I do not know if it is enough for forced host mode or not, but due to bug changes in upstream musb driver and usb code, we cannot backport upstream musb to 2.6.28.

Another problem with enumerating is somewhere in kernel modules. Sometimes it is needed to unload and load g_file_storage driver, otherwise enumeration failing and flooding dmesg with lot of errors...

I really do not know why reloading g_file_storage is needed (maybe bug in ulpi/usb/gadget code?), but it fixed more errors when I used *my* usb devices. Last time when I looked into H-E-N code it does *not* unload & load gagdet driver and my usbmode.sh script doing it. So this is reason why I suggest also try to use usbmode.sh and not only H-E-N. I do not know if somebody else has similar problem with g_file_storage or not.

And if I want to start usb host mode with charging I must do: disconnect charger, switch to peripheral mode, then switch to usb host mode with charging and then after enumeration connect charger and change boost mode back to charger. I'm not able to enable host mode (+enumeration) with attached charger.

I do not have time, so I cannot look at problems and debug it...
 

The Following User Says Thank You to pali For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1102
Originally Posted by pali View Post
Last time when I looked into H-E-N code it does *not* unload & load gagdet driver and my usbmode.sh script doing it. So this is reason why I suggest also try to use usbmode.sh and not only H-E-N. I do not know if somebody else has similar problem with g_file_storage or not.
All tests I've described were repeated (painfully) with BOTH usbmode.sh and H-E-N - of course, one after another, not at the same time So, the "main" problem that's hitting everyone doesn't seem to be related.

Originally Posted by pali View Post
And if I want to start usb host mode with charging I must do: disconnect charger, switch to peripheral mode, then switch to usb host mode with charging and then after enumeration connect charger and change boost mode back to charger. I'm not able to enable host mode (+enumeration) with attached charger.
Correct, I wasn't implying that one can switch from peripheral to hostmode with charger attached (BTw, I think you mean "(...)then switch to usb host mode with boost(...)" after peripheral).

What I meant, is that you can get through all steps to get working device in hostmode with charging, THEN switch to Peripheral, THEN disconnect charger, THEN (optionally) physically de-attach USB client device (or not, doesn't matter), THEN enable hostmode with boost again, and get working device without problems.

But, if you try the same after hoostmode with boost only (without going to "hostmode with charging" step), after switching to peripheral, and trying "hostmode with boost" again, you won't - most likely - get enumeration, successfully. You will need to connect charger for a second - or do mumbo-zumbo rituals to "fake" connecting to charger, probably, from terminal - to be even able to enumerate device again.

For me, it happens 100% of time, if I try to re-enable hostmode after short time (<minute to few minutes) after last using of hostmode. I haven't checked if it "tickles" when attempting it after longer time.

Anyway, the point is (was), that if charging is present as last step oh hostmode before going back to peripheral - or, after it, but before another hostmode attempt - it works like charm. Otherwise, it tends to fail utterly.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!

Last edited by Estel; 2014-02-02 at 14:06.
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#1103
Maybe you can ask musb devs... I think I cannot help with this problem.
 

The Following User Says Thank You to pali For This Useful Post:
Posts: 638 | Thanked: 1,692 times | Joined on Aug 2009
#1104
Originally Posted by pali View Post
Another problem with enumerating is somewhere in kernel modules. Sometimes it is needed to unload and load g_file_storage driver, otherwise enumeration failing and flooding dmesg with lot of errors...
...
I'm working on a daemon script to connect a rtl2832 dvb-t key to the N900 to grant a good percentage of successful connections (while monitoring the battery status and current absorption) and i can confirm that very often reload the g_file_storage module unlocks the musb.

The typical dmesg message that identifies a no-go situation is:
"khubd timed out on ep0in"

So, at this moment i'm using a try-and-check approach, enabling hostmode, monitoring syslog messages and restarting hostmode and enumerate when needed.
Initially i was worried about the current absorption, but now that i'm monitoring it, i must say that the problem is absolutely not there but it's probably due to a poor bus initialization that changes completely his behavior at different speeds.

Actually, the musb driver that we are using into kernel power seems to be aligned with the TI sdk:
OMAP35x-psp-sdk-02.01.03.11.tgz

Is it possible to use the drivers from the OMAP35x-PSP-SDK-03.00.01.06.tgz ?
ref:
http://processors.wiki.ti.com/index....beta_3_release

or:
http://processors.wiki.ti.com/index....elease_Package

Last edited by xes; 2014-02-12 at 02:26.
 

The Following User Says Thank You to xes For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Mar 2014
#1105
Hi guys!
I was wondering if someone could post most up-to-date version?
Thanks!
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1106
Of what?ten chars
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 
FlashInTheNight86's Avatar
Posts: 138 | Thanked: 185 times | Joined on Feb 2014
#1107
I would like to use N900 with an external hdd and charge it at the same time. Please point me where to read how.
 
joerg_rw's Avatar
Posts: 2,222 | Thanked: 12,651 times | Joined on Mar 2010 @ SOL 3
#1108
Originally Posted by FlashInTheNight86 View Post
I would like to use N900 with an external hdd and charge it at the same time. Please point me where to read how.
http://talk.maemo.org/showthread.php...203#post921203
__________________
Maemo Community Council member [2012-10, 2013-05, 2013-11, 2014-06 terms]
Hildon Foundation Council inaugural member.
MCe.V. foundation member

EX Hildon Foundation approved
Maemo Administration Coordinator (stepped down due to bullying 2014-04-05)
aka "techstaff" - the guys who keep your infra running - Devotion to Duty http://xkcd.com/705/

IRC(freenode): DocScrutinizer*
First USB hostmode fanatic, father of H-E-N
 

The Following 3 Users Say Thank You to joerg_rw For This Useful Post:
FlashInTheNight86's Avatar
Posts: 138 | Thanked: 185 times | Joined on Feb 2014
#1109
Do I get it right that I should get:
1. External HDD
2. Y-Cable for external HDD
3. USB charger with at least 1A output
4. USB AF-AF adapter
5. Any USB cable for n900
6. (Optional) USB extender for charger so that I don't have to place hdd near the power adapter

And then do:
1. Connect everything together, do not power up charger
2. Set High-Speed hostmode, vbus boost, enumerate and mount
3. Plug in / power on charger
4. Enjoy?

Last edited by FlashInTheNight86; 2014-04-08 at 05:31.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#1110
After enumerating and pluging in a charger (mount is neutral here, not required), you need to disable vbus boost, too - not from H-E-N (as it will disable whole hostmode), but from terminal (boostoff).

If you want to do the same, but via much more convenient way, just use Pali's USB mode applet (of course alongside hostmode enabled kernel, like kernel-power). There, you just need to:

1. Click "USB Host mode (with boost)" button (it will select speed, booston, enumerate etc all for you, "automagically").

2. After step 1 ends its job, plug-in charger.

3. Click "USB Host mode (with charger)" and immediately enjoy.

If you pair the above with Pali's BME replacement and CSSU'ish battery applet, you will even have working battery level indication during hostmode or hostmode with charging.

Obviously, all hardware parts (female-to-female adapter and y-cable if you want charging) are still required, no magic here.

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 3 Users Say Thank You to Estel For This Useful Post:
Reply

Tags
bada rox, detection, h-e-n, hostmode, speed, usb host

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:17.