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

Specifying --port only gets ignored #11

Open
SuperTaiyaki opened this issue Dec 10, 2017 · 5 comments
Open

Specifying --port only gets ignored #11

SuperTaiyaki opened this issue Dec 10, 2017 · 5 comments

Comments

@SuperTaiyaki
Copy link

I've been trying to get gphotofs working with a Sony RX100. Executing with --port=ptpip:192.168.100.127 fails with an error that no model was found. gphoto --port ptpip:.... works fine.

According to the documentation for gp_camera_init, both gp_camera_set_port_path and gp_camera_set_abilities must be called to avoid auto detection. The auto detection misses my camera because this port apparently can't be scanned. I've been able to get this to work by borrowing some code from gphoto2. In short, use the port list for gp_abilities_list_detect, use the model name that comes back for gp_abilities_list_lookup, then pass it to gp_camera_set_abilities.

I have this working, but the code needs to be cleaned up quite a bit. I'll just leave this comment here for now.

@copypasteho
Copy link

Nice find! Would you mind sharing the fix for this?

@msmeissn
Copy link
Contributor

msmeissn commented Mar 3, 2019

There is currently not auito-detection for ptpip ports, you need to specify the camera.
but a small hack that selects PTP/IP class default camrea might work

@SuperTaiyaki
Copy link
Author

@TheNameIsDavid Sorry, I don't remember the specifics and reading my own comment isn't making it any clearer. I do remember that using the code in my pull request it's get the RX100M2 and RX100M5 to mount using only the IP address.

@copypasteho
Copy link

Thanks for the responses!

Unfortunately, I encountered the same issue whereby gphoto2 works perfectly, but gphotofs, unfortunately does not. If I can figure out a way to mount the camera wirelessly by way of using Finder that would open a host of options to other software developers who want to communicate with the camera's data or bridge existing software packages with the file system and previously created files without having to rely on third party options. But hey, I'm not exactly a TCP wiz, so maybe I'm the odd man out at this point.

In order to rule out this being a Fuse related error, I tested this on both Mac and a Linux VM and Gphotofs fails to mount the file system (for Canon) using the PTPIP specification. I'm inclined to think maybe I'm feeding the incorrect parameters into the command(?).

I also attempted to install and configure Mac Fuse using both Homebrew and the native installer in order to further rule out any problems and explore other avenues. No progress.

Anyway, here's what I did:

Assuming the camera is configured with an ip address of 192.168.2.1, these are my commands:
gphoto2 -port ptpip:192.168.1.2 --somecommand

Gphotofs ():
mkdir ~/randomFolderName
gphotofs --port=ptpip:192.168.1.2 ~/randomFolderName

gphotofs is interfacing with Fuse, as the folder gets mounted, but looking at WireShark no attempts were made to interface with the (wireless) ptpip connection with the camera.

Perhaps the most important question that I need to ask is this:
what's the correct procedure for connecting a camera wirelessly via gphotofs (and what are the most common mistakes people make while attempting to pull off this wizardry?).

Cheers!

@SuperTaiyaki
Copy link
Author

@TheNameIsDavid I execute gphotofs the same way and it works (at least, my branch does). Does it work if you specify the model?

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

3 participants