Re: Resetting a USB port in Debian 10

2022-05-20 Thread tomas
On Fri, May 20, 2022 at 05:25:54PM -0500, Jason wrote: > On Thu, May 19, 2022 at 09:25:23AM +0200, to...@tuxteam.de wrote: > > On Thu, May 19, 2022 at 09:55:54AM +0300, Anssi Saari wrote: > > > Jason writes: > > > > > > > What is the best way to power cycle or reset a USB port? > > Turns out the

Re: Resetting a USB port in Debian 10

2022-05-20 Thread Jason
On Thu, May 19, 2022 at 09:25:23AM +0200, to...@tuxteam.de wrote: > On Thu, May 19, 2022 at 09:55:54AM +0300, Anssi Saari wrote: > > Jason writes: > > > > > What is the best way to power cycle or reset a USB port? Turns out the easiest answer was within reach all the time: In Debian 10, 'usbres

Re: Resetting a USB port in Debian 10

2022-05-19 Thread Tixy
On Thu, 2022-05-19 at 13:38 -0400, Greg Wooledge wrote: > On Thu, May 19, 2022 at 06:24:21PM +0100, Tixy wrote: > > On Thu, 2022-05-19 at 07:00 -0400, Greg Wooledge wrote: > > > 1) For ** to work, you need to do "shopt -s globstar" somewhere before it. > > > > I didn't know that, it works for me w

Re: Resetting a USB port in Debian 10

2022-05-19 Thread Greg Wooledge
On Thu, May 19, 2022 at 06:24:21PM +0100, Tixy wrote: > On Thu, 2022-05-19 at 07:00 -0400, Greg Wooledge wrote: > > 1) For ** to work, you need to do "shopt -s globstar" somewhere before it. > > I didn't know that, it works for me without setting that option. > > $ shopt | grep globstar > globsta

Re: Resetting a USB port in Debian 10

2022-05-19 Thread Tixy
On Thu, 2022-05-19 at 07:00 -0400, Greg Wooledge wrote: > On Thu, May 19, 2022 at 08:54:52AM +0100, Tixy wrote: > > To find the device ID my bash script scans the USB serial numbers > > looking for the one I'm interested in... > > > >    pushd /sys/bus/usb/drivers/usb >/dev/null > >    for f in **

Re: Resetting a USB port in Debian 10

2022-05-19 Thread Greg Wooledge
On Thu, May 19, 2022 at 08:54:52AM +0100, Tixy wrote: > To find the device ID my bash script scans the USB serial numbers > looking for the one I'm interested in... > >pushd /sys/bus/usb/drivers/usb >/dev/null >for f in **/serial >do > if [ "$(cat $f)" = MY_SERIAL_NUMBER ]; then

Re: Resetting a USB port in Debian 10

2022-05-19 Thread Tixy
On Wed, 2022-05-18 at 17:22 -0500, Jason wrote: > What is the best way to power cycle or reset a USB port? The method I use, which I found described online is to unbind the driver then re-bind it like... echo "$ID" >/sys/bus/usb/drivers/usb/unbind sleep 1 echo "$ID" >/sys/bus/usb/drivers

Re: Resetting a USB port in Debian 10

2022-05-19 Thread tomas
On Thu, May 19, 2022 at 09:55:54AM +0300, Anssi Saari wrote: > Jason writes: > > > What is the best way to power cycle or reset a USB port? I need to do > > this to reset a USB modem if it stops responding. The system in > > question is Debian 10 aarch64 on RockPi 4b+. > > As far as I know, powe

Re: Resetting a USB port in Debian 10

2022-05-18 Thread Anssi Saari
Jason writes: > What is the best way to power cycle or reset a USB port? I need to do > this to reset a USB modem if it stops responding. The system in > question is Debian 10 aarch64 on RockPi 4b+. As far as I know, power cycling is not usually a function of USB. For resetting, in my case a st

Re: Resetting a USB port in Debian 10

2022-05-18 Thread IL Ka
Try to disable it. Then, enable. Use "sys": https://karlcode.owtelse.com/blog/2017/01/09/disabling-usb-ports-on-linux/ https://askubuntu.com/questions/1338682/is-it-possible-to-disable-usb-port-with-known-physical-location On Thu, May 19, 2022 at 1:51 AM Jason wrote: > Hello, > > What is the bes

Resetting a USB port in Debian 10

2022-05-18 Thread Jason
Hello, What is the best way to power cycle or reset a USB port? I need to do this to reset a USB modem if it stops responding. The system in question is Debian 10 aarch64 on RockPi 4b+. Thanks, -- Jason