| The Following User Says Thank You to fanoush For This Useful Post: | ||
|
|
2007-07-31
, 13:29
|
|
Posts: 12 |
Thanked: 0 times |
Joined on Jul 2007
|
#22
|
|
|
2007-07-31
, 18:52
|
|
|
Posts: 1,361 |
Thanked: 115 times |
Joined on Oct 2005
@ Toronto, Ontario, Canada
|
#23
|
|
|
2007-08-12
, 08:43
|
|
Posts: 26 |
Thanked: 0 times |
Joined on Aug 2007
|
#24
|
|
|
2007-08-16
, 03:04
|
|
Posts: 5 |
Thanked: 0 times |
Joined on Aug 2007
|
#25
|
|
|
2007-09-22
, 15:56
|
|
Posts: 5 |
Thanked: 0 times |
Joined on Aug 2007
|
#26
|
/etc/init.d/ke-recv stop before and start after to let maemo platform notice the change
here is my dirty and unfinished script, it adds just usb storage functionality, for other (hid,network,serial,..) add additional modules from beginning of /mnt/inifs/linuxrc. the script currently does not remove any modules (they need to be removed in reverse order)
#!/bin/sh # use gainroot to become root and relaunch itself if [ `id -u` != 0 ] ; then #if not already root, call itself as root exec sudo gainroot <<EOF exec $0 $* EOF exit $? fi # real script follows HOST_MODULES="ohci-hcd scsi_mod sd_mod usb-storage" MODULE_PATH=/mnt/initfs/lib/modules/current insert_modules(){ for mod in $* ; do if [ -f $MODULE_PATH/${mod}.ko ]; then insmod $MODULE_PATH/${mod}.ko fi done } remove_modules(){ echo } OTG_MODE="/sys/devices/platform/tahvo-usb/otg_mode" enable_host(){ insert_modules $HOST_MODULES echo host >${OTG_MODE} } disable_host(){ echo peripheral >${OTG_MODE} remove_modules } /etc/init.d/ke-recv stop mode=$(cat $OTG_MODE) case $mode in host) echo "switching host -> client" disable_host ;; peripheral) echo "switching client -> host" enable_host ;; esac /etc/init.d/ke-recv startBTW I tried USB host mode only recently when I got external USB enclosure for 2.5" disk. It comes with mini-USB cable with Y-power splitter i.e. one extra usb plug to provide additional power. This cable is enough to have usb host mode working on n770, no other hacking needed. You just need to insert the extra cable to something powered. I have 5V travel charger with usb female socket and it worked just fine. For mobile usage I plan to make pack of 4xAA rechargeables (4*1.2V=~4.8V) with usb female socket.
Newbies click here before posting. Thanks.
If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.