Ptpcam command with all options return the same error

Hello,

I want to use ptpcam so that I can switch between still image and live streaming modes. However, when I try to run the ptpcam command using any option in the terminal, I receive the same error:

could not find any device matching given bus/dev numbers

So, I can’t get the info on the camera, capture images, switch modes and so on and so forth.
Any help would be greatly appreciated!

1 Like

gphoto2 also works.

paste the output of lsusb here

Try this version of libptp2

I have some notes for the nickel110 version of libptp2

libptp2-theta/README.md at master · codetricity/libptp2-theta · GitHub

additional documentation on the USB API and tools on Linux.

Even more information here:

RICOH THETA API Over USB Cable - (Z1, V, S, SC models)

The output of lsusb is:

Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 7392:b811 Edimax Technology Co., Ltd
Bus 001 Device 003: ID 05ca:2715 Ricoh Co., Ltd
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I also tried to install your version of libptp2-theta and there were no errors in installing the project, however when I try theta --info, this is the output:


THETA Device Info
==================
could not find any device matching given bus/dev numbers

I do not have a good solution right now.

Can you post the THETA model, firmware version, Jetson model and Jetpack version again so it’s easy to get the info in one place on this forum? I think you’re using a Jetson Nano?

still image mode

image

streaming mode

There is an extensive discussion on the USB API here.

I’m using a Jetson in several of the tests.

RICOH THETA API Over USB Cable - (X, Z1, SC2, V, S, SC models)

Do you have gphoto2 installed? I remember having some problems with the gvfs-gphoto2-volume-monitor You can try uninstalling gvfs-backends

This is an extract from the output of gphoto2 --summary:

Camera summary:
Manufacturer: Ricoh Company, Ltd.
Model: RICOH THETA Z1
Version: 2.00.1

I have the Jetson Nano 4GB version and the Jetpack version is 4.6.1 [L4T 32.7.1]

I have the same Jetson Nano model, but I am running an older version of Jetpack (4.4). I just bought another microSD card and I’m going to install Jetpack 4.6. I’ll hopefully do this in the next few days.

Alright sounds good.
Thank you!

how about upgrading firmware?
my z1 output:

$ gphoto2 --summary | head -n 4
Camera summary:
Manufacturer: Ricoh Company, Ltd.
Model: RICOH THETA Z1
Version: 2.10.3
1 Like

I updated the firmware to 2.10.3 but I still have the same issue.

Do you have the USB cable connected directly from the camera to the Jetson Nano or is it going into a hub?

Can you replace the USB cable with another one you have lying around the office?

Power down the Z1 by pressing and holding down the power button for 8 seconds. Boot up the camera again and see if it helps.

If you plug a Android phone into the same Jetson with the same cable, then select MTP on the Android phone screen, does the Jetson detect the Android phone?

The USB cable is connected directly from the camera to the Jetson Nano.

I did try with another cable; didn’t work.

Didn’t work.

Tried it and yes, the Jetson Nano detected the Android device.

Did you have the chance to try it out on Jetpack 4.6?

BTW and FYI,
there was a similar error message on my dev box (gphoto2 on docker).

An error occurred in the io-library ('Could not find the requested device on the USB port'): The supplied vendor or product id (0x0,0x0) is not valid.

the root cause was z1 mounted on the host. unmounting z1 solved the problem.

1 Like

Thanks for this information.

I used the gio mount -l command to show all the mountable drives (as this askUbuntu answer shows), but the Ricoh Theta Z1 wasn’t in the output; the output was:

Drive(0): SD64G
  Type: GProxyDrive (GProxyVolumeMonitorUDisks2)
Volume(0): L4T-README
  Type: GProxyVolume (GProxyVolumeMonitorUDisks2)

So, I guess the camera is not mounted and that is not the issue.

Hey @craig, did you have a chance to try it out on a Jetson Nano with Jetpack 4.6.1?

attempting install from this now:

verifying JetPack 4.6-b199 installed version

$ cat /etc/nv_tegra_release 
# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64, DATE: Mon Jul 26 19:20:30 UTC 2021
sudo apt-cache show nvidia-jetpack
[sudo] password for craig: 
Package: nvidia-jetpack
Version: 4.6-b199
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-cuda (= 4.6-b199), nvidia-opencv (= 4.6-b199), nvidia-cudnn8 (= 4.6-b199), nvidia-tensorrt (= 4.6-b199), nvidia-visionworks (= 4.6-b199), nvidia-container (= 4.6-b199), nvidia-vpi (= 4.6-b199), nvidia-l4t-jetson-multimedia-api (>> 32.6-0), nvidia-l4t-jetson-multimedia-api (<< 32.7-0)

Building libptp2-1.2.0 from source

and

sudo apt install libusb-dev

There seems to be a bunch of extra stuff installed with JetPack. I’m going to uninstall some stuff first.

image

sudo ldconfig

Test with JetPack 4.6

info

craig@jetpack-4:~$ ptpcam --info

Camera information
==================
Model: RICOH THETA Z1
  manufacturer: Ricoh Company, Ltd.
  serial number: '10010104'
  device version: 2.10.3
  extension ID: 0x00000006
  extension description: (null)
  extension version: 0x006e

Capture

ptpcam --capture

Initiating captue...
Object added 0x00000032
Capture completed successfully!
craig@jetpack-4:~$ 

list files

ptpcam --list-files

Listing files...
Camera: RICOH THETA Z1
Handler:           Size: 	Captured:      	name:
0x0000000f:      8351206	2019-01-01 08:01	R0010002.JPG
0x00000010:      8385106	2022-06-08 17:28	R0010003.JPG
0x00000011:      8170775	2022-06-08 17:29	R0010004.JPG
0x00000012:      7704372	2022-06-09 21:12	R0010005.JPG
0x00000014:      7887478	2022-06-10 00:07	R0010006.JPG
0x00000015:      8346038	2022-06-10 00:07	R0010007.JPG
0x00000016:      8215973	2022-06-10 00:08	R0010008.JPG
0x0000001b:      7772692	2022-06-14 23:40	R0010012.JPG
0x0000002b:      8688095	2022-06-28 19:01	R0010024.JPG
0x0000002c:     14653524	2022-06-28 19:02	R0010025.MP4
0x0000002d:      8698034	2022-06-28 19:18	R0010026.JPG
0x0000002e:      8719042	2022-06-28 19:21	R0010027.JPG
0x00000030:      8657438	2022-06-28 21:03	R0010028.JPG
0x00000031:     57484935	2022-06-28 21:04	R0010029.MP4
0x00000032:      7709710	2022-07-06 00:48	R0010030.JPG

GPS info

ptpcam --show-property=0xd801

Camera: RICOH THETA Z1
'UNKNOWN' is set to: "(null)"
craig@jetpack-4:~$ 

ptpcam --set-property=0xD801 --val="23.532000,23.532000+999.00m@20210904T170429.0+0900,WGS84"

Camera: RICOH THETA Z1
'UNKNOWN' is set to: "(null)"
Changing property value to 23.532000,23.532000+999.00m@20210904T170429.0+0900,WGS84 [(null)] succeeded.

ptpcam --show-property=0xd801

Camera: RICOH THETA Z1
'UNKNOWN' is set to: "23.532000,23.532000+999.00m@20210904T080429,WGS84"

wake from sleep

ptpcam --set-property=0xD80E --val=0x00

Camera: RICOH THETA Z1
'UNKNOWN' is set to: 1
Changing property value to 0x00 [(null)] succeeded.

and verified that the camera work from sleep

live action shot

summary

  • Jetpack 4.6 works without any problems with ptpcam, same as Jetpack 4.4
  • compiled libptp2 from source and modified ptp.h to make a longer packet length of 28
    • NOTE: there were problems with the higher speed USB-C with the original smaller packet length
  • I’m not sure if it necessary, but I purged docker, nvidia-docker, openoffice, and several other unused apps
  • I do not have gphoto2 installed. There may be problems if the gvfs is mounting the camera

Possible things to check:

  • is a background processing mounting your camera as a storage device unintentionally? If so, unmount the camera. It should not be visible as a storage device

some type of daemon is running that is mounting the camera.

image

If you don’t have a monitor attached the Jetson, maybe you don’t see this.


I was reviewing older posts about lack of access to the USB API and found another reference to the USB API commands failing when the camera automounts

Using USB API (MTP) with libghoto2 and Python bindings on MacOS, Raspberry Pi, Linux, ROS - #34 by craig

Although the test was not on a Jetson, I think it is likely that something on Jetpack 4.6 is mounting the camera and making it unresponsive. Try attaching a monitor to your Jetson for the test and make sure it is not mounted.