Jump to content

Hotplugging camera does not work


griptypethyne
 Share

Recommended Posts

Any help with the following hotplugging problem would be appreciated.

 

Mandrake 10.1

kernel 2.6.8.1

digikam 0.8.2

gphoto2 2.1.4

 

gphoto2 detects my camera. Using digikam I can download photos from the camera. However, hotplugging does not work.

 

/var/log/messages indicates that when I plug the camera in it is detected and the script usbcam is run. usbcam correctly detects the user. usbcam then sends a message saying that it is starting digikam-hotplug. I have not been able to find evidence that digikam-hotplug actually starts - I may be looking in the wrong log file. digikam-hotplug is executable. usbcam then seems to go into a loop checking the state of a lock.

 

The last few lines from dmesg are:

 

usb 2-2: USB disconnect, address 8

usb 2-2: new full speed USB device using address 9

via_audio: ignoring drain playback error -11

usb 2-2: USB disconnect, address 9

 

The above usb messages occur when I switch the camera on and off so this part of the system appears to be working correctly.

 

Here is an extract from the messages log:

 

Apr 15 12:05:58 localhost kernel: usb 2-2: new full speed USB device using address 9

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 5506 seconds old; removing it.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Creating lockfile /tmp/usbcam.lock.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): USB device /proc/bus/usb/002/009 found trying to start /etc/hotplug/usb/digik

am-hotplug.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Starting digikam-hotplug for dad.

Apr 15 12:05:59 localhost su(pam_unix)[21521]: session opened for user dad by (uid=0)

Apr 15 12:05:59 localhost su(pam_unix)[21521]: session closed for user dad

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 0 seconds old; exiting.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop root 21594 21592 0 12:06 ? 00:00:00 grep kdeinit..kdesktop!

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 0 seconds old; exiting.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop root 21624 21622 0 12:06 ? 00:00:00 grep kdeinit..kdesktop!

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 0 seconds old; exiting.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 0 seconds old; exiting.

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:05:59 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:05:59 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 0 seconds old; exiting.

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00

3 kdeinit: kdesktop root 21709 21707 0 12:06 ? 00:00:00 grep kdeinit..kdesktop!

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 1 seconds old; exiting.

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 1 seconds old; exiting.

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): ps -ef |grep kdeinit..kdesktop: dad 5915 1 0 Apr12 ? 00:00:

13 kdeinit: kdesktop !

Apr 15 12:06:00 localhost [3] usbcam (0.3.2): Started for dad, action: add

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock detected, checking age of file!

Apr 15 12:06:00 localhost [2] usbcam (0.3.2): /tmp/usbcam.lock is 1 seconds old; exiting.

Apr 15 12:06:56 localhost dhclient: DHCPREQUEST on eth0 to 10.1.1.1 port 67

Apr 15 12:06:56 localhost dhclient: DHCPACK from 10.1.1.1

Apr 15 12:06:56 localhost dhclient: bound to 10.1.1.3 -- renewal in 122 seconds.

Link to comment
Share on other sites

Sounds like a problem with digikam. Have you tried reinstalling or updating digikam?

 

I have compiled the latest nightly (0.8.2). Before that I had the same problem with 0.8.0 and 0.8.1. I cannot remember evergetting hotplugging to work with digikam. I do not think that it worked with 0.7.

 

I have done some more digging around and this is what I get:

 

usbcam correctly determines the current user so it must have found an active kde session.

 

usbcam calls digikam-hotplug.

 

I ran digikam-hotplug from a terminal. I received the message:

 

ERROR: No active KDE sessions!

If you are sure there is one, please set the $DCOPSERVER variable manually

before calling dcop.

 

I searched both usbcam and digikam-hotplug and could not find any reference to %DCOPSERVER.

Also, I could not find this error message in digikam-hotplug.

 

Maybe the problem is with dcop. I ran pkg-config --list-all but there was no reference to dcop. I tried dcop-config --version with no success. I also went into rpmdrake and searched for "dcop" in both the install and remove screens and there was no mention of it. Is dcop part of another package (kde?).

Link to comment
Share on other sites

10.1 is really archaic- should be fine for server usage, but for desktop stuff...

Simply upgrade to 2006, or to anther distro.

 

My ISP has just upgraded my DSL to 2 megs so downloading the 2006 ISOs is not really a problem ... except that I have only 1GB so it would take three months :D I am waiting for my local electronics retailer to sell 2006 packages. He sold 9.1 & 10.1 so I assume that 2006 will appear eventually. Then I will buy a new hard drive and do a clean install.

 

Back to 10.1...

 

Some googling revealed that if I run dcop from a terminal it will give me a list of applications that use dcop. I tried this and the error message was

 

ERROR: Couldn't attach to DCOP server!

 

When I started this thread I was stuck. At least I now have a lead to follow.

Link to comment
Share on other sites

I am now making progress. Until a few hours ago I had seen the name dcop but did not know what it was. Now, after entering dcop --help from a terminal (no man oage) and googling "dcop tutorial" things are starting to become clearer.

 

I entered

dcop --user $USER

 

and it gave me a list of applications using dcop - including digikam.

 

I then ran

dcop --user $USER digikam-3604

 

and it listed the available functions for digikam process 3604.

 

Finally I tried

dcop --list-sessions --user $USER

 

and it told me I had one session.

 

My next step will be to try and control digikam fom a terminal using dcop. If that works that will prove that the problem is not with digikam or dcop but is in the usbcam or digikam-hotplug scripts.

 

I will not bore you with any more details but will post a message when I have solved the problem B)

Link to comment
Share on other sites

Nearly there but I need some more help.

 

Running digikam-hotplug from a terminal (logged on as user) works.

 

The problem is that usbcam does not call digikam-hotplug. Th usbcam script fails because the $ACTION and $DEVICE variables have not been set. I have asdded ACTION="add" to the script but am having problems determining the device name.

 

proc/bus/usb/devices lists the camera.

 

lsusb gives

 

Bus 002 Device 015: ID 04a9:3073 Canon, Inc.

Bus 002 Device 001: ID 0000:0000

Bus 001 Device 001: ID 0000:0000

 

If I go to /dev/usb there is a character device lp15.

 

If I add DEVICE="lp15" I get a "Device Not Found" message. I am sure that I have seen HOWTOs on this subject but at the moment cannot seem to enter the correct combination of keywords into Google.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...