You are not logged in.

#1 2012-08-05 15:27:38

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Unable to browse USB camera

I'm running Arch Linux with KDE. When I plug my camera into my USB port, I can see it via lsusb (below) but in System Settings -> Removable Devices, I don't see it. It also is not auto-mounting even though I have selected "Enable automatic mounting of removable media".

[root@arch ~]# lsusb
Bus 001 Device 003: ID 054c:0010 Sony Corp. DSC-S30/S70/S75/F505V/F505/FD92/W1 Cybershot/Mavica Digital Camera
Bus 004 Device 002: ID 04b3:310b IBM Corp. Red Wheel Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The only related package I have installed is libgphoto2 as per the documentation: https://wiki.archlinux.org/index.php/Digital_Cameras. I am in the storage group and I believe I have the permissions.

[root@arch ~]# ck-list-sessions | grep TRUE
        active = TRUE
        is-local = TRUE
[root@arch ~]# 

I would like it to auto-mount and be visible in the file system. What else am I missing?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#2 2012-08-05 22:48:45

6ng4n
Member
Registered: 2012-02-07
Posts: 84

Re: Unable to browse USB camera

Are you sure the camera driver is supported?

Offline

#3 2012-08-05 22:56:15

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Unable to browse USB camera

Just because the camera shows up in the output of lsusb doesn't mean much, people here will need more than that, such as the output of dmesg after you plug the camera and if mounting manually works. Most probably you are doing something wrong and you should check all of the camera settings.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2012-08-06 00:11:19

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,698

Re: Unable to browse USB camera

Or the camera does not support USB mass storage.
Or Sony has done something incompatible and completely proprietary.

What does the ouput of lsusb -vv say? (That is two v's, not w)
Anything interesting in the output of dmesg ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2012-08-06 00:18:48

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: Unable to browse USB camera

gvfs-gphoto2 help?, the description say tha can help


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#6 2012-08-06 12:58:45

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: Unable to browse USB camera

what if you simply try to mount the device with
# mount -t vfat -o ro /dev/sdXY /mnt/camera        # ro just to be safe, and most cameras use a vfat fs, replace X and Y

to do automounting of removable devices you can do the following:

cat > /etc/udev/rules.d/11-media-by-label-auto-mount.rules << "EOF"
# Start at sdb to avoid system harddrive. 
KERNEL!="sd[b-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"
EOF

Last edited by debdj (2012-08-06 13:00:15)

Offline

#7 2012-08-06 21:47:54

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to browse USB camera

Here's the output of lsusb -vv:

root@arch ~]# lsusb -vv

Bus 001 Device 004: ID 054c:0010 Sony Corp. DSC-S30/S70/S75/F505V/F505/FD92/W1 Cybershot/Mavica Digital Camera
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x054c Sony Corp.
  idProduct          0x0010 DSC-S30/S70/S75/F505V/F505/FD92/W1 Cybershot/Mavica Digital Camera
  bcdDevice            6.10
  iManufacturer           1 Sony
  iProduct                2 Sony DSC
  iSerial                 0 
  bNumConfigurations      2
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass    255 
      bInterfaceProtocol      1 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              16
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     2
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               7
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      2
Device Status:     0x0001
  Self Powered
...
...

I don't see anything wrong, but then again I am new to this. It does say mass storage, so it looks to support that.

Here is what is in dmesg.

[root@arch ~]# dmesg
...
...
[117041.165021] usb 1-3: new high-speed USB device number 4 using ehci_hcd
[117041.292895] usb-storage 1-3:1.0: Quirks match for vid 054c pid 0010: 1
[117041.292947] scsi3 : usb-storage 1-3:1.0
[117042.297910] scsi 3:0:0:0: Direct-Access     Sony     Sony DSC         6.00 PQ: 0 ANSI: 0 CCS
[117042.305049] sd 3:0:0:0: [sdb] 15654912 512-byte logical blocks: (8.01 GB/7.46 GiB)
[117042.306131] sd 3:0:0:0: [sdb] Write Protect is off
[117042.306135] sd 3:0:0:0: [sdb] Mode Sense: 00 00 00 00
[117042.307266] sd 3:0:0:0: [sdb] Asking for cache data failed
[117042.307271] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[117042.330283] sd 3:0:0:0: [sdb] Asking for cache data failed
[117042.330294] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[117042.335470]  sdb: sdb1
[117042.353517] sd 3:0:0:0: [sdb] Asking for cache data failed
[117042.353524] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[117042.353528] sd 3:0:0:0: [sdb] Attached SCSI removable disk

The only thing here I see is the asking for cache data failed - maybe that is the reason?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#8 2012-08-06 21:59:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,698

Re: Unable to browse USB camera

Okay, so far, so good.

Find or create an empty mount point (/mnt, for example, might be a good choice if nothing is mounted there)  Then, try:
sudo mount /dev/sdb /mnt
and see what happens.  If it works, try
sudo ls /mnt

Upon further thought,  if the above does not work, try it with sdb1 instead of sdb.   The dmesg output looks like it may appear as a partitioned device.  That may be why it does not auto mount.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2012-08-06 22:09:42

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to browse USB camera

When trying to mount it, I get this error:

[root@arch ~]# mount /dev/sdb /mnt 
mount: wrong fs type, bad option, bad superblock on /dev/sdb,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

and going to dmesg I see this:

[root@arch ~]# dmesg | tail
[118557.542239] EXT4-fs (sdb): VFS: Can't find ext4 filesystem
[118557.552015] EXT4-fs (sdb): VFS: Can't find ext4 filesystem
[118557.558233] EXT4-fs (sdb): VFS: Can't find ext4 filesystem

Any ideas?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#10 2012-08-06 22:23:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,698

Re: Unable to browse USB camera

How about sdb1  instead of sdb?

If that does not work, what is the output of
sudo fdisk -l /dev/sdb


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#11 2012-08-06 22:33:07

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to browse USB camera

The first time I tried "mount /dev/sdb1 /mnt", it worked and I was able to successfully browse the camera. So I turned off the camera, unplugged it, then plugged it back in and turned it on and now that same command does not work.

[root@arch ~]# mount /dev/sdb1 /mnt 
mount: special device /dev/sdb1 does not exist

Was that not the proper way to unmount it? If not, what is?
After we resolve this, what is the proper way to have this auto mount and unmount?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#12 2012-08-06 22:38:54

FlyingHappy
Member
From: Cincinnati, OH
Registered: 2011-04-18
Posts: 192

Re: Unable to browse USB camera

My guess is that your computer probably stuck it into sdc1 after unplugging and plugging back in (I've had that happen before), did you check your dmesg again to make sure it is still sdb1?

Offline

#13 2012-08-06 22:59:55

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to browse USB camera

Good catch - that was it. smile

A few more questions...
1.) What is the proper way to disconnect and unmount the camera?
2.) How can I get it to auto mount and unmount?
3.) Why does KDE not handle all of this as I have configured in System Settings -> Removable Devices?


Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

#14 2012-08-07 00:42:44

FlyingHappy
Member
From: Cincinnati, OH
Registered: 2011-04-18
Posts: 192

Re: Unable to browse USB camera

Autofs from the repo's is supposed to help you with auto-mounting.  Not sure about how KDE does things though...

As for properly mounting/unmounting, I always just use the "mount /dev/sdXY /media/folder" and "umount /dev/sdXY" which works great for me, not auto mounting, but it works well.

Offline

#15 2012-08-07 02:38:07

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,698

Re: Unable to browse USB camera

I have a hunch that the auto mount stuff works for things that are not partitioned.  i.e. where the entire drive is formated with one file system and there are not multiple partitions.  I state that without proof and may very well be wrong smile  Let me grab a bite of dinner and I'll look into this.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#16 2012-08-07 11:20:34

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Unable to browse USB camera

Even if the partition doesn't get automatically mounted after you plug the camera, the detected partitions, only 1 in this case, should show up in the file manager and as you try to access the partition it should get automatically mounted.

As for the way to disconnect and unmount the camera, you should have a way to safely remove/eject the partition/device, use that and wait a little until it says it is safe, also always check on the device itself, if possible, if there is still some activity before disconnecting it because sometimes there is still some activity after you are told that it is safe to remove the device.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2012-08-07 22:52:38

Annorax
Member
From: MA, USA
Registered: 2012-01-16
Posts: 51

Re: Unable to browse USB camera

I've been playing around with autofs but the automounting still isn't working. When I start the autofs daemon, I see a "/mnt/usbstick/" folder but nothing else. I can still manually mount it and it works. Any ideas on this?

[root@arch ~]# cat /etc/autofs/auto.master 
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

#/media /etc/autofs/auto.media
/mnt     /etc/autofs/auto.misc     --timeout=5 --ghost
[root@arch ~]# cat /etc/autofs/auto.misc 
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage

cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom
#floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl
usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sdb1

Toshiba Satellite A105-S4064
Arch Linux with KDE

Offline

Board footer

Powered by FluxBB