On 10/02/2012 11:18 PM, Nikolay Rogoshchenkov wrote:
For example, I have a USB camera connected to my USB port, and I should know Bus number and Device number, you can get this information from console, or from /var/log/messages.
I know that this cam is "usb 1-2", than I open this: /sys/bus/usb/devices/usb1/1-2 
and preform  this: echo 0 > bConfigurationValue to disable device
and  echo 1 > bConfigurationValue to enable it.

That's it.
 
--
Rogoshchenkov Nikolay


On Wed, Sep 26, 2012 at 10:35 AM, zhonghua <zhonghua@sics.se> wrote:
Hi lists,

I am trying to control the USB host port. That is to turn on or off the power of this port to control a linked node (Tmote Sky). I tried it as the suggestion of Nikolay Rogoshchenko, which is playing with files of
*/sys/bus/usb/devices/usb<n>/power/**
 

But I don't know how to run these files. Does anyone know how to play with them?



Sincerely,


Zhonghua

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users




------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev


_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Thank you Nikolay. I tried your method, the result is same as controlling the 'authorized' file. Controlling either 'bConfigurationValue' or 'authorized' file can enable or disable the device but cannot reset the device. What I want to do is to reset the device through USB port. I wrote a simple counter to test it. By the suggested method, the device can be disabled but after it is enabled the counter will not count from the beginning.
From the technical reference manual of OMAP35x Applications Processor, I found there is a software reset option (23.1.3.1.2 subsection, page 3184) may be used to reset the device connected to the USB port. In table 23-11, the register OTG-SYSCONFIG can be reconfigured (the bit 1) to realise the function of reset. But I don't know how to do the reconfiguration. I think it maybe not dynamic controllable but has to be compiled each time when we want to reconfigure the value. So do you have any suggestion?

Regards,

Zhonghua