LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 10-07-2005, 12:54 AM   #1
jaakkop
Member
 
Registered: Aug 2004
Posts: 433

Rep: Reputation: 30
USB devices on Slackware, kernel 2.6.12.5


How do I set up USB devices? Here is what I got with 'dmesg | grep usb' when I plugged my USB device:
Code:
usbcore: registered new driver usbfs
usbcore: registered new driver hub
usb usb1: default language 0x0409
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: VIA Technologies, Inc. USB 2.0
usb usb1: Manufacturer: Linux 2.6.12.5 ehci_hcd
usb usb1: SerialNumber: 0000:00:10.3
usb usb1: hotplug
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: hotplug
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: no power switching (usb 1.0)
usb usb2: default language 0x0409
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
usb usb2: Manufacturer: Linux 2.6.12.5 uhci_hcd
usb usb2: SerialNumber: 0000:00:10.0
usb usb2: hotplug
usb usb2: adding 2-0:1.0 (config #1, interface 0)
usb 2-0:1.0: hotplug
hub 2-0:1.0: usb_probe_interface
hub 2-0:1.0: usb_probe_interface - got id
hub 2-0:1.0: no power switching (usb 1.0)
usb usb3: default language 0x0409
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
usb usb3: Manufacturer: Linux 2.6.12.5 uhci_hcd
usb usb3: SerialNumber: 0000:00:10.1
usb usb3: hotplug
usb usb3: adding 3-0:1.0 (config #1, interface 0)
usb 3-0:1.0: hotplug
hub 3-0:1.0: usb_probe_interface
hub 3-0:1.0: usb_probe_interface - got id
hub 3-0:1.0: no power switching (usb 1.0)
usb usb4: default language 0x0409
usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3)
usb usb4: Manufacturer: Linux 2.6.12.5 uhci_hcd
usb usb4: SerialNumber: 0000:00:10.2
usb usb4: hotplug
usb usb4: adding 4-0:1.0 (config #1, interface 0)
usb 4-0:1.0: hotplug
hub 4-0:1.0: usb_probe_interface
hub 4-0:1.0: usb_probe_interface - got id
hub 4-0:1.0: no power switching (usb 1.0)
Here's what 'lsusb' gave me:
Code:
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
 
Old 10-07-2005, 01:11 AM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
Don't use any "grep". If you have usb and usb-storage compiled in your kernel, just plug-in your device, type "dmesg", then search in the last few lines for something like "assigned new device to sda" (or whatever it may look like, it should be something about "sdX". If you drive have more than one partition, you may want to try "cfdisk /dev/sdX" to take a look at partition, otherwise use the "whole" device. Then, just mount this device like anything else : "mount /dev/sdX /mnt/where_you_want_it".

If you don't have/are not sure you have usb and usb-storage into your kernel, you might need to modprobe these modules :
"modprobe usb-core"
"modprobe usb-storage"
it should be fine then.
 
Old 10-07-2005, 08:05 AM   #3
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
I'm trying to find out out where my usb device is located, but dmesg doesn't give that info. Is there another way?
 
Old 10-07-2005, 08:46 AM   #4
jaakkop
Member
 
Registered: Aug 2004
Posts: 433

Original Poster
Rep: Reputation: 30
Ok, I now got it identified but now I need to know how to get it to mount automatically when the device is plugged... or at least to mount it with normal user.
 
Old 10-07-2005, 09:26 AM   #5
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
jaakkop : You might want to take a look at automount (if you want to mount it automatically once it is pluged. To mount it with your normal user, just add a line like this one in your fstab :
Code:
/dev/sdXY       /mnt/usb       auto        noauto,user,uid=your_user,gid=users,umask=000         0       0
Notice the "options". "notoauto" tell your system to not mount it automatically at boot. "user" give any user the right to mount this. "uid=..." assign files ownership to your user, "gid=..." assign the group files ownership to the group you specified (should be "users" usually) and "umask=000" with give a normal user read and write access on a FAT32 drive. Of course, you don't need all this, choose the one you need ("man mount" for more option).


Quote:
I'm trying to find out out where my usb device is located, but dmesg doesn't give that info. Is there another way?
simcox1 : It should be in dmesg, if it isn't there, there is probably a problem, maybe "usb-storage" isn't loaded (try "modprobe usb-storage") or maybe there is a problem about the drive (unsupported?).
 
Old 10-07-2005, 10:14 AM   #6
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
It's a usb camera. I managed to download photos using gphoto2 from the command line. I couldn't get digikam or gtkam to run. I have to run gphoto2 get-all-files as root user though. So I'm trying to locate where to change the permissions. According to dmesg:

USB Mass Storage support registered.
hub.c: new USB device 00:10.2-1, assigned address 3
usb.c: USB device 3 (vend/prod 0x40a/0x578) is not claimed by any active driver.

This was after running modprobe usb-storage. I'm unsure where the device is actually located.
 
Old 10-07-2005, 11:48 AM   #7
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
I have a Sony DSC-P52 and have the following in my /etc/fstab
Code:
/dev/sda1        /mnt/dsc-p52     vfat        noauto,users     0   0
This allows any user to mount the camera (I don't have any other usb devices so it's always sda1).
Then I have the following menu command (I use WindowMaker):
Code:
mount /mnt/dsc-p52 ; sleep 2 ; xterm -geometry 96x60 -e mc /mnt/dsc-p52 ; umount /mnt/dsc-p52
This mounts the camera, then opens midnight commander with the camera folder in one pane. It's a quick and simple task to move all the photos/videos to whichever folder I like, then on closing MC the camera is unmounted.
 
Old 10-07-2005, 12:14 PM   #8
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Which directories did you have to make and are there any symbolic links required?
 
Old 10-09-2005, 12:28 AM   #9
ciotog
Member
 
Registered: Mar 2004
Location: Canada
Distribution: Slackware current
Posts: 728
Blog Entries: 2

Rep: Reputation: 43
The mount point has to be created, but otherwise udev does the work of creating the necessary device node. This assumes you have everything prepared in the kernel - for my setup I have SCSI device support and SCSI disk support as modules, along with USB Mass Storage support (along with the rest of the needed USB subsystem, natch).

Here's what I get in /var/log/messages when I connect the camera:
Code:
Oct  9 00:18:21 chump kernel: usb 3-1: new full speed USB device using uhci_hcd and address 4
Oct  9 00:18:21 chump kernel: usb 3-1: Product: Sony DSC
Oct  9 00:18:21 chump kernel: usb 3-1: Manufacturer: Sony
Oct  9 00:18:21 chump kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Oct  9 00:18:26 chump kernel:   Vendor: Sony      Model: Sony DSC          Rev: 4.50
Oct  9 00:18:26 chump kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
Oct  9 00:18:26 chump kernel: SCSI device sda: 253696 512-byte hdwr sectors (130 MB)
Oct  9 00:18:26 chump kernel: sda: assuming Write Enabled
Oct  9 00:18:26 chump kernel: SCSI device sda: 253696 512-byte hdwr sectors (130 MB)
Oct  9 00:18:26 chump kernel: sda: assuming Write Enabled
Oct  9 00:18:26 chump kernel:  sda: sda1
Oct  9 00:18:26 chump kernel: Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
Oct  9 00:18:26 chump udev[20710]: creating device node '/dev/sda'
Oct  9 00:18:27 chump udev[20721]: creating device node '/dev/sda1'
Oct  9 00:19:00 chump udev[20774]: removing device node '/dev/sda1'
Oct  9 00:19:00 chump udev[20783]: removing device node '/dev/sda'
Oct  9 00:19:00 chump kernel: usb 3-1: USB disconnect, address 4
The camera needs to be in normal mode, not PTP mode for this to work properly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB 2.0 devices slow down significantly in stock 2.6.10 kernel of 10.1 firebird Slackware 12 02-13-2006 09:06 PM
Manually Created Devices Disappear - Slackware 10 Kernel 2.6.9 rovitotv Slackware 1 01-01-2005 05:53 PM
Plugging devices on USB does not give any effect (kernel 2.6.6) zby Linux - Hardware 1 07-22-2004 10:27 AM
slackware freezes at boot with USB devices dublinclontarf Slackware 3 07-11-2004 11:53 AM
slackware 9.1 USB mouse and other usb devices not working jimMC Linux - Hardware 11 01-24-2004 11:58 AM


All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration