Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always connected capture anytime #167

Open
musaulker opened this issue Nov 17, 2023 · 1 comment
Open

Always connected capture anytime #167

musaulker opened this issue Nov 17, 2023 · 1 comment

Comments

@musaulker
Copy link

Hello,

I am trying to capture photo from time to time while the camera is connected to the computer.
Photo capture works with library on initial try. But after some moment passes, maybe the camera is going sleep or usb connection is closed, for some reason i cannot take a picture any more without closing and opening the camera.

Is it possible to have a live connection with camera so i can took picture anytime and save on the computer?

I checked wait-for-event.py file which maybe a starting point but its not clear to trigger photo capture from python while connection is active.

Any advice?

Thanks

@jim-easterbrook
Copy link
Owner

jim-easterbrook commented Nov 18, 2023

If the camera turns itself off then there isn't much you can do. Otherwise you could try resetting the port as described in bug #162.

        info = camera.get_port_info()
        port = gphoto2.GPPort()
        port.set_info(info)
        port.open()
        port.reset()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants