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

Virtual GPhoto device driver for testing client applications #408

Closed
yecril71pl opened this issue Apr 22, 2019 · 9 comments
Closed

Virtual GPhoto device driver for testing client applications #408

yecril71pl opened this issue Apr 22, 2019 · 9 comments
Assignees

Comments

@yecril71pl
Copy link

Fill in fields below. If you don't know how, leave it free.

*Name of the camera
Virtual GPhoto

USB IDs
TBD

camera summary output
TBD

camera configuration output
TBD

test capture
A predefined image

@msmeissn msmeissn self-assigned this Apr 23, 2019
@msmeissn
Copy link
Contributor

libgphoto2 has a virtual PTP camera, configure with --enable-vusb and no other libusb libraries.
a bit tricky to handle, but should work.

@yecril71pl
Copy link
Author

I cannot find it documented. Not in INSTALL and not in configure help.

@tkircher
Copy link

I'll add the documentation here since it doesn't seem to exist anywhere else.

In order for the virtual camera device to work, like @msmeissn suggested above, you must enable vusb and explicitly disable all other usb libraries:

./configure --enable-vusb --without-libusb --with-libusb-1.0=no

It is also important to make sure you don't have any other versions of the library installed. So, on a clean system without libgphoto2 or gphoto2 installed, build libgphoto2, then install it, and build gphoto2 and install it. The device doesn't come up as vusb:, rather

$ gphoto2 --list-ports
...
usb:001,001                      Universal Serial Bus
$ gphoto2 --auto-detect
Model                          Port                                            
----------------------------------------------------------
Nikon DSC D750                 usb:001,001     
$ gphoto2 -a
Abilities for camera             : Nikon DSC D750                              
Serial port support              : no
USB support                      : yes
Capture choices                  :
                                 : Image
                                 : Preview
                                 : Trigger Capture
Configuration support            : yes
Delete selected files on camera  : yes
Delete all files on camera       : no
File preview (thumbnail) support : yes
File upload support              : no

@pmnlla
Copy link

pmnlla commented Mar 24, 2023

This is done with the configuration script at build time, right?

I have an issue where libgphoto2 compiles successfully, yet the gphoto2 cli does not detect any Nikon DSC camera.
I'm guessing that it is using the wrong libgphoto2 and will try to swap it out for the one I just compiled.

Update: I was correct. If you're on Ubuntu or KDE Neon and don't want to recompile gphoto2, simply move the libraries from /usr/local/lib to /lib/x86_64-linux-gnu if you are experiencing an issue where your virtual camera does not show up after you ran sudo make install in the libgphoto2 source dir..

@yecril71pl
Copy link
Author

I have reconfigured the library and it did not work 😞

[ 52s] + gphoto2 -a
[ 52s] Could not detect any camera

@tkircher
Copy link

I have reconfigured the library and it did not work 😞

[ 52s] + gphoto2 -a
[ 52s] Could not detect any camera

Looks like you installed libgphoto2 from some package source, rather than building it:

[ 42s] libgphoto2_port12-2.5.30-250.1 ########################################

@yecril71pl
Copy link
Author

Looks like you installed libgphoto2 from some package source, rather than building it:

[ 42s] libgphoto2_port12-2.5.30-250.1 ########################################

I have packaged it myself.

@msmeissn
Copy link
Contributor

i sent you a fix, osc rq accept -m ok 1082175

(basically FUZZ_PTP was undefined, so no camera was reported ... #define FUZZ_PTP makes it report the D750 id)

1 similar comment
@msmeissn
Copy link
Contributor

i sent you a fix, osc rq accept -m ok 1082175

(basically FUZZ_PTP was undefined, so no camera was reported ... #define FUZZ_PTP makes it report the D750 id)

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

4 participants