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)

ryu1 2011-11-28 19:41

Re: [Announce] USB hostmode beta release
 
Where can i download charger.sh, the download link seems dead.

sicelo 2011-11-28 19:47

Re: [Announce] USB hostmode beta release
 
Latest charger.sh is here
http://enivax.net/jk/n900/charge21.sh.txt
just remove the .txt

5spdvl 2011-11-30 23:09

Re: [Announce] USB hostmode beta release
 
I've been trying the charger.sh script, however whenever I execute it, the mounted media is unmounted, and cannot be accessed unless I close h-e-n/xterm and start again.

Steps:
  • connect standard nokia micro USB data cable to N900, three-way cable to this, then flash drive to one prong, charger UNPLUGGED to the other
  • open h-en, mount flash drive as high speed (successfully, Sandisk 16Gb)
  • open xterm, as root run "sh charger.sh"
  • plug in ac adaptor
  • code runs, phone starts charging as per xterm output (which mathces with Conky's details, not sure if Conky's readout is inaccurate during h-e-n)

After charger.sh is executed, the media is unmounted. Any ideas?

joerg_rw 2011-12-01 05:08

Re: [Announce] USB hostmode beta release
 
Quote:

Originally Posted by 5spdvl (Post 1131340)
I've been trying the charger.sh script, however whenever I execute it, the mounted media is unmounted, and cannot be accessed unless I close h-e-n/xterm and start again.

Steps:
  • connect standard nokia micro USB data cable to N900, three-way cable to this, then flash drive to one prong, charger UNPLUGGED to the other
  • open h-en, mount flash drive as high speed (successfully, Sandisk 16Gb)
  • open xterm, as root run "sh charger.sh"
  • plug in ac adaptor
  • code runs, phone starts charging as per xterm output (which mathces with Conky's details, not sure if Conky's readout is inaccurate during h-e-n)

After charger.sh is executed, the media is unmounted. Any ideas?

yeah, please follow advice in the relevant post in this thread ( http://talk.maemo.org/showthread.php...203#post921203 )

When charger.sh runs and no charger is providing power - where is power from then? -> hostmode terminated

/j

5spdvl 2011-12-01 05:49

Re: [Announce] USB hostmode beta release
 
Ahh - I misinterpreted when to plug in the ac adaptor. Cheers joerg_rw.

Edit: just confirming that this now works.
  • connect all cables, excluding ac adaptor
  • mount media
  • connect ac adaptor to cables
  • as root, sh charger.sh
  • enjoy

Estel 2011-12-01 18:36

Re: [Announce] USB hostmode beta release
 
Not mean to be "picky", but boostoff (before executing charge.sh) would be also useful ;) Sure, it (probably) also works without doing so, but there is no point in keeping it, if You want power-saving, or charging as quickly as possible.

5spdvl 2011-12-02 09:49

Re: [Announce] USB hostmode beta release
 
Managed to mount a 500Gb passport HDD today, that formerly wouldn't mount (insufficient power from the N900). Rather than use a powered hub to power the drive, and then a separate AC adaptor to charge my N900, I modified the AC adaptor to have three USB ports: original port, that will charge my N900 over the Y cable, and a pair of ports that act like a female-female adaptor for joining two male ends together. These pair of ports take +ve/-ve from the AC adaptor, so in one port you plug your media/peripheral to be powered, and the other port takes the data cable that goes to your N900 (the other part of the Y cable). See picture. Probably not the safest thing going, but I will be tidying it up.

http://i234.photobucket.com/albums/e...PoweredHub.jpg

5spdvl 2011-12-03 05:58

Re: [Announce] USB hostmode beta release
 
Completed.

http://i234.photobucket.com/albums/e...111203_002.jpg

blue_led 2011-12-03 13:19

@ hostmode script ( worklog )
 
until now ...
status area icon - ok . it is a stock icon, blue.
it is activated when an valid device is connected. tap on status area will show an text saying "Host mode active".
More informations and actions will be added later after the moment when the script is stable

switching ( guessing ) speed work almost well. it is based on dmesg output
there is multiple ways doing this but not all are reliable. after 300 tests...
first method
first starting as high speed then low then full.
reason :
most connected devices are usb sticks, on second place mouses or keyboards
for this method there is a problem for sensing low speed devices in high speed mode.
khubd daemon interfere with driver and is hard to put whole system in a stable state.
second method
started as full speed and watching dmesg messages switch the speed accordingly. the fastest method, only 2 steps
reason :
if an full speed device is connected it will work "instantly". high speed devices are detected also in full speed mode and dmesg output is useful
but there is a problem with low speed device in full speed mode and khubd go crazy. this will add 20 s for a stable state. more tests are needed in this mode
third method
start as low speed then full then high. the most stable method
reason:
low speed devices are detected "instantly"
high or full speed devices are detected well. so continuing as full speed, the "full"devices will work and "high" devices are properly signalized

khubd and g_file_storage make a lot of problems.
for khubd there is an workaround flushing all configs but add 20 s for each khubd error.
g_file_storage need a patch because in high speed mode when a low speed device is attached it will trigger "mass storage" "Pc suite" selection. this can be ignored but is annoying.

a preference can be set in the script for first tested speed

later or tomorrow an alpha variant will be posted

pali 2011-12-03 14:09

Re: [Announce] USB hostmode beta release
 
@blue_led:
why is problem with autodetection usb speed? and it is possible to check if host usb device or charger is connected?


All times are GMT. The time now is 18:51.

vBulletin® Version 3.8.8