Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
USB devices-What is the overview?

Reply  
Thread Tools
Odyssey's Avatar
Member with 221 posts.
 
Join Date: Mar 2003
02-Dec-2006, 04:34 PM #1
USB devices-What is the overview?
I have yet to plug a USB device into any of our Ubuntu machines and have the computer immediately recognize it and put up an icon.

I would like to better understand what is happening within Linux with USB devices. If one gives the terminal command lsusb -v , a lot of information comes up (example quoted from such output for 'Bus 001 Device 001...below) but I am unsure what much of it means. I assume that some of it refers to the bus whether something is plugged in or not, and other of it refers to the device that is plugged in.

I also assume that at bootup Linux first sets up some sort of communications with the USB ports so that if anything gets plugged in, the presence of the device should be recognized.

Then presumeably Linux tries to figure out what it is, and if successful, somehow allow user accessability/use of the device.

So if a user wants to confirm that Linux:

-is aware of the device presence, and
-has or has not identified the device
regardless of whether the device is a flash memory (thumbdrive sort of thing), hard disk drive, CD or DVD reader or reader-writer:

what are the various things going on inside Linux so that the state of these things can be consistently determined by the user?

So is anyone able to explain in relatively simple terms what goes on from bootup differentiating between bus and device, especially including any commands that lead one to the information?

Resource referral is welcome, but most of what I have googled up is in pretty deep technical language and I am looking for something more oriented toward newbies. TIA.

Excerpted from lsusb -v
Code:
Bus 001 Device 001: ID 0000:0000
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            9 Hub
  bDeviceSubClass         0 Unused
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x0000
  idProduct          0x0000
  bcdDevice            2.06
  iManufacturer           3
  iProduct                2
  iSerial                 1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           25
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
      Self Powered
      Remote Wakeup
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         9 Hub
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0002  1x 2 bytes
        bInterval             255

Last edited by Odyssey; 02-Dec-2006 at 07:21 PM..
Bartender's Avatar
Computer Specs
Senior Member with 197 posts.
 
Join Date: Apr 2006
Location: PNW, USA
Experience: Intermediate
02-Dec-2006, 08:09 PM #2
You can't get anything USB to work? What version of Ubuntu you using? USB recognition got a lot better recently. if you're using Breezy or Warty that could be part of the problem. If you're using Dapper never mind...

I don't know the technical in's and out's because everything I've tried has just worked.

I typed in "lsusb" and the test PC recognized one device, which appears to be my USB hub. I think lsusb looks for connected devices. What happens if you go into System>Administration>Device Manager? Look for any references to USB in the left hand tree, then click on them. My old PC shows a "VT82xxxxx UHCI USB 1.1 Controller", then if I click on the tabs to the right it gives a bunch of details, most of which I don't understand but at least that tells me the controller is recognized and Ubuntu threw some software at it. If your right-hand column is all "Unknown" or if you see no reference to a USB controller at all I would guess that means Ubuntu just doesn't recognize any sort of USB chip. If you had that problem with one PC I'd say it was just bad luck but you're saying you're having the same problem with several different PC's?
Odyssey's Avatar
Member with 221 posts.
 
Join Date: Mar 2003
02-Dec-2006, 11:58 PM #3
We have one version of 5.04 and two running 6.06. I have been able to get the 5.04 to at least recognize one USB thumbdrive, although neither of the 6.06 have done so.

None have recognized my Sony DVD-/+RW USB drive which our XP Home computer is happy to read and write from.

One of the 6.06 and the 5.04 both recognize and operate USB printers pretty much all by themselves. The 5.04 auto-recognized and operates a flatbed scanner. The 5.04 is streets ahead of the 6.06's. Go figure!

The other 6.06 doesn't seem to recognize any USB devices. The Device Manager shows lots of controllers, but all of them are unknown, so not much help there. (This is an instance where I don't know whether Device Manager is showing buses or devices). This computer is a semi-old eMachines which has an integrated USB system on the mobo and I'm wondering if maybe it has gone wheels up where USB is concerned? But I have no idea how to determine it's health (save installing Windows to see what works).

I am just totally at a loss as to what to do. I have googled extensively trying to educate myself on how all this works with very little to show for it. There is considerable material out there, but it is either way over my head, or too oblique to be helpful.

Shouldn't there be some sort of log that shows a change when a USB device is plugged in, even if Ubuntu can't recognize the device. Surely there would be a record of the attempt to recognize (and failure to do so)?
Bartender's Avatar
Computer Specs
Senior Member with 197 posts.
 
Join Date: Apr 2006
Location: PNW, USA
Experience: Intermediate
03-Dec-2006, 02:00 AM #4
Yeah, there are several log files. Some are listed in The Official Ubuntu Book. My copy's at home and I'm at work. Will check in the morning if somebody doesn't beat me to it.
Odyssey's Avatar
Member with 221 posts.
 
Join Date: Mar 2003
04-Dec-2006, 01:22 AM #5
Thanks, I look forward to any additional info you can put my way.
Odyssey's Avatar
Member with 221 posts.
 
Join Date: Mar 2003
04-Dec-2006, 10:55 AM #6
To further refine my question, I assume that all distros operate the same way, but please advise if not. I am using Ubuntu 6.06.

First is the layer of hardware that the USB ports are connected to. Does Linux always use the same directory to place files that "connect" the motherboard to these ports? If so, which directory? If possible to say, what files? (is it correct to call this "bus" info?)

Then when a USB device is plugged in, Linux must record the event. Where? In what files?

Assuming that it recognizes the device, Linux must make a file or record in a file the details of the device. Where and how does one see it?

Many thanks.
Bartender's Avatar
Computer Specs
Senior Member with 197 posts.
 
Join Date: Apr 2006
Location: PNW, USA
Experience: Intermediate
04-Dec-2006, 06:13 PM #7
Page 177 of The Official Ubuntu Book talks about system log files. Here's the list:

/var/log/syslog - general system logs
/var/log/auth.log - system authentication logs
/var/log/mail.log - system mail logs
/var/log/messages - general log messages
/var/log/dmesg - kernal ring buffer messages, usually since system bootup

It gives some pointers for viewing logs
Code:
 tail /var/log/syslog
the tail utility gives the last ten lines of a file

"With the -f paramter, tail launches into follow mode, which means it'll open the file and keep showing changes on the screen as they're happening"

I think they mean type in "tail -f" but not sure

"Also invaluable are "zgrep", "zcat" and "zless" which operate like their analogues that don't begin with a "z" but on gzip-compressed files. or instane, to get a list of lines in all your compressed logs that contain the word "warthog" regardless of case you would issue the following command:"

Code:
zgrep -i warthog /var/log/*.gz
I don't have any experience with that so don't really understand what they're talking about... :P
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:01 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.