How To Set Up a Linux Environment in the THETA to Control the Camera With Bash, Ruby, Python

Here’s my experience from Linux to the THETA.

THETA is plugged into my computer with a USB cable.

check to make sure THETA is online and visible to workstation

using adb devices -l

Download termux

https://f-droid.org/packages/com.termux/

Using version 0.84 released on Nov 25, 2019. New and fresh. :hot_pepper:

image

install termux

image

Verify with Vysor

image

Enable Keyboard

image

image

Start Termux

Click on icon on home screen.

Enable Wi-Fi when connected with USB

$ adb shell settings put global usb_debug true

image

Set up Wi-Fi with Client Mode if not already Setup

image

Test Internet Connection

ping a domain such as theta360.guide

Test apt and install a text editor

image

install nano with apt

image

set linenumbers in nano with nano ~/.nanorc

image

image

Set Storage Permission

image

image

image

Setup Termux Storage

image

Check Storage Setup

image

Install OpenSSH

image

Copy public ssh key from workstation to camera

image

Add ssh public key

image

Add sshd to .bashrc

image

image

Login from Linux

Make sure you use port 8022

image

Finding IP address

I’m using a simple Zeroconf discovery script to find the IP address.

Setting Client Mode IP Address

You can also set the client mode IP address using this article. In my case, I’ve set the client mode IP address of the THETA to 192.168.2.123 to make it easier to remember and find.

Troubleshooting

If you run into problems, start sshd in debug mode on a free port

sshd -d -p 2222

From your client, login with:

sshd -d -p 2222

image

image

Stopping Termux

am broadcast -a com.theta360.plugin.ACTION_FINISH_PLUGIN --es packageName com.termux

Next Article

Control Camera LEDs and Functions