Octolapse Version: 0.3.4
OctoPrint Version: 1.3.12
I should have been able to capture image with Nikon D3100 using "gphoto2 --capture-image" and procede with the tutorial.
I've got an error message:
* Error *
PTP Operation Not Supported
* Error *
PTP General Error
ERROR: Could not capture image.
ERROR: Could not capture.
OS Name: OctoPi
Os Version: 0.17.0
Printer Model: Prusa i3 MK3s
Printer Firmware Version: 3.8.1
Hello,
I can not capture image with Nikon D3100. I get this error:
gphoto2 --capture-image
* Error *
PTP Operation Not Supported
* Error *
PTP General Error
ERROR: Could not capture image.
ERROR: Could not capture.
Using octoprint with raspberry pi4.
Done everything by FormerLurker tutorial.
Output of gphoto2 --capture-image --stdout --debug is at https://pastebin.com/qpg0W965
Can't find a solution to the problem. Maybe someone could help me out? Or there is no chance getting D3100 working with gphoto2?
Hmm. I looked in the remote controllable camera section at the gphoto2 website, and this camera is listed. I saw that you posted on the gphoto2 github, which was a good idea, as I'm not an expert, especially with specific makes/models of camera.
Did you try the --capture-image-and-download or --trigger-capture flags and see if those work? I'm not sure how much I can help since I don't have a camera like yours to test :(
Yes, I've tried those with no success.
So, can you try running the following command from a terminal:
gphoto2 -v
That should list the version of ghpoto2 and libgphoto2. Perhaps there is a more recent version available? I have modified an existing update script that can update gphoto2 to the latest build or latest dev build on a pi. Here is a link to that script, along with attribution
I have updated to latest already
This version of gphoto2 is using the following software versions and options:
gphoto2 2.5.23 gcc, popt(m), exif, no cdk, no aa, jpeg, no readline
libgphoto2 2.5.22 all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking
After some fiddling around I think I figured it out one step closer.
The thing is with DSLR's (I'm totally new to using DSLR cameras) that sometimes it doesn't focus (if object is too dark, autofocus can not get the object in focus with that kind of lens or any other problem that I don't know), when you get it to focus and take picture normally (without connecting it to USB), then it works with SSH commands. So I got my D3100 to take picutures and save them but it still gives error and after that it makes photos and saves them. Because of that error, octolapse doesn't count those photos as "taken snapshots" and shows errors without any explanation.
gphoto2 --capture-image
*** Error ***
PTP Operation Not Supported
New file is in location /store_00010001/DCIM/220D3100/DSC_0008.JPG on the camera
gphoto2 --capture-image-and-download
*** Error ***
PTP Operation Not Supported
New file is in location /store_00010001/DCIM/220D3100/DSC_0007.JPG on the camera
Saving file as DSC_0007.JPG
Deleting file /store_00010001/DCIM/220D3100/DSC_0007.JPG on the camera
It still shows PTP operation not supported.
With Nikon D7000 no problems at all. Both of these cameras after auto detect are shown as (PTP mode), but D3100 gives PTP error and D7000 does not.
Sorry it's been so long since I last replied. Have you made any progress here? If not, you may want to add this to your gphoto2 arguments: --auto-detect
I had another person with another camera where that command was necessary. Might be worth a shot?
It's been over a month, so I'm going to assume that you have this figured out. If you want me to re-open the issue, please let me know and I'll be happy to do so.
Thanks for posting!
Hello,
Sorry that I forgot to reply. Last timelapses that I've done was with D7000. D3100 with gphoto2 is not solved yet. I haven't spent more time on this.
Maybe someone will have the same problem and will be able to do more research on this.
cheers
I've also been having this issue w/ the D3100. My last attempts didn't include tacking on --auto-detect, which I'll try out in the hopefully near future; likely this weekend.
Ok, will reopen soon. Thank you both for responding!!!
Since my usual octolapse setup (and octopi) are currently busy, I installed gphoto2 on my MacBook Pro (version 2.5.23, via homebrew). Connecting the same camera I was able to observe success adding the --auto-detect flag to the --capture-image command; the image successfully saves to the camera, and it no longer throws the:
* Error *
PTP General Error
ERROR: Could not capture image.
ERROR: Could not capture.
Using --auto-detect did nothing for me. However, I believe I found a workaround as noted here:
https://github.com/gphoto/libgphoto2/issues/140#issuecomment-612299629
This does however, require building and installing from source.
You could try this modified upgrade script I adapted for Octopi to update gphoto2. It also handles dev installs. The gist i linked to includes the original authors notes.
Hey, I see that there have been changes to gphoto2 for this. I'm going to assume this is closed, but let me know if you want the ticket reopened, and if the changes to gphoto2 helped!
Most helpful comment
Ok, will reopen soon. Thank you both for responding!!!