Thanks for the suggestion!
I know this can be done with a relay but it's not doable in my particular case. I really need to find out how to do this in software.
Unbind and bind in /sys/bus/usb/drivers/... won't work either, btw. I managed to turn the interface(s) off and on but not the power supply. So the problem persists.
There is a maximum power setting that allows to specify the number of mA but is tells me that I don't have permission (as root) to make changes.
It's also not possible to unplug and replug the interfaces as they are in a closed box.
-----Ursprüngliche Nachricht----- Von: Py Fave [mailto:pyfave@gmail.com] Gesendet: Mittwoch, 16. Oktober 2013 22:46 An: Ingo Betreff: Re: [PD] USB power off from [shell] for eliminating MIDI interfaceproblems
get a relay , transistor and a arduino, or perhaps this card is easy to use : and talks hid ,
http://www.1010.co.uk/org/byron.html
usb resets if overloaded too.... not a suggestion
2013/10/16 Ingo ingo@miamiwave.com:
I have tried
echo on > /sys/bus/usb/devices/usb1/power/level # turn on echo suspend > /sys/bus/usb/devices/usb1/power/level # turn off
with different devices (like 4-2 which is the MIDI interface) and I'm
always
getting "invalid argument" when I try to use "suspend".
Any ideas?
Ingo
A while ago a MIDI interface problem came up here that nobody seemed to really know about:
All the sudden huge delays in the range of one or more seconds started
to
happen and then the interface sometimes possibly started playing notes, etc. on its own. I had experienced this quite a few times with Pd on Windows and Linux
and
already way back (about 25 years ago) with my Akai MPC60 drum
sequencer.
I finally found out what causes it. When starting the computer the interface gets powered up as well before the system is ready to receive any information coming from the interface. Therefor the interface keeps every input on the MIDI side in a buffer until it can transmit it to the USB port.
From time to time the buffer gets completely overloaded during startup when receiving too much MIDI what in return makes the interface go nuts! The only way to reset it is to disconnect it from power.
Now here is my question:
Does anybody know how I can power off a USB port (probably using
[shell])
to do a reset (USB power off - USB power on) while or after loading the patch?
I'm on Ubuntu Natty.
Thanks Ingo
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management ->
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2013-10-17 10:27, Ingo wrote:
Thanks for the suggestion!
I know this can be done with a relay but it's not doable in my particular case. I really need to find out how to do this in software.
Unbind and bind in /sys/bus/usb/drivers/... won't work either, btw. I managed to turn the interface(s) off and on but not the power supply. So the problem persists.
There is a maximum power setting that allows to specify the number of mA but is tells me that I don't have permission (as root) to make changes.
It's also not possible to unplug and replug the interfaces as they are in a closed box.
there's a rather old post at stackoverflow [1], which seems to suggest that the route to go would be a USB2 hub that allows power-switching.
oh, and i just tried to switch off my mouse, by doing:
# PROCPATH=$(lsusb
| grep -i mouse
| cut -f6 -d' '
| sed -e 's|:| |'
| while read v p; do
for vf in /sys/bus/usb/devices/*/*/idVendor; do
dev=${vf%idVendor}; grep -w "${v}" "${dev}/idVendor"
1>/dev/null && grep -w "${p}" "${dev}/idProduct" 1>/dev/null && echo
${dev};
done;
done)
# echo "0" > "${PROCPATH}/power/autosuspend"
# echo "auto" > "${PROCPATH}/power/level"
fmasdr IOhannes
[1] http://stackoverflow.com/questions/1163824/linux-usb-turning-the-power-on-an...