Quantcast

Sony Alpha 6000 freezes after multiple image captures

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sony Alpha 6000 freezes after multiple image captures

Anand1227
Hello all,

I am trying to control a Sony Alpha 6000 via a raspberry pi. Instead of using the CLI frontend (gphoto2), I am using the functions of libgphoto2 in my own C code. The function calls in my code looks something like this:

capture_to_file()
    gp_camera_capture()
    gp_file_new_from_fd()
    gp_camera_file_get()
   gp_file_free()
   gp_camera_file_delete()
       
main()
    gp_log_add_func()
    gp_camera_new()
    gp_camera_init()
      capture_to_file()  // calling this function in loop
   gp_camera_exit

It seems as though the camera freezes after some number of captures. To be precise, gp_camera_capture() does not give back the control to my code. And it is stuck in this state forever.

Interestingly, if I do a ctrl+c in the terminal, and execute my code again (without doing any kind of camera reset), the camera does not take a picture for the first time, but it seems to have the image in the SDRAM, which it writes to the file, and then proceeds to take pictures till it hangs again.

Also, even when it is taking pictures, I see the following warning being displayed for every capture ( I have enabled GP_LOG_ERROR):
 
Reading PTP event failed: Timeout reading from or writing to the port (-10)

I also checked the following thread
http://gphoto-software.10949.n7.nabble.com/Sony-Alpha-Series-Freezes-td14996.html

But there don't seem to be concrete solution given in that thread.

What am I doing wrong? Any help would be really helpful. This seems like a bug in the

Thank you.

PS:
I am using libgphoto2 2.5.12

Cheers,
Anand




 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sony Alpha 6000 freezes after multiple image captures

Marcus Meissner
On Tue, Mar 14, 2017 at 06:23:56AM -0700, Anand1227 wrote:

> Hello all,
>
> I am trying to control a Sony Alpha 6000 via a raspberry pi. Instead of
> using the CLI frontend (gphoto2), I am using the functions of libgphoto2 in
> my own C code. The function calls in my code looks something like this:
>
> capture_to_file()
>     gp_camera_capture()
>     gp_file_new_from_fd()
>     gp_camera_file_get()
>    gp_file_free()
>    gp_camera_file_delete()
>        
> main()
>     gp_log_add_func()
>     gp_camera_new()
>     gp_camera_init()
>       capture_to_file()  // calling this function in loop
>    gp_camera_exit
>
> It seems as though the camera freezes after some number of captures. To be
> precise, gp_camera_capture() does not give back the control to my code. And
> it is stuck in this state forever.
>
> Interestingly, if I do a ctrl+c in the terminal, and execute my code again
> (without doing any kind of camera reset), the camera does not take a picture
> for the first time, but it seems to have the image in the SDRAM, which it
> writes to the file, and then proceeds to take pictures till it hangs again.
>
> Also, even when it is taking pictures, I see the following warning being
> displayed for every capture ( I have enabled GP_LOG_ERROR):
>  
> Reading PTP event failed: Timeout reading from or writing to the port (-10)
>
> I also checked the following thread
> http://gphoto-software.10949.n7.nabble.com/Sony-Alpha-Series-Freezes-td14996.html
> <http://gphoto-software.10949.n7.nabble.com/Sony-Alpha-Series-Freezes-td14996.html>  
>
> But there don't seem to be concrete solution given in that thread.
>
> What am I doing wrong? Any help would be really helpful. This seems like a
> bug in the

It should actually work and not cause hangs.

Can you get a debuglogfile of such a hang?

The interrupt timeout is not an issue, if there is no interrupt ready,
it will be reported but this is common.

Ciao, Marcus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sony Alpha 6000 freezes after multiple image captures

Anand1227
Hi Marcus,

Thank you for the quick response. I think I solved the problem. While I was installing the latest version of libgphoto2, I did not remove the old one. Meaning, I had two instances of libgphoto2. So I completely removed everything relating to gphoto2 and made a new installation. And now it seems to work smoothly. Sorry for the trouble.

However, I have few more questions.

About installation:

I have two options: "libusb" and "libusb-1" in USB-PORTS, when I run ./configure. In my pi, I dint have libusb-1 before, and it used libusb alone. Now, while installing the whole gphoto2 libraries again, I installed libusb-1 as well. And it seems to work better. What is the difference between these libraries? Just a different implementation of USB ?

Sony Alpha series:

1) Camera zoom: I was playing with --list-config commands for my sony Alpha 6000 and 7r. But I couldn't find any implementation for camera zoom. Am I missing something here? Has it been implemented already?

2) GPS data: Before every image capture, I want to give gps data to the camera so that it can add it to the jpeg file. Is it possible to do this?

Thank you for the help.

Cheers,
Anand.

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sony Alpha 6000 freezes after multiple image captures

Marcus Meissner
On Thu, Mar 16, 2017 at 09:46:04AM -0700, Anand1227 wrote:

> Hi Marcus,
>
> Thank you for the quick response. I think I solved the problem. While I was
> installing the latest version of libgphoto2, I did not remove the old one.
> Meaning, I had two instances of libgphoto2. So I completely removed
> everything relating to gphoto2 and made a new installation. And now it seems
> to work smoothly. Sorry for the trouble.
>
> However, I have few more questions.
>
> About installation:
>
> I have two options: "libusb" and "libusb-1" in USB-PORTS, when I run
> ./configure. In my pi, I dint have libusb-1 before, and it used libusb
> alone. Now, while installing the whole gphoto2 libraries again, I installed
> libusb-1 as well. And it seems to work better. What is the difference
> between these libraries? Just a different implementation of USB ?

libusb 1 is the current new version of libusb and has some features
we prefer to use, like asynchronous USB Interrupt reception. So libusb1
is recommended over libusb0.
 
> Sony Alpha series:
>
> 1) Camera zoom: I was playing with --list-config commands for my sony Alpha
> 6000 and 7r. But I couldn't find any implementation for camera zoom. Am I
> missing something here? Has it been implemented already?

Is the zoom motor driven?

We had this query before, but so far were not able to make out if that
is possible or not.

> 2) GPS data: Before every image capture, I want to give gps data to the
> camera so that it can add it to the jpeg file. Is it possible to do this?

None of the exposed property values seem to suggest the possibility,
While there always is the possibility of a yet unknown vendor method
to set it, it seems unlikely.

Ciao, Marcus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gphoto-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gphoto-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sony Alpha 6000 freezes after multiple image captures

Anand1227
Hi Marcus,

Thank you for the swift and detailed answer.

About camera zoom:
Yes, the zoom is motor driven.
If my understanding is correct, we are not using all the PTP properties that are exposed. From other posts on Sony alpha 6000, messages such as d2c1,d2c2, and d2c7 are used for trigger (half/full) and release of trigger. Can you tell me what d214  is used for?  That property has "range" as type and could that be the camera zoom?

Cheers,
Anand
Loading...