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

PTP/IP connection not initialized fully #1

Open
FiremanB opened this issue Nov 5, 2024 · 5 comments
Open

PTP/IP connection not initialized fully #1

FiremanB opened this issue Nov 5, 2024 · 5 comments

Comments

@FiremanB
Copy link

FiremanB commented Nov 5, 2024

Hi Radu,

I came across your Macro Rail project code on github in the last days.
My linear rail is already finished and can be moved from another project.
What was missing so far, is the code to do PTP/IP which is in your project 🙂

I am using a Nikon D750 with an AF Micro 105mm 2.8D currently and want to start focus stacking.

What I came across in the code is that I can:

  • connect the ESP32 to my WiFi
  • connect to the camera Wifi
  • exchange information with the camera
  • then the communication with the camera gets stuck, "Init event socket failed..." --> see screenshot
    2024-11-05 08_58_00-macro_slider cpp - esp32_macro_rail - Visual Studio Code
  • it then reconnects my normal WiFi

Any ideas would be wonderful ;-)

Best Ben

@raduprv
Copy link
Owner

raduprv commented Nov 5, 2024

Hi
I don't have that camera, so I can't test and see what the problem is. Unfortunately, the PTP/IP is very non standardized, and each camera does it differently. I was able to test the code on Nikon with a P&S camera and it worked, but I have no 'serious' Nikon camera.
The good news is that you can also try the IR trigger, it only takes soldering an IR LED and resistor on a free pin, and set the pin up in the code.

@FiremanB
Copy link
Author

FiremanB commented Nov 5, 2024

wow, you are fast in answering ;-)
That what I also thought after checking the Nikon D750 API Guide about PTP/IP...

Thanks for the tipp for using IR. I would rather use IR but would want to use the direct cable-based solution. I can switch the camera to focus/take a photo with a cable I built. What is missing and what I do not understand is: where to put it in your code ;-)

This is by way the best solution I found on the net, a little more promo would be sooooo cool

@raduprv
Copy link
Owner

raduprv commented Nov 5, 2024

Can you give me more info about your cable solution? is it USB (PTP over USB), or just like a remote shutter cable? If it's a remote shutter cable, give me a link to your code and I'll take a look at it.

@FiremanB
Copy link
Author

FiremanB commented Nov 5, 2024

Its a remote shutter cable. I did not start with the code. The camera is protected with optical isolators at the inputs, so any 5V signal of a pulled-down pin works.
Where would be the best place to put it in the code?

@raduprv
Copy link
Owner

raduprv commented Nov 5, 2024

You can try to put your code in nikon_ir_take_photo(); Comment the old function, and put your code there. This is just to test the camera. After it's working, you can make your own function, like nikon_cable() and change a few things in the code to call it (just search for nikon_ir_take_photo to see where to modify.

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