Thursday, November 11, 2004

Of Weddings, Psychos, Cameras and Distros!

Some people get so starry eyed talking about their hometown. Vijay was in that kind of mood telling me about Vijaywada. I dont know whether I can attend his wedding or not, but I am sure I am gonna give it a good try. I think there are quite a few people who need to get married... Hrishikesh "Nerd" Das and Sapna though I aint sure if the guy is planning to get married at all...then we have...Moumita Sarkar, whose age I keep a closely guarded secret for fear of ensuring that she never does get married...Debasree and Nabankur...heaven knows when they plan to tie the knot and Samit, the psycho... I am putting up a mugshot of his right here for anyone willing to marry this ineligible bachelor!!



Which reminds me, I have a shiny new digital camera; a Sony DSC-P150... and yep!! it works with Linux...Yippeee....



But I think I have had to hold back my cheers for a while. I didnt have any trouble getting it to work on any of my desktops which run Mandrake/Fedora/Suse. In fact I could run it under Mass Storage and PTP modes flawlessly. I had a tough time getting it to work on my notebook though. I tried plugging in the camera to see if it hotplugged and did a
#mount -t vfat /dev/sda1 /mnt/camera. But all I got was mount: /dev/sda1 is not a valid block device. Now I had all the relevant modules(usb-storage,scsi_mod, uhci..etc) loaded. Obviously my hotplug system wasnt doing a very good job. Turned out I had disabled hotplug since I wasnt using it that much. A #chmod 755 /etc/rc.d/rc.hotplug got my hotplug back on track. But I still didnt see the device listed on /proc/bus/usb/devices. #mount -t usbfs none /proc/bus/usb with an appropriate entry in /etc/fstab for the same, did the trick here. What was left? I thought I was done, but I still kept getting the same error. I had no option but to download gphoto2 and digikam. Now compiling and installing these was a snap; getting them to work was another story. GPhoto2 is a program to access digital camera, via PTP. Digikam happens to be a frontend to GPhoto2. Digikam did autodetect my camera, but couldnt connect to it. I had a brainwave which suggested to me that a few things were wrong.
  1. A relevant entry for the camera didnt exist in /etc/hotplug/usb.usermap
  2. Ordinary users didnt have sufficient privileges to access the device
I solved this problem with a minor tweak:
a) Added the following lines to /etc/hotplug/usb.usermap

# usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
# USB PTP Class Camera
usbcam 0x0080 0x0000 0x0000 0x0000 0x0000 0x00 0x00 0x00 0x06 0x00 0x00 0x00000000

b)Next I hand created the script /etc/hotplug/usb/usbcam to read thus
#!/bin/bash
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
chmod a+rw "${DEVICE}"
fi

A chmod u+x /etc/hotplug/usb/usbcam finished the job for me & I am now able to use a
digikam+gphoto2 combo to access the camera through PTP. Digikam rox! Here's a screenshot!



But I still want to be able to use USB Mass Storage to access the camera cos PTP drains my batteries real quick. If someone reading this has a solution to my problem do write to me and I assure you, you shall be blessed. BTW, I just upgraded to Suse9.2 a couple of days back and it seems that Novell has drastically toned down Suse's everything_but_the_kitchen_sink approach. Many applications that I loved, are missing. Quanta+, kuickshow, xfce, mplayer, etc.. While I have been downloading these, I am a little displeased with the way Novell seems to be positioning Suse as a distro. Looks like I should give Gentoo a try
Related Posts with Thumbnails