0

Is there any command for listing all devices attached to RPI(light bulbs, buzzers, USB-s, etc.)?

If there is no that command, how can I check it?

  • WRT electronic components such as LEDs attached to the GPIOs, there's no way to identify these, since there's simply a 3.3V current going out and something <= 3.3V coming back (and since the GPIOs are digital, the exact voltage can't be detected either). The SMBus/I2C and SPI protocols do not include any kind of standard ID like USB does, so basically: If it's attached to the pins, there's no automatic way of identifying it. – goldilocks Oct 3 at 15:11
3

For USB devices you can use lsusb. It should be installed by default in your Pi - if not do:

sudo apt-get update
sudo apt-get install usbutils

later you can run the command lsusb and you should see all the devices connected via USB

  • 1
    There's also the related lshw and lspci and i2cdetect commands for detecting devices on other interfaces. – Fred Oct 4 at 19:42
0

No, there is no such command.

You will have to look at the Pi to see what is connected.

  • 'lsusb' will tell you what is connected to usb ports – CoderMike Oct 3 at 14:40
  • 1
    While technically correct this answer is somewhat lacking in usefulness. As already commented the lsusb command will list all connected USB devices. A listing of the /dev will list all connected components of the system that are registered. There will however be no way for the Pi to enumerate devices connected to the i/o pins such as light bulbs and buzzers though as the Pi can't detect them at all. Not sure why it's been accepted as an answer. the OP should wait much longer than 6 minutes from asking a question to accepting the first answer. – Charemer Oct 3 at 14:46

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.