I have a question about the power management of the cRIO usb ports.
I'm using the cRIO-9034 for the RT test bench and one of the requirement is to swith on/off the power of usb port to stress the external device.
I try to found the query that I can set to the command ligne in my RT app that will enable/disable or power on/off a usb port.
Actually I'm blocked because in the std Linux distribute I have an acces to this path :
echo disable > /sys/bus/usb/devices/usb1/power/wakeup
and then I can
echo on > /sys/bus/usb/devices/usb1/power/level # turn on echo suspend > /sys/bus/usb/devices/usb1/power/level # turn off
But the RTOS of my cRIO hasn't the "power" folder. I've tried to change the value of bMaxPower file (default it is 500mA) but I have no permissions.
Today I have no idea is it possible to do without any external device.
Yes, I've tried it also.
The problem is that the folder with bMaxPower (that influence the connection) not exists before the connection of the external device (port definition, etc). When I connect the device, It creates with the default parameters and when I change the value it is not instantly applied. If I restart the cRIO the default value is in place.
Finally I see that the Linux RTOS of cRIO has too much restriction, I will use the DO of the NI c-series module to drive directly the power of external device or to drive the external USB digital switch based on transistor switch.