Problems using ptpcam on RPi with Theta SC via USB


In my test today, I’m running libusb-1.0.21

  1. I needed to install libudev-dev with

     sudo apt-get install libudev-dev
  2. compile and install libusb-1.0.21 from source

  3. compile and install libptp2-1.2.0 from source

  4. in my case after this, I needed to set LD_LIBRARY_PATH to include /usr/local/lib

  5. After that, I needed to run the ptpcam command as root

Is it possible that you compiled libptp and ptpcam against an old version of libusb?

I think you’re close to the finish line.


I needed to install libdev-dev with

sudo apt-get install libdev-dev

Errr… do you mean libusb-dev? If so, I’ve already got it installed. :slight_smile:

compile and install libusb-1.0.21 from source

Done, without problems.


compile and install libptp2-1.2.0 from source

During the “make” phase of this process, I got a few errors:

Assembler messages:
Fatal error: can't create .libs/ptp.o: Permission denied
Makefile:493: recipe for target 'ptp.lo' failed
make[2]: *** [ptp.lo] Error 1
make[2]: Leaving directory '/home/pi/libptp2-1.2.0/src'
Makefile:386: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/libptp2-1.2.0'
Makefile:317: recipe for target 'all' failed
make: *** [all] Error 2

(running sudo make seemed to work though)

in my case after this, I needed to set LD_LIBRARY_PATH to include /usr/local/lib

For the sake of being thorough with the documentation, to do this I ran:

$ sudo bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Then Ctrl+D to get back to the normal shell.

After that, I needed to run the ptpcam command as root

That’s odd. I can now run ptpcam -i without running as root and it WORKS!!! :smiley:

Is it possible that you compiled libptp and ptpcam against an old version of libusb?

Quite likely. I was following instructions from about a dozen different guides, each of which said to use a different version…!

FANTASTIC! IT’S WORKING!!! :slight_smile:

Thank you so much for all your help with getting this going for me. I truly appreciate it!


Wonderful news. Thanks for reporting back. I’m sure your experience will also help others.

Just so you know, I only needed to run ptpcam as root to download the images and video files from the camera. Everything else ran as the default user.

I’m working on guide with a fresh version of Raspbian.


I needed to install libudev-dev with

 sudo apt-get install libudev-dev

I needed this to configure libusb-1.0.21.

The previous post had a typo and said, “libdev-dev”. I just corrected the post.



I like the ALL CAPS announcement that it’s working. :slight_smile: What are you building? What made you want to use USB over wifi?



Hi Jesse,

I am building a camera network across Australia and New Zealand for monitoring the Aurora Australis for the Southern Hemisphere Aurora Group on Facebook.

You can see the current images (built using Raspberry Pi’s and RPi cameras) here, if you’re interested:

