# [solved] Nikon D700 and UDEV

## leighgiles

G'day,

I have just bought a Nikon D7000 and I'm trying to get udev to recognise it. With my D80 it creates a device /dev/D80  and I can mount the camera and away I go

Any help would be appreciated

regards

Leigh

```

Linux Amiens 2.6.36-gentoo-r5 #1 PREEMPT Wed Dec 22 18:19:09 EST 2010 x86_64 AMD Athlon(tm) 64 Processor 3700+ AuthenticAMD GNU/Linux

```

udev 10-local-rules

```

BUS=="usb", SYSFS{serial}=="592D3836355E0510276E0330045C54", KERNEL=="sd?1", NAME="%k", SYMLINK="S5600"

BUS=="usb", SYSFS{serial}=="              031106030000009F905300000000000", KERNEL=="sd?1", NAME="%k", SYMLINK="LEXR"

BUS=="usb", SYSFS{serial}=="20527ec621f1f9", KERNEL=="sd?1", NAME="%k", SYMLINK="JETFLASH"

SUBSYSTEM=="usb", SYSFS{serial}=="6017975", KERNEL=="sd?1", NAME="%k", SYMLINK="D80"

SUBSYSTEM=="usb", ATTR{serial}=="000009003653", KERNEL=="sd?1", NAME="%k", SYMLINK="D7000"

BUS=="usb", SYSFS{serial}=="058F312D81B", KERNEL=="sd?1", NAME="%k", SYMLINK="CRDRDR"

#BUS=="usb", SYSFS{product}=="ISSCEDRBTA", KERNEL=="sd?1", NAME=="%k", SYMLINK="BLUETOOTH"

BUS=="usb", SYSFS{idVendor}=="133c", KERNEL=="sd?1", NAME="%k", SYMLINK="MP3"

BUS=="usb", SYSFS{serial}=="001D92A5F59AC8C0F341072B", KERNEL=="sd?1", NAME="%k", SYMLINK="TMPDRV"

BUS=="usb", SYSFS{serial}=="0000000000000000003F0509130105", KERNEL=="sd?1", NAME="%k", SYMLINK="FT1"

BUS=="usb", SYSFS{idVendor}=="0x13fe", KERNEL=="sd?1", NAME="%k", SYMLINK="QUANTUM"

```

/var/log/messages

```

Amiens ~ # tail -60 /var/log/messages 

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_VENDOR_ID=04b0'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_MODEL=NIKON_DSC_D7000'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_MODEL_ENC=NIKON\x20DSC\x20D7000'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_MODEL_ID=0428'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_REVISION=0100'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_SERIAL=NIKON_NIKON_DSC_D7000_000009003653'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=000009003653'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_BUS=usb'

Dec 22 18:31:45 Amiens udevd-work[9773]: '/lib64/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:060101:'

Dec 22 18:31:45 Amiens udevd-work[9773]: 'usb_id --export /devices/pci0000:00/0000:00:10.4/usb1/1-1/1-1.1' returned with exitcode 0

Dec 22 18:31:45 Amiens udevd-work[9773]: device 0xe5ef10 has devpath '/devices/pci0000:00/0000:00:10.4/usb1/1-1'

Dec 22 18:31:45 Amiens udevd-work[9773]: device 0xe60670 has devpath '/devices/pci0000:00/0000:00:10.4/usb1'

Dec 22 18:31:45 Amiens udevd-work[9773]: device 0xe60950 has devpath '/devices/pci0000:00/0000:00:10.4'

Dec 22 18:31:45 Amiens udevd-work[9773]: device 0xe60c10 has devpath '/devices/pci0000:00'

Dec 22 18:31:45 Amiens udevd-work[9773]: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib64/udev/rules.d/70-acl.rules:73

Dec 22 18:31:45 Amiens udevd-work[9773]: GROUP 409 /etc/udev/rules.d/70-libgphoto2.rules:1083

Dec 22 18:31:45 Amiens udevd-work[9773]: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2

Dec 22 18:31:45 Amiens udevd-work[9773]: created db file for '/devices/pci0000:00/0000:00:10.4/usb1/1-1/1-1.1' in '/dev/.udev/db/usb:1-1.1'

Dec 22 18:31:45 Amiens udevd-work[9773]: creating device node '/dev/bus/usb/001/005', devnum=189:4, mode=0664, uid=0, gid=409

Dec 22 18:31:45 Amiens udevd-work[9773]: preserve file '/dev/bus/usb/001/005', because it has correct dev_t

Dec 22 18:31:45 Amiens udevd-work[9773]: chmod(/dev/bus/usb/001/005, 020664)

Dec 22 18:31:45 Amiens udevd-work[9773]: chown(/dev/bus/usb/001/005, 0, 409)

Dec 22 18:31:45 Amiens udevd-work[9773]: creating symlink '/dev/char/189:4' to '../bus/usb/001/005'

Dec 22 18:31:45 Amiens udevd-work[9773]: 'udev-acl --action=add --device=/dev/bus/usb/001/005' started

Dec 22 18:31:45 Amiens udevd-work[9773]: 'udev-acl --action=add --device=/dev/bus/usb/001/005' returned with exitcode 0

Dec 22 18:31:45 Amiens udevd-work[9773]: passed 634 bytes to monitor 0xe4b180

Dec 22 18:31:45 Amiens udevd-work[9773]: passed -1 bytes to monitor 0xe5e2d0

Dec 22 18:31:45 Amiens udevd-work[9773]: seq 1909 processed with 0

Dec 22 18:31:45 Amiens udevd[1239]: seq 1909 done with 0

Dec 22 18:31:45 Amiens udevd[1239]: passed 299 bytes to monitor 0xe4b190

Dec 22 18:31:45 Amiens udevd[1239]: passed 200 bytes to monitor 0xe4b190

Dec 22 18:31:45 Amiens udevd-work[9773]: seq 1910 running

Dec 22 18:31:45 Amiens udevd-work[9773]: RUN '/sbin/modprobe -b $env{MODALIAS}' /lib64/udev/rules.d/80-drivers.rules:5

Dec 22 18:31:45 Amiens udevd-work[9773]: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2

Dec 22 18:31:45 Amiens udevd-work[9773]: '/sbin/modprobe -b usb:v04B0p0428d0100dc00dsc00dp00ic06isc01ip01' started

Dec 22 18:31:45 Amiens udevd-work[9775]: seq 1911 running

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe4cc50 has devpath '/devices/pci0000:00/0000:00:10.4/usb1/1-1/1-1.1/usb_device/usbdev1.5'

Dec 22 18:31:45 Amiens udevd-work[9775]: LINK 'char/189:4' /lib64/udev/rules.d/50-udev-default.rules:4

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe5e690 has devpath '/devices/pci0000:00/0000:00:10.4/usb1/1-1/1-1.1'

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe4b460 has devpath '/devices/pci0000:00/0000:00:10.4/usb1/1-1'

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe4b770 has devpath '/devices/pci0000:00/0000:00:10.4/usb1'

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe4ba70 has devpath '/devices/pci0000:00/0000:00:10.4'

Dec 22 18:31:45 Amiens udevd-work[9775]: device 0xe4bd60 has devpath '/devices/pci0000:00'

Dec 22 18:31:45 Amiens udevd-work[9775]: RUN 'socket:@/org/freedesktop/hal/udev_event' /etc/udev/rules.d/90-hal.rules:2

Dec 22 18:31:45 Amiens udevd-work[9775]: no node name set, will use kernel supplied name 'usbdev1.5'

Dec 22 18:31:45 Amiens udevd-work[9775]: created db link (usbdev1.5 char/189:4)

Dec 22 18:31:45 Amiens udevd-work[9775]: creating device node '/dev/usbdev1.5', devnum=189:4, mode=0660, uid=0, gid=0

Dec 22 18:31:45 Amiens udevd-work[9775]: preserve file '/dev/usbdev1.5', because it has correct dev_t

Dec 22 18:31:45 Amiens udevd-work[9775]: chmod(/dev/usbdev1.5, 020660)

Dec 22 18:31:45 Amiens udevd[1239]: seq 1911 done with 0

Dec 22 18:31:45 Amiens udevd-work[9775]: atomically replace '/dev/char/189:4'

Dec 22 18:31:45 Amiens udevd-work[9775]: passed 271 bytes to monitor 0xe4cc50

Dec 22 18:31:45 Amiens udevd-work[9775]: passed -1 bytes to monitor 0xe5e490

Dec 22 18:31:45 Amiens udevd-work[9775]: seq 1911 processed with 0

Dec 22 18:31:45 Amiens udevd-work[9773]: '/sbin/modprobe' (stderr) 'FATAL: Module usb:v04B0p0428d0100dc00dsc00dp00ic06isc01ip01 not found.'

Dec 22 18:31:45 Amiens udevd[1239]: seq 1910 done with 0

Dec 22 18:31:45 Amiens udevd-work[9773]: '/sbin/modprobe -b usb:v04B0p0428d0100dc00dsc00dp00ic06isc01ip01' returned with exitcode 1

Dec 22 18:31:45 Amiens udevd-work[9773]: passed 329 bytes to monitor 0xe5e1a0

Dec 22 18:31:45 Amiens udevd-work[9773]: passed -1 bytes to monitor 0xe5e2d0

Dec 22 18:31:45 Amiens udevd-work[9773]: seq 1910 processed with 0

```

----------

## Herring42

Looking at your rules: 

```
SUBSYSTEM=="usb", SYSFS{serial}=="6017975", KERNEL=="sd?1", NAME="%k", SYMLINK="D80"

SUBSYSTEM=="usb", ATTR{serial}=="000009003653", KERNEL=="sd?1", NAME="%k", SYMLINK="D7000"

```

Your D80 has "SYSFS{serial}==" and the rule for the D7000 has "ATTR{serial}==".

Is that correct? How did you make the rule?

----------

## leighgiles

Thanks for the reply.

As the udev rules load it complains about sysfs being replaced by attr so I did as it asked.

The D80 rule is about 4 years old, I copied it to make the D7000 rule

----------

## slackline

No idea about the D7000 (or D700?), but when I upgraded from my D50 to a D90 I found that the newer model no longer supported connection via USB mode and only supported PTP.

The manual for the D7000 doesn't seem to mention much about setting the transfer mode it describes using Nikon's software (under M$) to transfer files.

DPReview of D7000 doesn't mention anything about transfer modes either (unlike their review of the D90 which does).

Anyway, my guess (without having a D7000 to play with) is that you won't be able to write a udev rule to mount it as a USB device as only PTP transfer mode is available.

What I opted for with my D90 was to use gtkam the graphical front-end to gphoto2 to transfer files.  Simply emerge it 'emerge -av gtkam' and once its done connect your D7000 via USB and turn it on, now launch gtkam and your camera should be listed with expandable menus to the directory where pictures are saved, and from here you can save them to anywhere you choose.

----------

## leighgiles

D700 (wishfull thinking). 

I'll use the card reader for the moment and experiment with gtkam - it doesn't list the D7000

Thanks for your help

----------

## slackline

 *leighgiles wrote:*   

> D700 (wishfull thinking). 

 

You must have been dreaming when you started the thread then

 *leighgiles wrote:*   

> 
> 
> I'll use the card reader for the moment and experiment with gtkam - it doesn't list the D7000
> 
> 

 

gphoto2 lists the D3000 and D5000 so I reckon you've a good chance of the D7000 being supported, in fact a quick search reveals that someone has got it working fine.

Oh and check out RawTherapee for processing your RAW images, its brilliant and if you do nothing other than correct white-balance when the cameras got it wrong its worth having.  You're best bet is to grab the live ebuild from Bugzilla (the one thats 9999) and put it in a local overlay.

----------

## leighgiles

Thanks for your help

gphoto2 works.

The rawtherapee ebuild doesn't work for me. It is looking for a files directory in the media-gfx/rawtherapee directory

----------

## swimmer

 *leighgiles wrote:*   

> Thanks for your help
> 
> gphoto2 works.
> 
> The rawtherapee ebuild doesn't work for me. It is looking for a files directory in the media-gfx/rawtherapee directory

 

Simply download the 2 files rawtherapee.{desktop,png} from the bugreport to $PORTDIR_OVERLAY/media-gfx/rawtherapee/files and run 

```
ebuild $PORTDIR_OVERLAY/media-gfx/rawtherapee/rawtherapee-9999.ebuild manifest
```

HTH

swimmer

----------

