RE: Programatic disconnect and reconnect of USB device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



1-7 is the bus id for the hub.

I tried using your commands (i.e. echoing to bConfigurationValue) but it had no effect. Power/control already had 'auto' in it and bConfigurationValue was initially 1. After echoing 0, bConfigurationValue became empty but no change occurred on the device so I just restored bConfigurationValue back to 1.

The only luck I've had so far is to use the hubpower command followed by an unbind (unbind by itself doesn't do anything either). All this seems to do is actually just turn off the data signal. Using a "voltmeter" (a usb connector with a LED attached) I still see power being delivered. Unfortunately, just turning off data doesn't seem to satisfy this device I'm trying to work with. So my next goal is to find a hub that supports turning off power. I found one that lsusb reports as supporting ganged power switching but I've also read this is no guarantee that the hub actually supports it.

Doing more searching, I came across a linux-usb-users post that recommended this program: http://www.gniibe.org/development/ac-power-control-by-USB-hub/index. I'm looking to see if it needs any modification for ganged power switching. Right now the command-line supports only specifying one port at a time.

-----Original Message-----
From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx] 
Sent: Friday, December 02, 2011 4:56 PM
To: Vane, Edwin
Cc: linux-usb@xxxxxxxxxxxxxxx
Subject: RE: Programatic disconnect and reconnect of USB device

On Fri, 2 Dec 2011, Vane, Edwin wrote:

> I found the post that Greg mentioned about turning power off to ports
> (http://article.gmane.org/gmane.linux.usb.general/30383) but it 
> doesn't seem to make any difference to the attached device until I use 
> Simon's command for unbinding the driver:
> 
> echo -n '1-7' > /sys/bus/usb/drivers/usb/unbind
> 
> The post mentions that the 'hubpower' program should cause the driver 
> to be unbound when issuing ioctl requests so I'm not sure what the 
> difference is between that kind of unbind and whatever the above 
> 'echo' command does.

Is 1-7 the attached device, or is it the hub the device is plugged into?

> However, I did notice that using the above command, even without 
> 'hubpower' will cause 'lsusb -t' to segfault when run afterward. Is 
> there something unsavoury about using the above echo command? Could 
> you offer some insight into the behaviour I'm seeing?

There's nothing wrong with this command.  But did you try using the commands I suggested?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux