I upgraded my Ubuntu machine to 10.10, and I'm having an issue with bluetooth dongle now. The issue is: dongle will not properly load on boot. What I have to do to make it work is unplug, then plug back.

aside from the question "wtfigo, how to fix that?", I would like to learn if there is an easy way to programmatically disable USB port, then enable it back; make it equivalent to "plug out, plug in" action. I made a quick look at ubuntu utilities, couldn't find the one which would let me disable a single USB port

link|improve this question

75% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Find ID of your bluetooth dongle with lsusb

Find which port is assigned to this usb device (mine would be 1-1 in this example) with this command :

for X in /sys/bus/usb/devices/*; do 
    echo "$X"
    cat "$X/idVendor" 2>/dev/null 
    cat "$X/idProduct" 2>/dev/null
    echo
done

Add to your /etc/rc.local these two lines (with correct port instead of 1-1)

sh -c "echo 0 > /sys/bus/usb/devices/1-1/authorized"
sh -c "echo 1 > /sys/bus/usb/devices/1-1/authorized"

With this method, rc.local will reset usb port 1-1 (or the one you will specify) at the end of each boot process

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.