# Camera

## Woofles

I have a Nikon 5700 Digital Camera, and I am curious how I can make it work with Gentoo. It uses USB, any help is greatly appreciated.

P.S I'd prefer none of that B.S about buying a new Camera Thanks!  :Very Happy: 

----------

## Redson

I've had success with gphoto2 (a command line interface) and its gui gtkam(gtk2 app).

It appears your camera is currently in the testing stages, which is has worked just fine for me

"Nikon Coolpix 5700 (PTP mode)" (TESTING)

First of all I would add "usb" to your USE variables in make.conf if its not already there.  After that I would 

emerge -p gtkam

and checkout the gphoto2 website.

----------

## Woofles

I emerged GTkam with usd in my use flags, only seems to go up to Nikon Coolpix 990, I checked out the website and didn't find anything on the 5700 that I can download, only what you showed me. Anyinput?

----------

## Kabuto

What version of gphoto did you load?  2.1.1 I think is still only in ~x86.  You can always get the CVS version from the gphoto site.  They should be doing a new version soon and it will get into portage.

----------

## Woofles

Alright, I figured out I had to get libgphoto2 emerged, it is now supported but it dosen't seem to deteect it now.... My computer has 4 usb ports two in the back and two in the front, it is the top one in the front any ideas on how to make it regonize it?

I have tried it as root also...

As always thanks for your help in advance!

----------

## jt42

Are the usb modules loaded?

The camera may simply look like a usb mass storage device to the computer so you may have to have the usb mass storage device module available.

-john

----------

## Woofles

This is what I have in /usr/src/linux under USB:

```

  │ ┌─────────────────────────────────────────────────────────────────────┐ │

  │ │<*> Support for USB                                                  │ │

  │ │[ ]   USB verbose debug messages                                     │ │

  │ │--- Miscellaneous USB options                                        │ │

  │ │[*]   Preliminary USB device filesystem                              │ │

  │ │[*]   Enforce USB bandwidth allocation (EXPERIMENTAL)                │ │

  │ │[*]   Long timeout for slow-responding devices (some MGE Ellipse UPSe│ │

  │ │--- USB Host Controller Drivers                                      │ │

  │ │< >   EHCI HCD (USB 2.0) support (EXPERIMENTAL)                      │ │

  │ │<*>   UHCI Alternate Driver (JE) support                             │ │

  │ │< >   OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support              │ │

  │ │--- USB Device Class drivers                                         │ │

  │ │< >   USB Audio support                                              │ │

  │ │< >   USB Bluetooth support (EXPERIMENTAL)                           │ │

  │ │< >   USB MIDI support                                               │ │

  │ │<M>   USB Mass Storage support                                       │ │

  │ │[*]     USB Mass Storage verbose debug                               │ │

  │ │[ ]     Datafab MDCFE-B Compact Flash Reader support                 │ │

  │ │[ ]     Freecom USB/ATAPI Bridge support                             │ │

│ │[ ]     ISD-200 USB/ATA Bridge support                               │ │

  │ │[ ]     Microtech CompactFlash/SmartMedia support                    │ │

  │ │[ ]     HP CD-Writer 82xx support                                    │ │

  │ │[ ]     SanDisk SDDR-09 (and other SmartMedia) support               │ │

  │ │[ ]     SanDisk SDDR-55 SmartMedia support                           │ │

  │ │[ ]     Lexar Jumpshot Compact Flash Reader                          │ │

  │ │< >   USB Modem (CDC ACM) support                                    │ │

  │ │<*>   USB Printer support                                            │ │

  │ │--- USB Human Interface Devices (HID)                                │ │

  │ │< >   USB Human Interface Device (full HID) support                  │ │

  │ │---     Input core support is needed for USB HID input layer or HIDBP│ │

  │ │--- USB Imaging devices                                              │ │

  │ │< >   USB Kodak DC-2xx Camera support                                │ │

  │ │< >   USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)        │ │

  │ │< >   USB Scanner support                                            │ │

  │ │< >   Microtek X6USB scanner support                                 │ │

  │ │< >   HP53xx USB scanner support (EXPERIMENTAL)                      │ │

│ │< >   HP53xx USB scanner support (EXPERIMENTAL)                      │ │

  │ │--- USB Multimedia devices                                           │ │

  │ │---   Video4Linux support is needed for USB Multimedia device support│ │

  │ │--- USB Network adaptors                                             │ │

  │ │< >   USB Pegasus/Pegasus-II based ethernet device support (EXPERIMEN│ │

  │ │< >   USB Realtek RTL8150 based ethernet device support (EXPERIMENTAL│ │

  │ │< >   USB KLSI KL5USB101-based ethernet device support (EXPERIMENTAL)│ │

  │ │< >   USB CATC NetMate-based Ethernet device support (EXPERIMENTAL)  │ │

  │ │< >   USB Communication Class Ethernet device support (EXPERIMENTAL) │ │

  │ │< >   USB-to-USB Networking cable device support (EXPERIMENTAL)      │ │

  │ │--- USB port drivers                                                 │ │

  │ │USB Serial Converter support  --->                                   │ │

  │ │--- USB Miscellaneous drivers                                        │ │

  │ │< >   USB Diamond Rio500 support (EXPERIMENTAL)                      │ │

  │ │< >   USB Auerswald ISDN support (EXPERIMENTAL)                      │ │

  │ │< >   Texas Instruments Graph Link USB (aka SilverLink) cable support│ │

  │ │< >   Tieman Voyager USB Braille display support (EXPERIMENTAL)      │ │

  │ │< >   USB LCD device support                                         │ │

```

USB Mass storage won't let me use it as a model, anymore suggestions?

----------

## Redson

 *Roske wrote:*   

> I emerged GTkam with usd in my use flags, only seems to go up to Nikon Coolpix 990, I checked out the website and didn't find anything on the 5700 that I can download, only what you showed me. Anyinput?

 

A couple things.  "usd" is a typo, correct?  I only ask because I know I'd do the same thing

Also, make sure you have the 2.1.1 release of gphoto2 because your camera is NOT supported by any prior release.  If "emerge -p gphoto2" doesn't point to   2.1.1 then do (Assuming you're not on a PPC or Sparc):

```
$ACCEPT_KEYWORDS="~x86" emerge -p libgphoto gphoto2
```

Then try gtkam and select from the menu 

"add camera->autodetect->apply"

if that doesn't work:

check to see if its a gtkam problem.  Resort to the command line.

http://gphoto.sourceforge.net/doc/manual/using-gphoto2.html

Specifically Try:

```
$gphoto2 --list-ports

$gphoto2 --auto-detect

$gphoto2 --summary
```

If it borks on --list-ports, its probably either a permissions problem (try running as root) and/or a usb problem , if it borks on --auto-detect post here again  :Very Happy: .  If these commands all work:

```
$gphoto2 --list-files

$gphoto2 --get-all-files (if, of course, you want to get all files) --
```

If none of this works, post again and I'll look at it once I get home and in front of my own computer.

Best of luck

[Edit] By the way, if it ends up being a permissions problem, check out this page:

http://gphoto.sourceforge.net/doc/manual/permissions-usb.html#usb-on-linux

which has plenty of information on setting up permissions for usb.

----------

## Woofles

 *Quote:*   

> A couple things. "usd" is a typo, correct?

 

Yes it is, I didn't see it when I was typing the previous post, sorry.

 *Quote:*   

> Also, make sure you have the 2.1.1 release of gphoto2 because your camera is NOT supported by any prior release.

 

You sure? When I type: 

```
gphoto2 --list-cameras

        .... Skip a few

        "Nikon CoolPix 100"

        "Nikon CoolPix 300"

        "Nikon Coolpix 5700 (PTP mode)" (TESTING)

```

I am only using gPhoto (v2.1.0)

 *Quote:*   

> Then try gtkam and select from the menu
> 
> "add camera->autodetect->apply" 

 

Dosen't detect it, either does command line... 

```

root@gentoo Woofles # gphoto2 --list-ports

Devices found: 2

Path                             Description

--------------------------------------------------------------

serial:/dev/tts/0                Serial Port 0

usb:                             Universal Serial Bus

root@gentoo Woofles # gphoto2 --auto-detect

Model                          Port

----------------------------------------------------------

root@gentoo Woofles # gphoto2 --summary

ERROR: Please specify a model.

*** Error ('Unknown model') ***

```

Dosen't seem to be a permission problem, nothing wrong with my menuconfig is there?   :Crying or Very sad:   It also dosen't appear to be gphoto 2.1.0's fault, maby more of a module problem? Should I switch them from built into models:?

Thanks for your help!

----------

## stimpy

I've got the 5700 and I've just been using it through the USB storage interface. Mounting it by hand and transferring files. (I didn't realise it was now being supported albeit experimentally in gphoto2.)

To do this you need the USB storage element and the generic scsi emulation. (Which is under some esoteric place in the kernel I can't now remember fully - not in the SCSI section!)

Them, after plugging into the USB port, the device is available on /dev/sda1.

In the past, I had problems with the USB device being registerd by the relevant "bits", and had to "manually" force it through a ls of /dev/scsi/host0/bus0/target0/lun0/ (or whatever scsi chain turns up) to get a "part1" device, which then caused /dev/sda1 (/dev/sda to be absolutely correct i guess) to come into existence.

I must now have a look at gphoto support. (I thought it would come sooner or later as Nikons are pretty popular, and the 5700 seems the replacement for the 900 series.)

----------

## Woofles

Stimpy, hmm.... I tried what you said, and didn't work... I currently use scsi emulation for my cdrw, couldn't get the camera trick to work  :Sad: 

Anyway, now I have all the usb stuff as modules, and well still no luck with gphoto2, here is my lsmod :

```

root@gentoo usb # lsmod

Module                  Size  Used by    Tainted: P

usb-uhci               24428   0  (unused)

snd-ens1371            12588   1  (autoclean)

snd-rawmidi            14528   0  (autoclean) [snd-ens1371]

snd-seq-device          4500   0  (autoclean) [snd-rawmidi]

snd-ac97-codec         37984   0  (autoclean) [snd-ens1371]

snd-pcm-oss            40164   1  (autoclean)

snd-pcm                65632   0  (autoclean) [snd-ens1371 snd-pcm-oss]

snd-page-alloc          5616   0  (autoclean) [snd-pcm]

snd-timer              15976   0  (autoclean) [snd-pcm]

snd-mixer-oss          13912   0  (autoclean) [snd-pcm-oss]

snd                    33156   0  (autoclean) [snd-ens1371 snd-rawmidi snd-seq-device snd-ac97-codec snd-pcm-oss snd-pcm snd-timer snd-mixer-oss]

sg                     29356   0  (autoclean) (unused)

sr_mod                 16088   0  (autoclean) (unused)

sd_mod                 10892   0  (autoclean) (unused)

scsi_mod               89748   3  (autoclean) [sg sr_mod sd_mod]

ide-cd                 30628   0  (autoclean)

cdrom                  29856   0  (autoclean) [sr_mod ide-cd]

soundcore               4356   6  [snd]

ppp_deflate             3512   0  (autoclean)

zlib_deflate           18680   0  (autoclean) [ppp_deflate]

zlib_inflate           18916   0  (autoclean) [ppp_deflate]

bsd_comp                4440   0  (autoclean)

ppp_async               8160   1  (autoclean)

ppp_generic            23392   3  (autoclean) [ppp_deflate bsd_comp ppp_async]

slhc                    5280   1  (autoclean) [ppp_generic]

hcfpciserial           24952   1  (autoclean)

hcfpciengine          886224   0  (autoclean) [hcfpciserial]

hcfpciosspec           16988   1  (autoclean) [hcfpciserial hcfpciengine]

ipt_MASQUERADE          2072   1  (autoclean)

iptable_nat            24504   1  (autoclean) [ipt_MASQUERADE]

ip_conntrack           33344   1  (autoclean) [ipt_MASQUERADE iptable_nat]

ip_tables              15768   4  [ipt_MASQUERADE iptable_nat]

usbcore                66016   1  [usb-uhci]

nvidia               1548064  10

3c59x                  28592   1

```

Maby you can tell me if I have all the right usb stuff loaded? Still haven't gotten anywhere yet  :Sad: 

----------

## stimpy

Its the old "hmmm looks okay - but still not working" trick. 

Basically I have the USB Devfs and SCSI emulation compiled into the kernel (I use it for cdrw as well.) I have all the other USB things I need as modules because I've been playing with switching my mouse from PS2 to USB.

For some reason I also have USB Storage as a module, which gets loaded automatically. (Go figure.)

The other modules I load in /etc/modules.autoload are: input, usbmouse and usb-uhci, which brings in hid and mousedev. Now I'm pretty sure these make no difference to the camera stuff.

Now looking at your lsmod output, it seems you don't have usb-storage. But I see earlier (I think) that you've compiled that in.

My only other advice is to look through the output from dmesg; when you boot, and when you turn on the camera. You may find something there. You also want to check you PCI devices that list your hubs and controllers.

Since making the earlier post I compiled up gphoto2, but have yet to get it to recognise the Nikon. I think it may have somethin to do with the PTP stuff and/or my particular controllers and kernel support. (That sounds good but I really haven o idea at the moment.) 

I'll keep trying and keep you informed.

----------

## stimpy

gphoto2 that is. (Apart from lots of obscure pango errors and other stuff...)

Things I found were:

if you're going to use gphoto and the PTP driver, your camera better be in PTP rather than mass storage mode!  :Embarassed:   Check this in the setup menu under USB. (I imagine that if you're trying to use mass storage and the camera is setup for PTP, then that won't work wither.)The info is all in the gphoto setup guide and FAQ. You just have to know what to look for and try to understand whats going on.keys for more were to enable hotplug, with all the attendant usbcam stuff as mentioned in section 4.3. note if you're running a USB mouse be sure that you've already got hotplug running or you get out of your X environment first. Hotplug snaffles the mouse and X loses sight of it. Thank god for key board shortcuts and alt-tab  :Smile:  I used the usbcam.console hotplug example BTW

Thats the nub of it. Check the info that you get from /proc/bus/usb/*

There's still some "bugs" that I need to iron out. eg the pango errors, and also how to use the save feature in gtkam (it seems to want to save the image and raw things in the same file.) but there's enough functionality there for it to be slightly more useful than the mass storage and mount approach.

In closing, key versions are: sys-apps/hotplug: 20020826-r2, media-gfx/gphoto2: 2.1.1-r1, and media-libs/libgphoto2: 2.1.1-r2. (I'm in the 2.4.20-r5 gentoo-sources kernel.)

----------

## Redson

Hmmm... I'm not sure what else to suggest besides getting the newest version just to be sure (Especially because support is only experimental...)

Also here's my menuconfig:

I should probably mention that even though I compiled USB mass storage support as a module, I don't load the module.

```

  x x<*> Support for USB                                                  x x   

  x x[ ]   USB verbose debug messages                                     x x   

  x x--- Miscellaneous USB options                                        x x   

  x x[*]   Preliminary USB device filesystem                              x x   

  x x[ ]   Enforce USB bandwidth allocation (EXPERIMENTAL)                x x   

  x x[ ]   Long timeout for slow-responding devices (some MGE Ellipse UPSex x   

  x x--- USB Host Controller Drivers                                      x x   

  x x< >   EHCI HCD (USB 2.0) support (EXPERIMENTAL)                      x x   

  x x<*>   UHCI Alternate Driver (JE) support                             x x   

  x x< >   OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support              x x   

  x x--- USB Device Class drivers                                         x x   

  x x< >   USB Audio support                                              x x   

  x x< >   USB Bluetooth support (EXPERIMENTAL)                           x x   

  x x< >   USB MIDI support                                               x x   

  x x<M>   USB Mass Storage support                                       x x   

  x x[ ]     USB Mass Storage verbose debug                               x x   

  x x[ ]     Datafab MDCFE-B Compact Flash Reader support                 x x   

  x x[ ]     Freecom USB/ATAPI Bridge support                             x x   

  x x[ ]     ISD-200 USB/ATA Bridge support                               x x   

  x x[ ]     Microtech CompactFlash/SmartMedia support                    x x   

  x x[ ]     HP CD-Writer 82xx support                                    x x   

  x x[ ]     SanDisk SDDR-09 (and other SmartMedia) support               x x   

  x x[ ]     SanDisk SDDR-55 SmartMedia support                           x x   

  x x[ ]     Lexar Jumpshot Compact Flash Reader                          x x   

  x x< >   USB Modem (CDC ACM) support                                    x x   

  x x< >   USB Printer support                                            x x   

  x x--- USB Human Interface Devices (HID)                                x x   

  x x< >   USB Human Interface Device (full HID) support                  x x   

  x x---     Input core support is needed for USB HID input layer or HIDBPx x   

  x x--- USB Imaging devices                                              x x   

  x x< >   USB Kodak DC-2xx Camera support                                x x   

  x x< >   USB Mustek MDC800 Digital Camera support (EXPERIMENTAL)        x x   

  x x< >   USB Scanner support                                            x x   

  x x< >   Microtek X6USB scanner support                                 x x   

  x x< >   HP53xx USB scanner support (EXPERIMENTAL)                      x x   

  x x--- USB Multimedia devices                                           x x   

  x x< >   USB IBM (Xirlink) C-it Camera support                          x x   

  x x< >   USB OV511 Camera support                                       x x   

  x x< >   USB Philips Cameras                                            x x   

  x x< >   USB SE401 Camera support                                       x x   

  x x< >   USB STV680 (Pencam) Camera support                             x x   

  x x< >   USB 3com HomeConnect (aka vicam) support (EXPERIMENTAL)        x x   

  x x< >   D-Link USB FM radio support (EXPERIMENTAL)                     x x   

  x x< >   DABUSB driver                                                  x x   

  x x--- USB Network adaptors                                             x x   

  x x< >   USB Pegasus/Pegasus-II based ethernet device support (EXPERIMENx x   

  x x< >   USB Realtek RTL8150 based ethernet device support (EXPERIMENTALx x   

  x x< >   USB KLSI KL5USB101-based ethernet device support (EXPERIMENTAL)x x   
```

----------

## Woofles

Woohooo I finally figured it out, I can mount it as /dev/sda1 now atleast, I'll work on the gtkam later, for now this will work. Thanks for your help folks   :Very Happy: 

----------

## elyre_elan

Sorry to be such a noob, but I am trying to manually mount my Olympus C-4000 camera manually.  gphoto has difficulty recognizing it, so I am opting for brute force.  Anyway, when I type: 

mount /dev/sda1 /mnt/camera

the response I get is:

mount: you must specify the filesystem type

Ummm, what filesystem type do I specify?

----------

## stimpy

Typically you want to use vfat as your filesystem type (See "man mount" for details on how to specify.) If that doesn't work, try umsdos.

----------

## elyre_elan

Thanks!  vfat worked like a charm.  I'm curious though, why does the digital camera store images in the vfat format?  I wouldn't think that would be the most efficient way, but then what do I know?    :Confused: 

----------

## Onnelinen

 *Roske wrote:*   

> Woohooo I finally figured it out, I can mount it as /dev/sda1 now atleast, I'll work on the gtkam later, for now this will work. Thanks for your help folks  

 

Hey! I've been trying to get my camera detected as a USB-storage device, but so far no luck. Could you explain how you managed to get it to work eventually by using scsi emulation? 

Thanks  :Smile: 

----------

## nadamsieee

Stimpy, you rock. I've seen a zillion posts about the USB storage interface option, but you may well be the first to spell out where the dev ends up, i.e. /dev/sda#.   :Cool:   I can now access my Sony DSC-P31. (Unfortunately gphoto2 supports the DSC-P30 but not the -P31).

Thanks!

Would anyone be willing to collaborate on writing a Digital Cam Guide for Gentoo that details all of the various ways in which to get access to the camera?

----------

## Onnelinen

I got my problem solved, it seems that sda1 was not created because i loaded the usb-storage module before loading sd_mod. So if anyone would have the same problem: load usb-storage last  :Wink: 

----------

## leej

 *elyre_elan wrote:*   

> Thanks!  vfat worked like a charm.  I'm curious though, why does the digital camera store images in the vfat format?  I wouldn't think that would be the most efficient way, but then what do I know?   

 

The images aren't stored 'in the vfat format'.  They're stored in jpg format on a FAT partition, presumably because FAT partitions are more accessible by a certain Operating System.  Apparently there's a minority out there still using Windows.    :Wink: 

----------

## Michal

I have an Olympus stylus 300.  I have been reading through these posts and it seems that accessing the camera as a mass storage device seems to work for some people.  How can I set up gentoo to mount /dev/sda1 to access the camera?

Thanks

----------

## vector0319

 *Robin_R_R wrote:*   

> Woohooo I finally figured it out, I can mount it as /dev/sda1 now atleast, I'll work on the gtkam later, for now this will work. Thanks for your help folks  

 

Robin_R_R,

I mount my Nikon Coolpix 5700 like you do because gtkam does not recognize the Nikon NEF format and if you like taking those nice RAW images then this is the only way (until gtkam/gphoto2 puts in NEF support - don't hold your breath). Gtkam works great for jpeg images, but you must make sure your camera is in ptp for it to work properly. Like I said I mount mine so it's in mass storage mode. Let me know if you have any questions. I really should right a nice howto on this  :Razz:  Hope this helps,

vector

----------

## Michal

I have installed the gtkam program as suggested in an earlier post, but I don't see my camera listed, I have an Olympus Stylus 300.  Is there anyway I can install that specific camera, or is there another solution?

----------

