View Single Post
Posts: 306 | Thanked: 566 times | Joined on Jan 2010 @ Romania
#949
1) charging hostmode
until now i can't find a solution to detect a charger when vbus is 5V.
monitoring battery current, voltage ... no work
so there is two solutions
a) charging_hostmode-hardware_assisted mean a delay circuit controlled by vbus and controlling voltage applied to the vbus. A delay of 40s from first high transition of vbus is enough to allow n900 to detect and controll usb-phy
a variant of this solution can be ID pin signalling on external charger after a delay. this is very easy to detect ( kernel side ) and easy to write a udev rule . ( this will be my final choice for myself )

b) status area aplet with "Charge" button > more friendly with users who are not electronic engineers

i will provide both solutions ( with schematic )

2) some mount problems
i tested my script with direct attached flash media . in case if hub is used this add a delay until flash media is detected. i assume 7s is enough .
qiuck workaround > increase the delay ( sleep 7 ) after (banner "$m13";sleep 1) line until the hdd are mounted . try 15s

some hubs don't properly handle full speed timings. in the next release high speed will have priority

the mount job will be removed from the script but unmount will be keep for a while.
automount is tested and working but abrupt remove of media can cause some problems
filemanager go crazy ( cpu ^ 80% ) if a device is removed and usb virtualhub can't handle reset event properly messing badly the things.

now i test some nasty ideas

the script can be used with any usb device !!
please report if anyone use script icon on desktop
__________________
Automatic speed Hostmode

Last edited by blue_led; 2011-12-13 at 01:50.
 

The Following 5 Users Say Thank You to blue_led For This Useful Post: