You are not logged in.

#1 2004-03-14 23:07:27

trey
Member
From: Alpharetta, GA
Registered: 2003-10-18
Posts: 73

Accessing cameras and other mass storage devices

In order to access USB pendrives and digital cameras as USB mass storage dievices what modules need to be loaded and how does one go about mounting these devices.  I was a little spoiled in the past with Supermount in other distros, so this is a little new to me.

Thanks.

Offline

#2 2004-03-15 00:13:09

Win
Member
Registered: 2004-03-04
Posts: 155

Re: Accessing cameras and other mass storage devices

Please take a look at the Arch Linux WiKi page:

[url]http://wiki.archlinux.org/index.php/USB Sticks[/url]

This answers most questions about USB sticks (and most cameras as well, since the only principled difference between the two is the inherent file structure that cameras maintain for photographs and other data management purposes).

Regards,

Win

Offline

#3 2004-03-15 01:26:48

Echo1
Member
From: BC, Canada
Registered: 2004-03-02
Posts: 19

Re: Accessing cameras and other mass storage devices

I have not set up my camera on Arch yet but this is how I have set mine manually in the past.
It may be diffrent with the 2.6 kernel, devfs and may depend on your camera.
It should go something like this (which is what the wiki page is saying)

As root do the following:

1) Make sure that usb is up and running (if you use a usb mouse or keyboard, etc you can skip
this step as you know this is working)
type " ps x | grep usb "

2) connect the camera  to a usb port and start the usb-mass storage module
type " modprobe usb-storage"

3) check /proc to see if the device is loaded properly
type " less /proc/bus/usb/devices "
type " less/proc/modules"

The usb storage module will map the camera as a scsi device and have a name like sda or sdb etc.
If you have problems  you may need to load the scsi module:
type " modprobe sd-mod"

4) create a mount point
type " mkdir /mnt/camera"

5) try to mount the camera manually
type " mount -t vfat /dev/sda1 /mnt/camera " (/dev/sda1 being specific to your camera)
you should then be able to cd /mnt/camera or ls /mnt/camera just like any other drive.

6) Open your favorite editor and add to your /etc/fstab a line like

"/dev/sda1/ /mnt/camera  vfat defaults 0 0"

I hope this helps more then hurts.

Offline

#4 2004-03-15 06:14:48

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Accessing cameras and other mass storage devices

There is a nice gnome app. If you run gnome, you may be interested. You can tweak it's settings with little afford so the app pops up when a camera is connected!

http://www.gphoto.org/proj/gtkam/
http://www.gphoto.org/doc/manual/permissions-usb.html


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#5 2004-04-06 11:32:15

blitze
Member
From: Melbourne, Australia
Registered: 2004-03-19
Posts: 54

Re: Accessing cameras and other mass storage devices

I was having no end of trouble with flacky USB Storage Device recognition under Linux and it was by reading your posts that I found I needed sd-mod loaded.  Can't thankyou all enough.  Now for that USB2 Hard Drive.  If only I wasn't sponsoring my Girlfriend part payment in a motorcycle, I'd have it tomorrow )-:

Still important to have her mobile and at least I can now easily use my USB storage stick.

Thnaks again


Leave ones footprint not in the physical world but the in the world of the mind.

Offline

#6 2004-04-06 15:08:27

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Accessing cameras and other mass storage devices

You don't have to set up complete usb storage with mounting dirs etc. Yesterday I sucessfully set up my cannon ixus v3 with ghpoto2 and digicam. Follow the second link provided by PinkChick and you will find that you need 3 simple steps in archlinux to do this (basically: generating usbcam list, copying the usbcam scirpt to /etc/... - in archlinux it's somewhere in /usr/share/libgphoto..., changing the name of usergroup - that depend's on the method you want to provide usbcam for users - I just changed the group name to users). Now my ixus works very well. BTW: Digikam from staging is much more powerfull than gtkam but I can't find the plugins described on it's homepage - someone tried this (I suppose I shoud recompile it myself...) ?

Offline

#7 2004-04-06 15:15:38

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Accessing cameras and other mass storage devices

Afaik, Digikam is a KDE app, while gtkam is a gnome one. gtkam is a bit buggy, yet. I haven't noticed much progress in gtkam, lately and had a nice time using digikam on ... shame ... lindows ...  :oops:


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#8 2004-04-06 22:32:00

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Accessing cameras and other mass storage devices

