New camera

So I got a new camera, a Canon IXUS-55:


This wouldn’t be remotely interesting in itself except that it’s new enough to not have Linux support out of the box, and so required a little hacking …

Modern Linux distributions map physical devices to virtual ones via Udev. In order to know what to do with a USB device it uses sysfs to lookup the unique ID and then uses the mappings in /etc/udev to create the appropriate files under /dev. Only those mapping don’t exist on my machine.

To find out the appropriate mappings I plugged the camera in and watched the output of dmesg:

usb 5-3: new high speed USB device using ehci_hcd and address 5

We can now find this device under sysfs:

ssmith@moth:~$ cat /sys/bus/usb/devices/usb5/5-3/product
Canon Digital Camera
ssmith@moth:~$ cat /sys/bus/usb/devices/usb5/5-3/idVendor
04a9
ssmith@moth:~$ cat /sys/bus/usb/devices/usb5/5-3/idProduct
30ff

So from this I added the following line to /etc/udev/libgphoto2.rules:

# Canon Digital IXUS 55 (PTP mode)
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="04a9", SYSFS{idProduct}=="30ff", GROUP="camera"

This gives the group camera (of which I’m a member on this machine) permissions to access the device, and thus camera apps:




The camera also has video and audio out, so I’ve got to try it out as an AG camera.

It’s also possible to upload files to the camera. However you need to specify a subdir (with -f in gphoto2), it only accepts files that end in .jpg, and it renames those files to its internal filename sequence (img_*.jpg).

Unifying schema in LDAP

So what all that OID stuff below was about is that I would like to have as much user information in one place in the LDAP database. So rather than have a seperate automount table I’d like to be able to specify the automountInformation attribute in the same place as the email and account-id. Only thing is some of the attributes clash if you try and include them all in a definition. The answer is to merge them into a single objectclass via multiple inheritance:


# OID 1.2.36.211513464.* is the University of Sydney OID (based on its ACN)
# OID 1.2.36.211513464.42.* is Vislab
# OID 1.2.36.211513464.42.1 is Vislab objectclasses
# OID 1.2.36.211513464.42.2 is Vislab attributes

# Mail forwarding. Based on qmail.schema.
attributetype ( 1.2.36.211513464.42.2.1 NAME 'mailForwardingAddress'
DESC 'Address(es) to forward all incoming messages to.'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

attributetype ( 1.2.36.211513464.42.2.2 NAME 'accountStatus'
DESC 'The status of a user account: active, disabled, deleted'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
SINGLE-VALUE )

# Vislab user. Merges some otherwise conflicting schemas
# and adds some mail-handling attributes.
objectclass ( 1.2.36.211513464.42.1.1 NAME 'vislabAccount'
DESC 'Vislab Organizational Person'
SUP ( inetOrgPerson $ automount $ person )
STRUCTURAL
MAY ( mailForwardingAddress $ accountStatus ) )

That mailForwardingAddress part is one of the real reasons for going to LDAP in the first place; rather than having to maintain separate user information in various places (passwd & groups files, automount and mail maps, etc) it can all go in the LDAP table and be configured in one go.

Another cool mail-related thing is the ability to add multiple mailAcceptingGeneralID attributes to a user. These effectively tag a user as a member of a mail group; thus all users with ‘mailAcceptingGeneralID: members’ will receive mail sent to ‘members@vislab…’

Visualising the big lie ….

This is interesting; an applet that visualises the differences in retouched fashion photos: http://detouch.org/

Stuff you really don’t care about …

Did you know…

That according to Standards Australia the ACN of your company can be used as a unique sub-tree of Australian portion of the OID tree? Thus the University of Sydney sub-tree is 1.2.36.211513464.

Bet you couldn’t have got through the day without knowing that.

Anyway, I’ve preemptively allocated 1.2.36.211513464.42 to Vislab because, well, it’s 42!

Quote of the day…

Computer science is the womanizer, and math is the pure-hearted girl he won’t call the next day.

Everything Your Professor Failed to Tell You About Functional Programming

  1. Archives

  2. Categories

  3. Twitter

    • Just got pictures of the earthquake damage from my sister in Kaiapoi. Real "the ground opened up" stuff. 15 minutes ago
    • Ooo, the beta of Angry Birds is out on Android. 17 hours ago
    • Released a new version of my Android Internode widget; fixes the problem with Internode's new SSL cert. 22 hours ago
    • @wangjammer5: Cool, here's something to get you started: http://is.gd/eT33b :) 1 day ago
    • So, if iTune Ping is Apple's social network will the perpetual Apple tweet circle-jerk move there now? 1 day ago
  4. RSS Google Reader Shared Items