Active Topics

 


Reply
Thread Tools
Posts: 227 | Thanked: 51 times | Joined on Feb 2006
#1
I know you can enable / disable USB host with the flasher tool but I could have sworn I saw somewhere a simple command that you could do in XTerm to enable / disable USB host. Can't find it with Google, does someone know?
David
 
Posts: 160 | Thanked: 1 time | Joined on Mar 2006
#2
command to put it into host mode:

echo host > /sys/devices/platform/tahvo-usb/otg_mode

command to put it into peripheral mode:

echo peripheral > /sys/devices/platform/tahvo-usb/otg_mode
 
Posts: 182 | Thanked: 3 times | Joined on Mar 2006
#3
Wait, do you have to be in Root on your 770 for these commands to work(sudo gainroot)? Because when I try them in root, they don't work.

Last edited by kutibah; 2006-04-08 at 19:15.
 
Posts: 160 | Thanked: 1 time | Joined on Mar 2006
#4
Yes, you need to be root. Are you getting an error message, or are they just not working?

Last edited by troubleshootr; 2006-04-09 at 01:55.
 
Posts: 182 | Thanked: 3 times | Joined on Mar 2006
#5
Originally Posted by troubleshootr
Yes, you need to be root. Are you getting an error message, or are they just not working?
Well, I originally enabled USB Host mode through Linux flasher. So I tried to disable it through XTerm in root, but it stays in USB Host mode. So I have to disable USB Host mode through the Linux flasher as well. I don't understand what's wrong?
 

The Following User Says Thank You to kutibah For This Useful Post:
Posts: 160 | Thanked: 1 time | Joined on Mar 2006
#6
Since I do not use the flasher to put the device in host mode, I dont know if that is what is blocking you. Try this:
Use the flasher to put the 770 in peripheral mode (normal mode)
Issue the host command as root (note the device does not appear to be in host mode)
check dmesg, your device should be listed
mount the drive or whatever
when you are done issue the peripheral command to put back in peripheral mode

I just use it to access a external USB hard drive and it works great. I have always entered USB-host mode by using the terminal.

Last edited by troubleshootr; 2006-04-09 at 04:11.
 
aflegg's Avatar
Posts: 1,463 | Thanked: 81 times | Joined on Oct 2005 @ UK
#7
Using the Flasher *forces* USB host mode. However, if the USB is set to device mode, the above commands will allow you to enable host mode temporarily (i.e. until you execute the command on the device to return to device mode, or reboot)

This is almost always going to be better for you, as USB host mode disables some of the power management facilities; resulting in a faster draining battery.

HTH,

Andrew
 
Posts: 182 | Thanked: 3 times | Joined on Mar 2006
#8
Thanks guys!
 
Posts: 4 | Thanked: 0 times | Joined on Oct 2006
#9
Apologies for being the whiny end-user here (I'm VERY new to linux in general).Any chance someone could write/share a script or applet for switching USB modes, would be a bit quicker and more practical when you're on the move than having to open up Xterm every time you want to switch modes and plug in a keyboard or USB key ?
 
Reply


 
Forum Jump


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