Yes, gtkam is very simple while digikam is a full featured program for managing photos (I really like it's speed when browsing lots of thumbnails). There are lots of plugins for digikam http://digikam.sourceforge.net/plugins.html but I could not find them in the version from staging.
Arghhh. Of course. There is a new version 0.6.1 with a separate plugin package! And both packages are already in incoming http://bbs.archlinux.org/viewtopic.php? … ht=digikam. :-) I'll try them soon...

Offline

#9 2004-04-07 02:09:15

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

I'm trying to download some pictures from my Cannon PowerShot A60, but I don't seem to be able to detect it.

I try doing an "ls /dev/s*" at several times, hoping for the "/dev/sda1" to show up, but so far it hasn't.  I have it connected to a USB port that worked under Windows, so I think it should work.

I have a 2.6 IDE kernel, so I was trying this:
  su
  modprobe usb_storage
  modprobe sd_mod
  ls /dev/s*

And I get nothing.

I see where some USB stuff is being loaded:

[b@ant23 b]$ dmesg | grep usb
drivers/usb/core/usb.c: registered new driver usbfs
drivers/usb/core/usb.c: registered new driver hub
drivers/usb/core/usb.c: registered new driver hiddev
drivers/usb/core/usb.c: registered new driver hid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
usb 3-1: new full speed USB device using address 2
drivers/usb/core/usb.c: registered new driver usb-storage
usb 3-1: USB disconnect, address 2

I bet "usb3-1" is my camera!

Any suggestions? 

I've never used USB under Linux before, but I have several other devices I'm going to try and connect after I get the A60 working.

thx!

Offline

#10 2004-04-07 02:46:25

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

I found out that the A60 using a non-standard USB protocol, but that gphoto2 can still talk to it.  I was able to successfully do the following command as root:

   gphoto2 --get-all-files

Now I know I need to make a "usb group" and give that group access to the USB port, as described here:

http://www.phil.uni-sb.de/~nkuttler/os/powershot/

...but I'm not sure I understand it quite yet.

I want to make a "usb" group and give user "b" access to it.  Is that hard?

Will this line work on Arch (from the above link):

none        /proc/bus/usb       usbdevfs devuid=0,devgid=1002,devmode=0660  0   0


thx!

Offline

#11 2004-04-07 03:22:18

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

My /etc/fstab file already has this line it:

usbdevfs  /proc/bus/usb  usbdevfs  defaults  0  0

do let users use my USB digital camera, do I need to add something like:

usbdevfs  /proc/bus/usb  usbdevfs  defaults,devmode=0600  0  0

??

I saw this line during my search, which gave me the idea:

none /proc/bus/usb usbfs defaults,devmode=0666 0 0

[EDIT]

I tired the above 0600 entry, and it still doesnt work, here is my output:
======================================


[b@ant23 b]$ cd a60/
[b@ant23 a60]$ gphoto2 --get-all-files
                                                                               
*** Error ***             
An error occurred in the io-library ('Could not claim the USB device'): Could not claim interface 0 (Operation not permitted). Make sure no other program or kernel module (e.g. dc2xx or stv680) is using the device and you have read/write access to the device.
*** Error (-53: 'Could not claim the USB device') ***       

For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <gphoto-devel@lists.sourceforge.net>, please run
gphoto2 as follows:

    env LANG=C gphoto2 --debug --get-all-files

Please make sure there is sufficient quoting around the arguments.

[b@ant23 a60]$
=============================

any ideas?

Offline

#12 2004-04-07 03:35:25

Win
Member
Registered: 2004-03-04
Posts: 155

Re: Accessing cameras and other mass storage devices

Hi whol.

[In case you haven't read this, take a look at the Arch Wiki of USB Sticks: http://wiki.archlinux.org/index.php/USB Sticks.  This is good advice for USB cameras as well -- with the exception of formatting the camera memory, of course.]

What I've done for a large range of USB devices for the 2.6 kernel series is this:

1. Add 'usb-storage' to the MODULES list in /etc/rc.conf.  The 'sd_mod' module is already built into the 2.6 kernel, so it's not necessary to add it to the MODULES list (or use 'modprobe sd_mod') to get its functionality.

2. In /etc/fstab add the following lines:

none /proc/bus/usb usbfs defaults,devmode=0666 0 0
/dev/sda1 /mnt/usb vfat user,noauto,defaults 0 0

When the USB device is inserted, the /dev/sd* devices automagically appear.

3. You can then do, as any user, mount and unmount the USB device or camera:

mount /mnt/usb
umount /mnt/usb

and read from (and write to, if that's appropriate) the device as a normal user.  The nice thing about this arrangement is that the files on the USB device or camera appear with the permissions of the user who's mounted the USB device or camera.

You can also set up desktop icons to mount and unmount these devices; and navigate them as you would a hard drive, floppy, or CD-ROM (I do this with the KDE desktop, for example).

Regards,

Win

Offline

#13 2004-04-07 03:37:43

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

Well I can see my camera now, when its turned on, but I still can't access it with a non-root account.

[root@ant23 b]# ls /proc/bus/usb/003
001  005
[root@ant23 b]#

The A60 digital camera is 005.  That number goes up each time I turn the camera off and then back on.

So all I have to do is give my "b" account full access to /proc/bus/usb - right?

Not sure exactly how to do that yet.

thx

Offline

#14 2004-04-07 03:43:53

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

Hi Win,

The A60 does not show up as a regular USB device, they use some weird protocol.  gphoto2 speaks that protocol (something like 'ptpn').

I can log in as root pull the pictures off the camera without loading any extra modules, just doing this:

[root@ant23 a60]# gphoto2 --get-all-files
Detected a 'Canon:PowerShot A60'.                                             
Downloading 'IMG_0012.JPG' from folder '/DCIM/100CANON'...
Saving file as IMG_0012.JPG                                                   

This command does not show any storage device:                                     
           
[root@ant23 a60]# ls /dev/s*
/dev/stderr  /dev/stdin  /dev/stdout
/dev/scsi:
/dev/shm:
/dev/snd:
controlC0  midiC0D0  pcmC0D0c  pcmC0D0p  pcmC0D1p  timer
/dev/sound:
adsp  audio  dmmidi

I think my only problem is giving access to /proc/bus/usb to my non-root account. Apparently the A60 doesn't even use the USB stuff.

thx!

Offline

#15 2004-04-07 04:46:51

whol
Member
Registered: 2004-02-04
Posts: 155

Re: Accessing cameras and other mass storage devices

I solved the problem using Sarah's instructions at:

http://bbs.archlinux.org/viewtopic.php? … ht=devmode

she used:

chown -R sarah.users /proc/bus/usb/001/*

tehdely helped me a bunch in IRC, but it eventually became apparent that the devmode entry for the usbdevfs in /etc/fstab was simply not going to work.  A bug perhaps?

Now I can take pictures and import them to linux!

thx!

Offline

#16 2004-04-07 05:44:17

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Accessing cameras and other mass storage devices

I use hotplug to handle my permissions for my camera.  I don't know how well it works with 2.6.4 or 2.6.5 because of the hotplug issues (though, I'm not getting those messages like I was with 2.6.4... weird...), I haven't downloaded any pictures since then.

http://www.gphoto.org/doc/manual/permissions-usb.html

I followed these instructions.  I also included all the scripts they mention in one of the gphoto packages...


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#17 2004-04-07 12:06:02

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Accessing cameras and other mass storage devices

I can only confirm what Xentac says - at least in arch linux this way is probably the easiest and you don't have to use any addtional modules. Just follow the instructions from the link - personally I use usbcam script for group of users (I changed the original group name to "users" group - this way hotplug will allow any users of my desktop computer use the usb device). It takes 5 min or so to setup it this way :-)
If you are using digikam (or gtkam) you have to first detect the device and protocol - there is a button for autodetection in digikamclient which should work for your cam too. Digikam has some very cool features (try the version from incoming not staging repo. There is also a separate package for plugins).

Offline

#18 2004-04-07 12:12:55

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: Accessing cameras and other mass storage devices

BTW Xentac thanks for including the scripts. It was very easy to use my ixus with archlinux this way (after reading a lot of web pages full of some strange device names, different advises etc :-) for several hours I just discovered that in Arch it takes just a few minutes to set everthing up :-))

Offline

Board footer

Powered by FluxBB