I’m now looking at switching to the Theta as it provides a 360-degree view (useful for monitoring cloud cover, which obviously blocks the view of aurora), and because it is capable of long-exposure photographs at high ISO (vital for imaging very weak aurora.

I need to use USB over WiFi because the Raspberry Pi’s cannot connect to both the local WiFi network (to upload the images to my server) and connect to the Theta simultaneously (even when you have two separate USB WiFi adapters). The RPi 3 and RPiZ Wireless do have Bluetooth, but the RPi BT module can only connect to certain devices (e.g. headphones); it cannot be used for connecting to generic BT devices such as COM ports or the Theta camera. So USB was the only way to go.

By the way, we had a very strong aurora here last night - managed to get some really fantastic images with the Theta V I’m prototyping with…



I was able to have the Raspberry Pi Zero W connect to a Theta S and at the same time act as an access point and host a Web server, File Server and SSH connection via a second WIFI module with the Litle Black Box project.

Little Black Box and Mini Little Black Box

Let me know if you have any questions that are not answered in the above thread.



Hi Bob,

The main issue is that it’s not possible to manually set the subnet for the Theta. My original cameras (RPi’s only, no Thetas) use WiFi networks and the RPi is taped onto windows inside people’s houses. I am essentially mooching off people’s own WiFi networks.

An option is to change the subnet on the WiFi router, so that it isn’t the same as the Theta’s subnet. That would then allows to simultaneous WiFi network connections. However, the logistics of changing WiFi router settings on someone’s router from a different country, when the hosts (most of the time) aren’t all that computer-literate, makes that nigh-on impossible.

Basically, the above (which was admittedly difficult) was actually easier than using WiFi only.

Plus the USB cable is - of course - faster than WiFi for file transfer…

How did you manage to connect your RPi to two WiFi networks simultaneously? Did you just change subnet values?

Thanks for the suggestion. I’ve also commented directly on your post about Theta V temperatures…

By the way, here’s an earlier discussion I had on the RPi forum about the dual WiFi network issue I faced that may give insight into my way of thinking…





I have the PiZero connect to the Theta at without connecting to the host network at all. I then set up an access point for the PiZero’s external WIFI module and use an IP that is not normally used in Home Networks.

So now we have a standalone system and the problem you would have to solve is a bridge from the host’s internet router to your stand-alone system. Perhaps a GL-Inet $20 router configured as a bridge.

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf # Theta connection goes in wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet static
address #Ip used for the Pi Zero access point connection



Ahhhh ok. That makes sense.

Thanks for clarifying.


Are you planning to pre-configure a set of microSD cards and ship them to your user base with ptpcam installed?

I don’t know how to make a Raspbian system image, but if someone did, it would be nice to put the entire image up on a repository with ptpcam, libptp, and libusb pre-installed and tested. That way, someone could just get the image, install it on a microSD card and then modify their program on top of it. It would be good to pre-install tlapser and Koen’s Photosphere project. The short-term solution to help people is to document the install process.

The other piece of the pre-configured microSD card would be to install some type of server to show all the beautiful images. There’s some really nice images in your group.


I don’t know how to make a Raspbian system image, but if someone did, it would be nice to put the entire image up on a repository with ptpcam, libptp, and libusb pre-installed and tested.

I was planning to do this, actually. It’s on the to-do list for further down the track, though, once it’s all been tested properly…

Is there somewhere in particular you’d want the disk image to be hosted?

The other piece of the pre-configured microSD card would be to install some type of server to show all the beautiful images.

Yeah… I’m not really all that familiar with setting up web servers, especially not on an RPi. But it certainly could be done…

By the way… I realise this is going off-topic from my original post, but… you guys are the only people responding to my support requests, anywhere on the Internet… :stuck_out_tongue:

I sent a Theta V to a friend further south than I am and he got a heap of photos with aurora in them the other night.
There is a screenshot I have taken from a timelapse he compiled, which shows the problem I’m now facing…

Screenshot here:

All images I (or my friend) have taken with the Theta V have this strange discolouration to them in one hemisphere (i.e. as if one lens is faulty). As you can see from the screenshot, there is a clear vertical line, with one half of the sphere having a red tinge to it (to the right of the screenshot). (The left half of the screenshot shows a dull aurora and some town lights).

Has anyone else experienced this issue? It may be a long-exposure issue - this image was taken at ISO 2000, 30 sec.

My own photos from last week with the same camera (similar exposure settings) had the same issue.

Admittedly, these images were taken using the Theta app, not via ptpcam, and so are using the Theta app white balance presets, rather than a manually-defined colour temperature (through ptpcam). So I’m hoping that may be the cause of the problem. I’m still waiting to get the camera back from my friend before I can do any testing of my own.

For what it’s worth, I didn’t have this problem when I was testing the Theta SC a few months ago. Perhaps I’ve got a bodgy Theta V and should send it back under warranty?


Is the aurora photo processed through something like photoshop? Or is that the original image taken from the THETA with no processing? Certain filters on Photoshop will cause this problem. If it’s the raw image, try to align the edge of the camera toward the largest bright spot when the shot is taken. It seems like either the image was processed with a filter or there is a problem with the camera.

Are you using the newest firmware? The firmware can be upgraded with the desktop application.

If you have a Raspbian image, we can put it on the theta360developers GitHub repo in addition to other places to make it easier for people to find.

I’ll look into the image problem a bit more.

Thanks for all your work on this. Super cool project and would love to see more beautiful pictures.

This was the update on the firmware. See note about still image joining accuracy.

Oct. 24, 2017 Version 1.10.1

  • The precision of video slant top/bottom correction has been improved.
  • Still image joining accuracy has been improved.
  • The quality of the still image is improved by modifying the compression ratio.
  • Corrected bugs and improved performance.

Info on updating the firmware is here.



Wow, that would be a fantastic contribution if you built a pre-tested image… well, pre-used… Pre-tried out… Whatever you want to call it, and made it available to everyone. We host quite a few repos on the Unofficial Guide GitHub account. We could easily host it there.

Seriously cool.



There was a discussion here about the stitch line

Postby CorLeone » 13 Apr 2017, 07:49

My guess is that this is not a flaw of the camera but caused by postprocessing the image.
For example, many processing options in Photoshop or Lightroom are not “360-aware” and may handle the left and right edges of the equirectangular image differently so that they don’t match when rendered in a 360° viewer. This will result in exactly the effect shown in your sample image. Every seam that has a hard change is not caused by the camera (or lightning) but postprocessing.
In general, all processing done to a single pixel will cause trouble that depends on the surrounding pixels. In this case, the image’s edge will cause a discontinuity (unless the algorithm takes into account that the image is in equirectangular projection with 360).
Unfortunately, many of the powerful and frequently used adjustments such as ‘Clarity’ in Lightroom or ‘Shadows/Highlights’ in Photoshop fall in this category. Even ‘Unsharp Masking’ may have noticeable impact.
The solution is to not use this kind of processing or at least do it limited and very carefully, checking the results under real viewing conditions with a 360° viewer.


Thanks for those thoughts. Unfortunately, these images are straight out of camera (not processed at all), and the Theta V is running the latest firmware…


Creating a backup image of a SD card with macOS


That seems like an unusually large difference between the lenses. There may be some problem with your camera.

See these community examples.

Title: ISS Flyover 3rd Submission
Attribution: Dave Michal
Location: Corktown Park, Hamilton, Ontario
Notes: Ricoh Theta S, nighttime (9:43pm local time), no flash, focal length 1.31mm, exposure time 1/4 sec, ISO 400, JPEG, 818.22 kb, 5376 x 2688

Title: ISS Flyover
Attribution: Dave Michal
Location: Hamilton, Ontario
Notes: Ricoh Theta S, early night, 25 second exposure

The main difference between your shot and the 2nd shot is that you are using ISO 2000, but I would expect the shot to be a lot closer to the 25 second exposure 2nd shot example. I suggest taking more tests and if the problem persists, try to make use of the warranty.

The only thing I can think of is that the high ISO is making the camera more sensitive to light from one side. Can you try a test where the illumination is more consistent in all directions? Or, put the skinny edge of the camera toward the brightest spot, which would cause the light to be equal across both lenses.


Hi, (replying to David Hunter’s q: from Nov 8 2017)

I’m using multiple Theta’s (upto 3) over Wifi on a single Raspberry Pi using extra usb wifi dongles. We’re controlling the Theta’s with the OSC API, and use power-only USB cables to keep the Theta’s charged.

As long as you have multiple physical wifi interfaces on the Pi you can run tunnels on the Pi to communicate with the individual camera’s even though each cam has the same ip. It’s a bit tricky, but definitely do’able.

If you had a home wifi AP router (internet path) on the same network, that may also work but I haven’t need to test this. The Pi’s default gateway would need to be that interface and the router IP would need to be anything besides or

Andrew (Alf) Leahy | Wonderama Lab | Western Sydney University


Thanks for this usage tip. Great info.


The individual cameras are not on your local network. They are all individual access points so in essence you have each of the Pi WIFI modules connect to a separate Camera Network Name.