A810 retracts lens on USB connect - General Help and Assistance on using CHDK stable releases - CHDK Forum

A810 retracts lens on USB connect

  • 5 Replies
  • 4909 Views
A810 retracts lens on USB connect
« on: 20 / December / 2015, 01:44:07 »
Advertisements
Dear CHDK

I am trying to learn how to use the CHDK on an A810 camera.

I have managed to change the <atl> mode switch button from "play" to "help".

However, I do not understand why when USB cable is inserted into the camera, the camera lens
retracts and closes.

Here is what I would like to be able to do and I thought it was possible.

I would like to be able to control camera via a regular USB cable from computer using either
gphoto2 or chdkptp programs.

What I was able to do is to use gphoto2 or chdkptp to trasnfer images from the camera to computer.

What I would like be able to do is to send a command from the computer to make a photo and then transfer the photo from camera to computer. at this point it does not matter whether the photo will be
stored on the internal memory card or not.

But I do not understand how to do it or if it is possible. Reading some postings, I thought it was possible.

If it is possible could some one describe what i did wrong and what can be done to correct the issue.
If it is not possible, could you also educate me.

Thank you very much for your kind help
panda

*

Offline reyalp

  • ******
  • 14121
Re: A810 retracts lens on USB connect
« Reply #1 on: 20 / December / 2015, 03:25:32 »
However, I do not understand why when USB cable is inserted into the camera, the camera lens
retracts and closes.

Here is what I would like to be able to do and I thought it was possible.

I would like to be able to control camera via a regular USB cable from computer using either
gphoto2 or chdkptp programs.

What I was able to do is to use gphoto2 or chdkptp to trasnfer images from the camera to computer.

What I would like be able to do is to send a command from the computer to make a photo and then transfer the photo from camera to computer. at this point it does not matter whether the photo will be
stored on the internal memory card or not.

But I do not understand how to do it or if it is possible. Reading some postings, I thought it was possible.
It should be possible to shoot and transfer files using chdkptp. gphoto probably cannot be used to control shooting on this camera.

When you are using chdkptp, you should connect with the camera in playback mode, and then switch to record mode using the chdkptp rec command. If the camera is in rec mode when you plug in the usb, it will switch to play, and the chkdptp rec command may not work.

What operating system are you using?

If you are using linux, you may have problems with some other software from your distro accessing the camera. See the "Interactions with default software" section near the end of https://www.assembla.com/spaces/chdkptp/wiki/Install
If you have the problem, the camera screen will probably go black when you plug in the USB cable.

Don't forget what the H stands for.

Re: A810 retracts lens on USB connect
« Reply #2 on: 20 / December / 2015, 14:27:06 »
Dear reyalp,


yes, I use linux (debian jessie I did not realize it is related to the OS, I thought i did not
install something correctly on the camera itself or misunderstood something else...)

Oh, I read the warning about interaction and I saw that gvfs mounts the camera, but I did not
realize that umount is not sufficient.

I stopped gnome and I could make a shot with chdkptp and change zoom and download images.
Now I will start learning the controls of the camera.

However, I am curious how to stop gnome from mounting the camera or (probably better) how
to stop the notification to gnome. I was not able to find any info on that yet, other than to disable automounting of everything...

If some one has a suggestion, I will be very grateful.

Again, reyalp, thank you very much for pointing to the cause of the problem with retracted lens (stuck in play mode)

panda

*

Offline reyalp

  • ******
  • 14121
Re: A810 retracts lens on USB connect
« Reply #3 on: 20 / December / 2015, 14:51:42 »
However, I am curious how to stop gnome from mounting the camera or (probably better) how
to stop the notification to gnome. I was not able to find any info on that yet, other than to disable automounting of everything...
You should be able make local udev settings to just disable automounting for this camera. You can find some threads discussing this from the link I posted earlier, especially this post: http://chdk.setepontos.com/index.php?topic=10664.msg115401#msg115401

Unfortunately, udev documentation is not very clear, and every distro is a little different so I can't provide exact instructions. If you do try to do this, it is important to check both "hwdb" and "udev.rules"
Don't forget what the H stands for.


Re: A810 retracts lens on USB connect
« Reply #4 on: 20 / December / 2015, 16:16:30 »
Dear reyalp


I did follow the link to another forum post with your solution. I also have found a similar one
somewhere else..

but....

what I understood is that
the rules file is generated from hwdb descriptions automatically when

udevadm hwdb --update

is exectuted.

however, just to test I edited the rules file directly

I am using debian jessie and the rules are
in

/lib/udev/rules.d/60-libgphoto2-6.rules



I modified lke this (the file is shown from the begining)

ACTION!="add", GOTO="libgphoto2_rules_end"
SUBSYSTEM!="usb", GOTO="libgphoto2_usb_end"
ENV{DEVTYPE}!="usb_device", GOTO="libgphoto2_usb_end"

ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"
ENV{ID_USB_INTERFACES}=="*:08*:*", GOTO="libgphoto2_usb_end"

############ I inserted this fragment########
#make a special rule for Canon PowerShot A810
# this really has to be in the hwdb.d /lib/udev/hwdb.d/20-libgphoto2-6.hwdb not here...
# this is needed if hwdb is updated: udevadm hwdb --update
# this is needed to update udev rules: udevadm trigger
ENV{ID_USB_INTERFACES}=="*:060101:*", ATTRS{idVendor}=="04a9", ATTRS{idProduct}=
="323f", MODE="0664", GROUP="plugdev", GOTO="libgphoto2_usb_end"
# end of modifications
###########################################
ENV{ID_USB_INTERFACES}=="*:060101:*", ENV{ID_GPHOTO2}="1", ENV{GPHOTO2_DRIVER}="
PTP", MODE="0664", GROUP="plugdev", GOTO="libgphoto2_usb_end"


...
the file continues with the rules built automatically from hwdb.d where each camera gets its own configuration .

I also did initramfs-update just in case the udev rules go somewhere during boot time and rebooted...
If I leave the line in, as described above, the camera does not show on the list of USB devices at all.
So, yes gnome/mate cannot mount it, but no one can talk to the camera either...

If I stop gnome form runing and use command line terminal (the one at alt-F1, alt-F2) and leave the default  udev rules  then chdkptp can talk to the camera...

Oh maybe the "goto"-passage does not work correctly and the automatic entry from hwdb is being processed??? does not seem to help...

panda


panda

Re: A810 retracts lens on USB connect
« Reply #5 on: 20 / December / 2015, 17:00:46 »
Dear reyalp

OK did what you did ..
no idea about the hwdb rules...

copied the camera configuration files from /lib/udev/hwdb.d/20-libgphoto2-6.hwdb to
/etc/udev/hwdb.d

and
/lib/udev/rules.d/60-libgphoto2-6.rules to /etc/udev/rules.d

modified the rules file as you propose and commented out the camera in the hwdb.

I assume /etc/udev/ ... stuff take precedence over the stuff in /lib/udev...

did
udevadm hwdb --update
udevadm trigger

and "just in case"
update-initramfs and rebooted...

gnome/mate does not interfere with the camera operation...

thanks

panda

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal