The Virtual Studio images for Raspberry Pi are a custom, minimal build of Raspbian (Debian, optimized for Raspberry Pi devices), created using the pi-gen toolset. They leverage systemd to manage the jack, jacktrip and Jamulus processes. All configuration and services are managed using a jacktrip-agent that communicates with JackTrip's web services for management.
The image is designed to be managed remotely, using your web browser and the web application at https://app.jacktrip.org. Under normal circumstances, there is no need to ever log into a terminal. But if you are familiar with Linux and would like to log in for troubleshooting, you are able to by either connecting a keyboard and monitor or using SSH: "ssh firstname.lastname@example.org". The default username is "pi" and the default password is "jacktrip".
The disk volumes are normally mounted read-only to maximize the lifespan of the MicroSD card and minimize the risk of filesystem corruption when power is removed. When performing maintenance, you can use the aliases "rw" and "ro" to remount volumes as read-write or read-only.
Everything is managed using systemd services, with unit files located in /etc/systemd/system/. The notable services include (in order of execution):
- dhcpcd - this is the standard Debian service that uses DHCP to obtain a valid IP address for eth0
- network-online & ifupdown-wait-online - this uses config from /etc/default/networking, which is set to wait for a default route to become available (via DHCP)
- jacktrip-patches - this runs /usr/local/bin/jacktrip-patches.sh to check for and apply any image updates that are available
- jacktrip-init - this runs /usr/local/bin/jacktrip-init.sh to detect and configure your sound card. It will also generate random API credentials if they have not been created yet.
- jacktrip-clock - this waits for the NTP service to be available and saves the time
- jacktrip-agent - this runs /usr/local/bin/jacktrip-agent
To check the status of a service, run:
sudo systemctl status <service>
The see logs for a service, run:
sudo journalctl -u <service>
(It's usually helpful to pipe the output of "journalctl" to "tail", or just append the -f parameter for "tail -f" like behavior)
The jacktrip-patches service keeps track of the current patch level using the configuration file /etc/jacktrip/patch.
The jacktrip-init service manages these additional configuration files, also located in /etc/jacktrip/:
- credentials - randomly generated API credentials used by jacktrip-agent to communicate with JackTrip web services at https://app.jacktrip.org
- devicename - ALSA name for detected sound device
- devicetype - ALSA type for detected sound device
The jacktrip-agent process is the final thing to start, and it has several responsibilities:
- A simple HTTP server listens on port 80 and redirects all requests to https://app.jacktrip.org/... Its randomly generated API credentials and MAC address are included in the redirect Location. This is used in combination with multicast DNS so that https://jacktrip.local redirects your browser to an endpoint in the web application that enables you to register it with your account (or update an existing registration).
- Every 5 seconds, it uses the API credentials to request configuration data from web services at https://app.jacktrip.org.
- If volume level changes are detected, it uses amixer to change the sound card's settings.
- If other configuration changes are detected, it updates config files for other services that it manages (located in /tmp/default), and starts and or stops any of these services as appropriate.
The services currently managed by jacktrip-agent include:
- jack - the open source Jack audio toolkit
- jacktrip - the open source JackTrip audio engine
- jamulus - the open source Jamulus audio engine