How can you detect if a USB device is powered via an USB Port?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
2
down vote

favorite












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.










share|improve this question















migrated from unix.stackexchange.com Aug 11 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 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 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 at 20:02

















up vote
2
down vote

favorite












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.










share|improve this question















migrated from unix.stackexchange.com Aug 11 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 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 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 at 20:02













up vote
2
down vote

favorite









up vote
2
down vote

favorite











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.










share|improve this question















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.







usb power-management






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 11 at 20:00

























asked Aug 11 at 10:38









hid01

112




112




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


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






migrated from unix.stackexchange.com Aug 11 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 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 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 at 20:02

















  • Related - unix.stackexchange.com/questions/165447/…
    – slm
    Aug 11 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 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 at 20:02
















Related - unix.stackexchange.com/questions/165447/…
– slm
Aug 11 at 15:13




Related - unix.stackexchange.com/questions/165447/…
– slm
Aug 11 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 at 19:27




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 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 at 20:02





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 at 20:02











2 Answers
2






active

oldest

votes

















up vote
1
down vote













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.






share|improve this answer




















  • Op said they tried that.
    – slm
    Aug 11 at 15:10

















up vote
-1
down vote













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.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "447"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f87978%2fhow-can-you-detect-if-a-usb-device-is-powered-via-an-usb-port%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    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.






    share|improve this answer




















    • Op said they tried that.
      – slm
      Aug 11 at 15:10














    up vote
    1
    down vote













    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.






    share|improve this answer




















    • Op said they tried that.
      – slm
      Aug 11 at 15:10












    up vote
    1
    down vote










    up vote
    1
    down vote









    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.






    share|improve this answer












    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.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Aug 11 at 15:07









    RalfFriedl

    25415




    25415











    • Op said they tried that.
      – slm
      Aug 11 at 15:10
















    • Op said they tried that.
      – slm
      Aug 11 at 15:10















    Op said they tried that.
    – slm
    Aug 11 at 15:10




    Op said they tried that.
    – slm
    Aug 11 at 15:10












    up vote
    -1
    down vote













    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.






    share|improve this answer
























      up vote
      -1
      down vote













      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.






      share|improve this answer






















        up vote
        -1
        down vote










        up vote
        -1
        down vote









        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 11 at 19:40









        Jan Hus

        3091315




        3091315



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f87978%2fhow-can-you-detect-if-a-usb-device-is-powered-via-an-usb-port%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay