2

I need to power a Raspberry Pi through the USB port of another computer. Is there any way to detect on the PC if the RPi is powered on? Running dmesg as well as lsusb commands on the PC didn't show any meaningful changes. The RPi comes up however so it should draw some current.

migrated from unix.stackexchange.com Aug 11 '18 at 16:18

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.

  • Related - unix.stackexchange.com/questions/165447/… – slm Aug 11 '18 at 15:13
  • This question is a tad confusing - to me at least. You want to monitor the on/off state of your RPi from a PC that's supplying power to that RPi. Yet your question implies that you already know the state as you've gotten dmesg and lsusb listings (presumably) from the RPi? I'm sure that's not what you meant, but could you please edit your question to help clarify? – Seamus Aug 11 '18 at 19:27
  • Fixed. dmesg and lsusb where done on the PC powering the RPi. For most USB devices you see when they are attached/detached. But just drawing current seems not to be enough. – hid01 Aug 11 '18 at 20:02
2

With lsusb, this is the output from my USB mouse:

$ lsusb -v -d VVVV:DDDD
...
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
...
Device Status:     0x0000
  (Bus Powered)

Specifically the Raspberry will always be powered on. At least the Raspberry I have doesn't have an power off switch, so as soon as it is connected to USB power, it will always be powered up.

  • Op said they tried that. – slm Aug 11 '18 at 15:10
-1

There is / was an Windows (?) application which would monitor the sharing of data bandwidth on particular USB hub.This app would dynamically allocate data bandwidth to each USB device connected, If it still exists it could give you an indication that the RPi port is passing data hence has power. Again, on Windows , there is /was a way to check each active device "max power". That is part of USB device parameters coded in each USB device hardware.I cannot recall real tech name for these parameters. Of course that does not tell if the PC port is actually suppling any power. Logically - if the PC can check battery state on wireless mouse it should be reading the USB port power consumption and the user should be able to retrieve it. But logic sometimes does not apply.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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