No project description provided
Project description
Remote RF Server Guide (Linux)
Environment and setup
This guide installs Miniconda, installs mamba, creates a conda env named remoterf, installs dependencies, and verifies the install on Ubuntu Server 24.04 LTS.
- This guide is done APT-based distro (Ubuntu/Debian/Raspberry Pi OS 64-bit).
1) System Prerequisites
sudo apt update
sudo apt install -y curl ca-certificates bzip2 git build-essential
sudo apt install -y libusb-1.0-0 udev
Optional: confirm architecture:
uname -m
x86_64→ Intel/AMDaarch64→ ARM64 (Raspberry Pi 64-bit, some servers)
2) Install Miniconda
2.1 Download the installer
x86_64
cd /tmp
curl -fsSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
ARM64 (aarch64)
cd /tmp
curl -fsSLO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
2.2 Install (non-interactive, recommended)
x86_64
bash Miniconda3-latest-Linux-x86_64.sh -b -p "$HOME/miniconda3"
ARM64 (aarch64)
bash Miniconda3-latest-Linux-aarch64.sh -b -p "$HOME/miniconda3"
2.3 Enable conda in your current shell
source "$HOME/miniconda3/etc/profile.d/conda.sh"
conda --version
If you want conda available automatically in new terminals:
"$HOME/miniconda3/bin/conda" init bash source ~/.bashrc
2.4 Install mamba (default solver)
conda install -n base -c conda-forge -y mamba
mamba --version
Might have to accept anaconda TOS.
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
3) Create the Environment
mamba create -n remoterf -y -c conda-forge -c defaults python=3.10 pip setuptools wheel grpcio protobuf python-dotenv numpy scipy libiio pylibiio libusb
conda activate remoterf
python -m pip install -U pip
python -m pip install pyadi-iio remoterf-server
Server Config
Depending on your IT/ISP setup, this will vary, but regardless, you will need a static dial name, whether that be a IP address or a DNS.
Generate CA Certificates
If direct IP connection: (force overrides existing)
serverrf --gen-certs 192.168.1.50 --days 3650 --force
If using DNS: (todo: DNS on client side)
serverrf --gen-certs 192.168.1.50 --dns remoterf.local --days 3650 --force
Confirm/View:
serverrf --show-certs
Specify Outward facing Ports
By default, the users expect to adjacent ports. Thus, it is recommended to do the following:
# examples
serverrf --config --main-port 61000 --cert-port 61001
serverrf --config --main-port 20000 --cert-port 20001
serverrf --config --main-port 32000 --cert-port 32001
Confirm/View:
serverrf --config --show
Testing Connection
The server now should be functional in its most basic form. In the same conda env:
serverrf --serve
If you see something along the lines of: self.socket.bind(self.server_address) PermissionError: [Errno 13] Permission Denied, make sure the ports you are using are not OS reserved (<1024)
Confirm it works locally
Start the server:
serverrf -s
Take note of the Local IP and Local Port, for example, if you see:
Local IP: 164.67.195.210
Local Port: 61000
then run the below on a seperate terminal (make sure to keep serverrf -s RUNNING!)
Confirm that its reachable:
nc -vz 164.67.195.210 61000
nc -vz 164.67.195.210 61001
Network Testing
Same test, but on a different computer. Works for UNIX based machines:
Confirm that the Server is reachable:
nc -vz 164.67.195.210 61000
nc -vz 164.67.195.210 61001
You most likely will need to port forward, etc.
Troubleshooting: Some distros come with default firewall settings that block traffic on specific ports. Make sure that your firewall settings permit traffic to and from the server. Depending on the setup, you may also have ISP firewalls.
Server Device Configuration
Currently, only Adalm Plutos are supported.
To connect plutos to the server:
iio_info -s
If the pluto doesn't show up, yet the below works:
sudo iio_info -s
Run the below and reboot after:
sudo groupadd -f plugdev
sudo usermod -aG plugdev "$USER"
sudo tee /etc/udev/rules.d/53-adi-usb.rules >/dev/null <<'EOF'
# Type the below in
SUBSYSTEM=="usb", ATTR{idVendor}=="0456", MODE="0660", GROUP="plugdev"
EOF
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo reboot now
The below should work as intended now:
iio_info -s
Look for 'serial='. Take note of this serial.
serverrf --device --add --pluto <device_id:name:serial>
# example
serverrf --device --add --pluto 0:pluto_0:104473f6
serverrf --device --add --pluto "1:Pluto SDR (OTA):58472j"
Run the below to check if this new device exists:
serverrf --device --show
Run the below to edit names of existing devices:
serverrf -d --edit-name 0 "New Name"
Note that all device and server config parameters need a 'restart' to take affect (ctrl + c -> serverrf -s).
Server Runtime Configuration
After running serverrf --serve, you’ll enter the RemoteRF Server Shell. This interactive shell is used for runtime administration: managing users, devices, reservations, user groups, and enrollment codes.
Server
help/h— Show helpclear— Clear the screenstatus— Show server status (uptime / bind info)quit/exit— Exit the server shell
Users
users list— List all accountsusers manage— Manage a specific userusers purge— Delete all users
Devices
devices list— List all devices
Reservations
reservations list— List all reservationsreservations purge— Delete all reservations
Groups
groups list— List user groupsgroups create— Create a user group (interactive)groups edit— Edit a user group (interactive)groups delete— Delete a user group (interactive)groups csv- Export all groups as a CSV
Enrollment Codes
codes list— List enrollment codescodes create— Create enrollment codes (interactive)codes delete— Delete an enrollment code (interactive)codes csv- Export all codes as a CSV
Database
db purge— Remove all database entries
todo:
HostRF meta data -> push upon connection + retry connection on host side.
ServerRF display meta data as part of devices list / reservation + online/activity status (appended into device name) + (plus host side warning if the device id is NOT globally unique!)
set_device token (virtual devices) + routing/relay to proper host (multiplexed)
User side testing + integration
hostrf side CLI/server (basically just device list)
edge case testing (disconnected hosts, disconnected server, many users using multiple devices, multi-host)
Cleanup code comments.
Update Ian with installation demo (try myself first on the NUC once!) for both server and host.
Nice to have (later): Activity/stats? Ability to remotely manage groups and codes as admin. Choice to choose usergroup/code by either int id or string name. (too lazy)
todo: Specify/Pull user side --config CLI pointing to this server + debug for connection sake (later)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file remoterf_server-0.1.68.tar.gz.
File metadata
- Download URL: remoterf_server-0.1.68.tar.gz
- Upload date:
- Size: 75.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac50da0b6203333476f33dd4e5de5d02f4fc07eb7aa8d07d5305c103cbd0607
|
|
| MD5 |
a22e14df2ea52f1ed3ae60b751d858ca
|
|
| BLAKE2b-256 |
7f2e5e47901d6ba72179dbe5d37a915dfebbb4ca34578ea7ed2c07e27935ef74
|
File details
Details for the file remoterf_server-0.1.68-py3-none-any.whl.
File metadata
- Download URL: remoterf_server-0.1.68-py3-none-any.whl
- Upload date:
- Size: 80.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57ccff35557e6b15a24f3f33c622856db393fda35f44aa52d5474dc8582fcf83
|
|
| MD5 |
e87b87cc065edfb367d2b91500358ed2
|
|
| BLAKE2b-256 |
3e01c48560e81bc75b5fb7fde0b115f53a73f2dd3195b8c0f95fc90797a3d6ee
|