maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   [Announce] USB hostmode beta release (https://talk.maemo.org/showthread.php?t=65232)

joerg_rw 2012-05-20 19:56

Re: [Announce] USB hostmode beta release
 
...and after 16 months Lore got a brother. Doc Noonien Soong built Data.

We are about to ship an update for h-e-n. It comes with the age old massively improved booston script. For the indicator LED flashing pattern please take care about your mce.ini as attached to that post, or simply look into /usr/sbin/booston header where it's also mentioned, though no actual pattern definition included.

Enjoy
jOERG

pali 2012-05-20 20:05

Re: [Announce] USB hostmode beta release
 
@joerg_rw: did you looked at my bq2415x kernel driver? it also support boost mode with auto reset timer What about to use it instead booston script (host mode needs also stopping bme, so bq2415x driver can be loaded)?

joerg_rw 2012-05-20 20:11

Re: [Announce] USB hostmode beta release
 
Quote:

Originally Posted by pali (Post 1209829)
@joerg_rw: did you looked at my bq2415x kernel driver? it also support boost mode with auto reset timer What about to use it instead booston script (host mode needs also stopping bme, so bq2415x driver can be loaded)?

Pali,
I think this driver is a brilliant approach, but not easily included to such a nobrainer "update".
We need to work out how to change h-e-n bits and pieces to make proper use of the bq2415x.ko driver, how to check dependencies etc pp.
TBH I haven't even touched KP50 yet.
I guess I'll look into it during the next weeks.

Anyway many thanks already :-) Much appreciated job you're doing there.
/j

ivgalvez 2012-05-21 12:17

Re: [Announce] USB hostmode beta release
 
Great update, thank you joerg_rw and MAG.

vetsin 2012-05-21 16:21

Re: [Announce] USB hostmode beta release
 
I think this update deserves more exposure so I'll give this a little bump. :)
Thanks for the update guys and gal(s)!

pablocrossa 2012-05-22 03:07

Re: [Announce] USB hostmode beta release
 
1 Attachment(s)
I would like to add my 2 cents to this project by attaching my modified charge21.sh so that whenever charging with BME stopped (such as using a y-nested cable while hosting) not only the LED patterns work but the data in HAL is also updated (meaning the battery icon updates, for example :D). Please some developer check I am not going to fry anyone's N900 with this, it is pretty much an unmodified charge21.sh.txt but with several lines for HAL value setting and MCE LED control added. It is pretty dirty so the bars on the battery will not match the original counting method but it works fine for me :D I also believe the CPU usage should be higher than the original but it is very late here, I will optimize it tomorrow :rolleyes:

I thought as this is an awesome project and I wanted this feature so bad I added it to the original script (I hope all the work is of some use, hopefully it has not been done before). Hope someone finds it as useful as me :) run it as root and you should be good to go :)

joerg_rw 2012-05-22 07:17

Re: [Announce] USB hostmode beta release
 
nice! :-) Many thanks, pablocrossa!
One first remark: I doubt line 242 " echo 0 > /sys/devices/platform/musb_hdrc/connect" will work here, but then OTOH I also doubt it ever will get reached.

/j

pablocrossa 2012-05-22 11:34

Re: [Announce] USB hostmode beta release
 
Quote:

Originally Posted by joerg_rw (Post 1210604)
nice! :-) Many thanks, pablocrossa!
One first remark: I doubt line 242 " echo 0 > /sys/devices/platform/musb_hdrc/connect" will work here, but then OTOH I also doubt it ever will get reached.

/j

It was included in the script so I left it unchanged :) It is good to know you found no big problems with it :)

pablocrossa 2012-05-22 12:52

Re: [Announce] USB hostmode beta release
 
How can I know from the terminal if I am plugged into a PC?? How does the N900 know when to trigger the "PCsuite or mass storage" dialogue and when not to?? When I plug in with the y-nested cable to a PC so the PC supplies power it knows it is not a wall charger but it also does not query me with the dialogue, however when I plug it in with the normal cable to the PC it does.
What can I cat / command can I run to figure this out?? Thank you :)

EDIT: For future reference got it, while running charge script

if we are charging, if we are not plugged to the wall and if `cat /sys/devices/platform/musb_hdrc/mode` = b_idle
nested

if we are charging and if `cat /sys/devices/platform/musb_hdrc/mode` = b_peripheral
PC

if we are charging and if we are plugged to the wall
Wall Charger

pablocrossa 2012-05-22 14:45

Re: [Announce] USB hostmode beta release
 
Another question, is there a way to know if a USB cable is plugged in even if it is not plugged into a host (because it, for example, shorts pins 4 and 5)?? Thank you


All times are GMT. The time now is 05:05.

vBulletin® Version 3.8.8