USB

Hi

I need to know how many USB ports are connected to my PC, and If it is possible to know if there are some devices connected to them. Using the terminal.

Thanks

Manueloid,

Try the ‘usb’ command. It lists all the USB interfaces and what if anything is connected on them.

Tim

Hi thanks for your time.

I use the ‘usb’ command but it displays the buses of usb. I have 6 usb ports and ‘usb’ command display 4 buses. I need something that display those 6 usb ports.

Thanks

Manueloid,

I don’t think there is anything available from the terminal that shows specific ports as opposed to all busses and devices connected on those busses. You’d have to write your own program to do it and it would be quite difficult I imagine esp if someone say plugged in a USB extendor with 4 ports on it into 1 of your ports because now you’d have 10 ports (your 6 plus 4 more on the extendor).

If you plug in USB devices to more than 1 port (or say plug in 6 devices to the 6 ports), the usb command shows each device individually regardless of whether 2 devices are on the same bus. Are you just looking to know which devices are plugged in or do you need something very specific about a port?

Let me put it another way. What exactly are you trying to view from the terminal that usb doesn’t give you?

Tim

Hi Tim,

I only need to know how many usb ports have my computer.

For example I know that I have a serial port in my computer by checking the existence of the /dev/ser1 file. If there is a /dev/ser2 file, I know that I have two serial ports.

Is there file or command can I use to see how many usb ports have the computer?

Thanks

Manueloid,

As far as I know the answer is you can’t. All you can get is the number of USB buses.

Each of those buses as you know can be connected to more than 1 port. Those ports themselves could have a USB hub plugged into them containing yet more ports and so on. So you’d never be able to tell if someone plugged in a hub to one of the USB ports. It would be like asking how many machines are connected on an Ethernet network.

When I open up device manager under XP it only shows me the number of USB controllers (I have 6), not the number of USB ports (I have 4 so 2 controllers are not even wired from the motherboard) on my XP on my machine.

Tim

Hi, Tim

Thanks a lot for the answer.

USB is a serial bus standard to connect devices to a host computer. USB was designed to allow many peripherals to be connected using a single standardized interface socket and to improve plug and play capabilities.you can save your impotrant data like mcse practice exam paper.