uhubctl icon indicating copy to clipboard operation
uhubctl copied to clipboard

Power-Off Ubertooth Device on Raspberry 4

Open csmali opened this issue 6 years ago • 6 comments

Hi, I was dealing with powering off the ubertooth devices on raspberry 4 and I came across with an issue, here is the problem:

I have an ubertooth on port 1-1.4

ubertooth-working

Here is the output of uhubctl command

ubertooth-output

I am powering off the device, and red light turns off

ubertooth-power-off-command

ubertooth-powered-off

Here is the problem

The part I am not understanding is that : I do not know why 2 yellow leds still active although I powered the device off. Also when I plug my mobile phone it keeps charging on that powered off port.

This is the output of lsusb showing that I can per-port switching on 1-1, output-of-lsusb

And this is the output of my bootloader version of raspberry since raspberry needs an update for uhubctl.

vcgen

If you help me I would be appreciated . Thanks in advance

csmali avatar Feb 03 '20 08:02 csmali

Problem here is that your attempt to turn power off on hub 1-1 doesn't automatically do the same on hub 2 (its dual device). Without this, vbus will not turn off.

Questions:

  1. Did you upgrade RPi firmware? vl805 firmware must be 00137ac or later.
  2. Did you build uhubctl from master branch? Older binary might not have proper handling for dual devices.
  3. Can you please provide container id for RPi 4 USB 2.1 4 port hub? You can find it by looking at sudo lsusb -v output, check for container id line.

Workarounds:

It should work if you turn power off/on by 2 commands:

uhubctl -e -l 1-1 -p 4 -a 0
uhubctl -e -l 2 -p 4 -a 0

Possible reasons:

My bet is that container id for dual device is not hardcoded, and might change across models or device batches. I may need to use different hack to make work reliably.

mvp avatar Feb 03 '20 12:02 mvp

Here is the vl805 firmware update code I used

uhub-update-code

Output of code update script

uhub-updated-code

Yes, I used latest master version of uhubctl binary.

Output of lsusb -v command container ID:

container

I tried what you suggested

uhubctl-command-executed

It is still not working unfortunately

ubertooth-still-working

csmali avatar Feb 03 '20 14:02 csmali

Your container id shows correctly.

But your firmware still shows 13701 in your picture. It should be 137ac or more.

If fixing firmware version doesn't help, try turning off all 4 ports. That said, turn off port 4 should kill power to all 4 ports anyway.

mvp avatar Feb 03 '20 15:02 mvp

I guess I correctly updated the firmware. But still red led turns off but other 2 yellow led still do not turn off. Since I am not sure, should vl805 software binary be in a specific folder or something to be able to execute properly?

updated-firmware

As you said when I turn off all 4 ports it works. Unfortunately I need my other 3 ports

csmali avatar Feb 04 '20 06:02 csmali

You last picture was showing vl805 firmware as 13701. Does it show newer than that now?

As for using ports separately, it is not possible - it's Raspberry Pi 4 hardware limitation as described in FAQ. Closest you can get to this if you downgrade to Raspberry Pi 3B+ - the only model that supports true per-port power switching on 2 out of 4 ports. However, you lose USB 3 support, and get slower hardware.

Alternatively, you can obtain any external hub from supported list, connect your devices via such hub and control power as you wish.

mvp avatar Feb 04 '20 06:02 mvp

Yes I have 137ac now as seen in last picture. I guess I will need external hub. Thanks for your help!

csmali avatar Feb 04 '20 08:02 csmali