### Install Node.js from NodeSource Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs the latest Node.js version (24.x) from the NodeSource repository, a prerequisite for Rpanion-server. ```bash curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash sudo apt-get install -y nodejs ``` -------------------------------- ### Install Zerotier and Wireguard VPNs Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs Zerotier and Wireguard VPN clients, which are optional but recommended for enhanced network connectivity with Rpanion-server. ```bash curl -s https://install.zerotier.com | sudo bash sudo apt install wireguard wireguard-tools ``` -------------------------------- ### Install NVIDIA Jetson GStreamer Packages Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs hardware-accelerated GStreamer packages for Rpanion-server on NVIDIA Jetson Orin platforms. ```bash sudo apt install -y nvidia-l4t-gstreamer ``` -------------------------------- ### Manage PPP Connections Source: https://context7.com/stephendade/rpanion-server/llms.txt Configure and start serial-based PPP networking. ```bash curl -X GET http://localhost:3001/api/pppconfig \ -H "Authorization: Bearer " ``` ```bash curl -X POST http://localhost:3001/api/pppmodify \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "device": "/dev/ttyUSB0", "baudrate": 115200, "localIP": "10.0.0.1", "remoteIP": "10.0.0.2", "enabled": true }' ``` -------------------------------- ### Install GStreamer and Related Packages Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs necessary GStreamer plugins and libraries for Rpanion-server functionality, including RTSP server support and base applications. ```bash sudo apt install -y gstreamer1.0-plugins-good libgstrtspserver-1.0-0 gir1.2-gst-rtsp-server-1.0 sudo apt install -y gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad ``` -------------------------------- ### Install Raspberry Pi OS Specific Packages Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs libcamera drivers and related Python libraries required for Rpanion-server on Raspberry Pi OS. ```bash sudo apt install -y gstreamer1.0-libcamera python3-picamera2 python3-libcamera python3-kms++ ``` -------------------------------- ### Install Rpanion-server Debian Package Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Downloads and installs the Rpanion-server application from a specific release version using the dpkg package manager. ```bash wget https://github.com/stephendade/Rpanion-server/releases/download/v0.12.0/rpanion-server_0.12.0_arm64.deb sudo dpkg -i rpanion-server_0.12.0_arm64.deb ``` -------------------------------- ### Install Core Rpanion-server Dependencies Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Installs essential packages for Rpanion-server, including network management tools, Python 3 with specific libraries, and system utilities. ```bash sudo apt install -y network-manager python3 python3-gst-1.0 python3-pip dnsmasq git jq wireless-tools iw sudo apt install -y python3-lxml python3-numpy gpsbabel zip python3-dev gstreamer1.0-x ppp python3-venv ``` -------------------------------- ### Run Rpanion-server in Development Mode Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Starts both the Node.js backend and React frontend applications simultaneously. Skips user login and authentication checks, ideal for development. ```bash npm run dev ``` -------------------------------- ### POST /api/startstopvideo Source: https://context7.com/stephendade/rpanion-server/llms.txt Starts or stops the video stream with specified parameters. ```APIDOC ## POST /api/startstopvideo ### Description Starts or stops the video stream based on the provided configuration. ### Method POST ### Endpoint /api/startstopvideo ### Request Body - **active** (boolean) - Required - Set to true to start, false to stop - **device** (string) - Optional - Video device path - **height** (number) - Optional - Stream height - **width** (number) - Optional - Stream width - **format** (string) - Optional - Video format - **bitrate** (number) - Optional - Stream bitrate - **fps** (number) - Optional - Frames per second - **transport** (string) - Optional - Transport protocol (RTSP/RTP) ### Response #### Success Response (200) - **streamingStatus** (boolean) - Updated streaming status - **streamAddresses** (array) - Active stream URLs ``` -------------------------------- ### POST /api/ntripmodify Source: https://context7.com/stephendade/rpanion-server/llms.txt Updates and starts the NTRIP configuration. ```APIDOC ## POST /api/ntripmodify ### Description Updates and starts the NTRIP configuration. ### Method POST ### Endpoint http://localhost:3001/api/ntripmodify ### Request Body - **host** (string) - NTRIP host - **port** (number) - NTRIP port - **mountpoint** (string) - NTRIP mountpoint - **username** (string) - Username - **password** (string) - Password - **active** (boolean) - Set to true to start - **useTLS** (boolean) - Whether to use TLS ``` -------------------------------- ### GET /api/ntripconfig Source: https://context7.com/stephendade/rpanion-server/llms.txt Retrieves the current NTRIP configuration settings. ```APIDOC ## GET /api/ntripconfig ### Description Retrieves the current NTRIP configuration settings. ### Method GET ### Endpoint http://localhost:3001/api/ntripconfig ### Response #### Success Response (200) - **host** (string) - NTRIP host - **port** (number) - NTRIP port - **mountpoint** (string) - NTRIP mountpoint - **username** (string) - Username - **password** (string) - Password - **active** (boolean) - Status of NTRIP - **useTLS** (boolean) - Whether TLS is enabled ``` -------------------------------- ### GET /api/networkadapters Source: https://context7.com/stephendade/rpanion-server/llms.txt Retrieves a list of all network adapters and their current states. ```APIDOC ## GET /api/networkadapters ### Description Lists all network adapters available on the system. ### Method GET ### Endpoint /api/networkadapters ### Response #### Success Response (200) - **netDevice** (array) - List of network devices with their type and state ``` -------------------------------- ### GET /api/videodevices Source: https://context7.com/stephendade/rpanion-server/llms.txt Retrieves available video devices, current settings, and streaming status. ```APIDOC ## GET /api/videodevices ### Description Retrieves a list of available video devices, supported resolutions, and the current streaming configuration. ### Method GET ### Endpoint /api/videodevices ### Response #### Success Response (200) - **dev** (array) - List of available video devices - **vidres** (array) - List of supported resolutions and formats - **streamingStatus** (boolean) - Current streaming state - **streamAddresses** (array) - List of active RTSP stream URLs #### Response Example { "dev": [{"label": "/dev/video0 (USB)", "value": "/dev/video0", "caps": []}], "vidDeviceSelected": "/dev/video0", "vidres": [{"label": "1920x1080 (H264)", "value": "1920x1080xh264", "width": 1920, "height": 1080}], "streamingStatus": false, "streamAddresses": ["rtsp://192.168.1.10:8554/devvideo0"] } ``` -------------------------------- ### Manage ZeroTier VPN Source: https://context7.com/stephendade/rpanion-server/llms.txt Check status, join, or leave a ZeroTier network. ```bash curl -X GET http://localhost:3001/api/vpnzerotier \ -H "Authorization: Bearer " ``` ```bash curl -X POST http://localhost:3001/api/vpnzerotieradd \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"network": "8056c2e21c000001"}' ``` ```bash curl -X POST http://localhost:3001/api/vpnzerotierdel \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"network": "8056c2e21c000001"}' ``` -------------------------------- ### Manage Network Configuration Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for querying network adapters, scanning for WiFi, and managing network connections. ```bash # Get all network adapters curl -X GET http://localhost:3001/api/networkadapters \ -H "Authorization: Bearer " # Response: {"netDevice": [ # {"value": "wlan0", "label": "wlan0 (wifi)", "type": "wifi", "state": "connected", "channels": [...]} # ]} # Get all network connections curl -X GET http://localhost:3001/api/networkconnections \ -H "Authorization: Bearer " # Response: {"netConnection": [ # {"value": "uuid-1234", "labelPre": "MyWiFi", "type": "wifi", "state": "wlan0"} # ]} # Scan for WiFi networks curl -X GET http://localhost:3001/api/wifiscan \ -H "Authorization: Bearer " # Response: {"detWifi": [ # {"ssid": "HomeNetwork", "signal": -45, "security": "WPA2"} # ]} # Get connection details curl -X POST http://localhost:3001/api/networkIP \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"conName": "550e8400-e29b-41d4-a716-446655440000"}' # Response: {"netConnectionDetails": {"DHCP": "auto", "IP": "192.168.1.10", "ssid": "MyWiFi"}} # Add new WiFi connection (infrastructure mode) curl -X POST http://localhost:3001/api/networkadd \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "conName": "FieldNetwork", "conType": "wifi", "conAdapter": "wlan0", "conSettings": { "ssid": "DroneNetwork", "mode": "infrastructure", "wpaType": "wpa-psk", "password": "secretpassword", "ipaddresstype": "auto" } }' # Add WiFi Access Point curl -X POST http://localhost:3001/api/networkadd \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "conName": "DroneAP", "conType": "wifi", "conAdapter": "wlan0", "conSettings": { "ssid": "Rpanion-AP", "mode": "ap", "band": "bg", "channel": 6, "wpaType": "wpa-psk", "password": "dronepass", "ipaddresstype": "shared", "ipaddress": "10.0.0.1" } }' # Activate network connection curl -X POST http://localhost:3001/api/networkactivate \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"conName": "550e8400-e29b-41d4-a716-446655440000"}' # Deactivate network connection curl -X POST http://localhost:3001/api/networkdeactivate \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"conName": "550e8400-e29b-41d4-a716-446655440000"}' # Delete network connection curl -X POST http://localhost:3001/api/networkdelete \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"conName": "550e8400-e29b-41d4-a716-446655440000"}' # Toggle WiFi radio on/off curl -X POST http://localhost:3001/api/setwirelessstatus \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"status": true}' ``` -------------------------------- ### Manage Cloud Uploads Source: https://context7.com/stephendade/rpanion-server/llms.txt Configure automatic bin log synchronization to a remote server. ```bash curl -X GET http://localhost:3001/api/cloudinfo \ -H "Authorization: Bearer " ``` ```bash curl -X POST http://localhost:3001/api/binlogupload \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "doBinUpload": true, "binUploadLink": "pilot@192.168.1.200:/home/pilot/logs", "syncDeletions": false }' ``` -------------------------------- ### Retrieve system information and control Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for monitoring hardware, software, and disk status, as well as performing system-level actions like shutdown or reset. ```bash # Get software versions curl -X GET http://localhost:3001/api/softwareinfo \ -H "Authorization: Bearer " # Response: {"OSVersion": "Debian 12", "Nodejsversion": "v20.10.0", "rpanionversion": "0.12.0", "hostname": "rpanion"} # Get hardware information curl -X GET http://localhost:3001/api/hardwareinfo \ -H "Authorization: Bearer " # Response: {"CPUName": "BCM2711", "RAMName": "4096 MB", "HATName": "None", "SYSName": "Raspberry Pi 4B"} # Get disk usage curl -X GET http://localhost:3001/api/diskinfo \ -H "Authorization: Bearer " # Response: {"diskSpaceStatus": "Used 12/32 Gb (37%)"} # Download system log curl -X GET http://localhost:3001/api/logfile \ -H "Authorization: Bearer " \ -o rpanion.log # Shutdown companion computer curl -X POST http://localhost:3001/api/shutdowncc \ -H "Authorization: Bearer " # Reset all settings to defaults curl -X POST http://localhost:3001/api/resetsettings \ -H "Authorization: Bearer " ``` -------------------------------- ### Manage Video Streaming Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for retrieving video device settings and controlling the start/stop state of RTSP streams. ```bash # Get available video devices and current settings curl -X GET http://localhost:3001/api/videodevices \ -H "Authorization: Bearer " # Response: { # "dev": [{"label": "/dev/video0 (USB)", "value": "/dev/video0", "caps": [...]}], # "vidDeviceSelected": "/dev/video0", # "vidres": [{"label": "1920x1080 (H264)", "value": "1920x1080xh264", "width": 1920, "height": 1080}], # "streamingStatus": false, # "streamAddresses": ["rtsp://192.168.1.10:8554/devvideo0"], # "rotSelected": 0, # "bitrate": 1100, # "fpsSelected": 30, # "transportSelected": "RTSP", # "transportOptions": [{"value": "RTP", "label": "RTP"}, {"value": "RTSP", "label": "RTSP"}] # } # Start video streaming curl -X POST http://localhost:3001/api/startstopvideo \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "active": true, "device": "/dev/video0", "height": 720, "width": 1280, "format": "video/x-h264", "rotation": 0, "bitrate": 2000, "fps": 30, "transport": "RTSP", "useUDPIP": "127.0.0.1", "useUDPPort": 5400, "useTimestamp": false, "useCameraHeartbeat": true, "mavStreamSelected": "192.168.1.10", "compression": "H264", "customRTSPSource": "" }' # Response: {"streamingStatus": true, "streamAddresses": ["rtsp://192.168.1.10:8554/devvideo0"]} # Stop video streaming curl -X POST http://localhost:3001/api/startstopvideo \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"active": false}' ``` -------------------------------- ### Manage NTRIP Configuration Source: https://context7.com/stephendade/rpanion-server/llms.txt Retrieve or update NTRIP settings for RTK data streaming. ```bash curl -X GET http://localhost:3001/api/ntripconfig \ -H "Authorization: Bearer " ``` ```bash curl -X POST http://localhost:3001/api/ntripmodify \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "host": "\"rtk2go.com\"", "port": 2101, "mountpoint": "\"NEAR_ME\"", "username": "\"myemail@example.com\"", "password": "\"none\"", "active": true, "useTLS": false }' ``` -------------------------------- ### Run Frontend Unit Tests Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Executes the unit tests for the Rpanion-server frontend (ReactJS). ```bash npm run testfront ``` -------------------------------- ### Create Disk Image from SD Card Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Generates a disk image file from an inserted SD card. Requires the deploy script to be present. ```bash ./deploy/create_image.sh ``` -------------------------------- ### Manage Flight Logs Source: https://context7.com/stephendade/rpanion-server/llms.txt List, download, or delete flight log files. ```bash curl -X GET http://localhost:3001/api/logfiles \ -H "Authorization: Bearer " ``` ```bash curl -O http://localhost:3001/logdownload/2024-01-15_12-30-00.tlog ``` ```bash curl -X POST http://localhost:3001/api/deletelogfiles \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"logtype": "tlog"}' ``` -------------------------------- ### Package Rpanion-server for Debian Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Generates a .deb package for the Rpanion-server application. ```bash npm run package ``` -------------------------------- ### Run Backend Unit Tests Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Executes the unit tests for the Rpanion-server backend. Code coverage statistics are automatically calculated. ```bash npm run testback ``` -------------------------------- ### System Information API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for retrieving hardware, software, and disk status, as well as system maintenance tasks. ```APIDOC ## GET /api/softwareinfo ### Description Retrieves software version information. ## GET /api/hardwareinfo ### Description Retrieves hardware specifications. ## GET /api/diskinfo ### Description Retrieves disk usage status. ## GET /api/logfile ### Description Downloads the system log file. ## POST /api/shutdowncc ### Description Shuts down the companion computer. ## POST /api/resetsettings ### Description Resets all settings to factory defaults. ``` -------------------------------- ### Manage Wireguard VPN Source: https://context7.com/stephendade/rpanion-server/llms.txt Check status, upload profiles, and control Wireguard connection states. ```bash curl -X GET http://localhost:3001/api/vpnwireguard \ -H "Authorization: Bearer " ``` ```bash curl -X POST http://localhost:3001/api/vpnwireguardprofileadd \ -H "Authorization: Bearer " \ -F "wgprofile=@/path/to/wg0.conf" ``` ```bash curl -X POST http://localhost:3001/api/vpnwireguardactivate \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"network": "wg0.conf"}' ``` ```bash curl -X POST http://localhost:3001/api/vpnwireguarddeactivate \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"network": "wg0.conf"}' ``` ```bash curl -X POST http://localhost:3001/api/vpnwireguardelete \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"network": "wg0.conf"}' ``` -------------------------------- ### VPN Management API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing ZeroTier and Wireguard VPN connections. ```APIDOC ## GET /api/vpnzerotier ### Description Get ZeroTier status. ## POST /api/vpnzerotieradd ### Description Join a ZeroTier network. ## POST /api/vpnzerotierdel ### Description Leave a ZeroTier network. ## GET /api/vpnwireguard ### Description Get Wireguard status. ## POST /api/vpnwireguardprofileadd ### Description Upload a Wireguard profile (multipart form). ## POST /api/vpnwireguardactivate ### Description Activate a Wireguard profile. ## POST /api/vpnwireguarddeactivate ### Description Deactivate a Wireguard profile. ## POST /api/vpnwireguardelete ### Description Delete a Wireguard profile. ``` -------------------------------- ### PPP Connection API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing PPP serial-based networking. ```APIDOC ## GET /api/pppconfig ### Description Get PPP configuration. ## POST /api/pppmodify ### Description Start or modify a PPP connection. ``` -------------------------------- ### Manage Authentication via REST API Source: https://context7.com/stephendade/rpanion-server/llms.txt Use these endpoints to log in, verify session tokens, and invalidate tokens upon logout. Authentication is bypassed when NODE_ENV is set to development. ```bash # Login and obtain JWT token curl -X POST http://localhost:3001/api/login \ -H "Content-Type: application/json" \ -d '{"username": "admin", "password": "admin"}' # Response: {"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."} # Verify token is valid curl -X POST http://localhost:3001/api/auth \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." # Logout (invalidates token) curl -X POST http://localhost:3001/api/logout \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." ``` -------------------------------- ### Cloud Upload API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing cloud synchronization settings for bin logs. ```APIDOC ## GET /api/cloudinfo ### Description Get cloud upload settings. ## POST /api/binlogupload ### Description Configure cloud upload settings. ``` -------------------------------- ### Manage User Accounts via REST API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for listing, creating, updating, and deleting user accounts. All requests require a valid JWT token in the Authorization header. ```bash # List all users curl -X GET http://localhost:3001/api/users \ -H "Authorization: Bearer " # Response: {"users": ["admin", "operator"]} # Create a new user curl -X POST http://localhost:3001/api/createUser \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"username": "pilot", "password": "securepass123"}' # Response: {"infoMessage": "User created successfully"} # Update user password curl -X POST http://localhost:3001/api/updateUserPassword \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"username": "pilot", "password": "newpassword456"}' # Delete a user curl -X POST http://localhost:3001/api/deleteUser \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"username": "pilot"}' ``` -------------------------------- ### Manage Flight Controller Telemetry via REST API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for configuring serial/UDP telemetry, managing UDP output streams, and rebooting the flight controller. Requires a valid JWT token for all operations. ```bash # Get flight controller configuration and available serial ports curl -X GET http://localhost:3001/api/FCDetails \ -H "Authorization: Bearer " # Response: { # "telemetryStatus": true, # "serialPorts": [{"value": "/dev/ttyAMA0", "label": "/dev/ttyAMA0 (UART)"}], # "baudRates": [{"value": 115200, "label": "115200"}], # "serialPortSelected": "/dev/ttyAMA0", # "baudRateSelected": 115200, # "mavVersions": [{"value": 2, "label": "2.0"}], # "mavVersionSelected": 2, # "enableHeartbeat": true, # "enableTCP": false, # "enableUDPB": true, # "UDPBPort": 14550, # "enableDSRequest": false, # "doLogging": true, # "inputTypes": [{"value": "UART", "label": "UART"}, {"value": "UDP", "label": "UDP Server"}] # } # Start telemetry on serial port curl -X POST http://localhost:3001/api/FCModify \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "device": "/dev/ttyAMA0", "baud": 115200, "mavversion": 2, "enableHeartbeat": true, "enableTCP": false, "enableUDPB": true, "UDPBPort": 14550, "enableDSRequest": false, "doLogging": true, "inputType": "UART", "udpInputPort": 9000 }' # Response: {"telemetryStatus": true, "error": null} # Get current UDP outputs curl -X GET http://localhost:3001/api/FCOutputs \ -H "Authorization: Bearer " # Response: {"UDPoutputs": [{"IPPort": "192.168.1.100:14550"}]} # Add UDP telemetry output curl -X POST http://localhost:3001/api/addudpoutput \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"newoutputIP": "192.168.1.100", "newoutputPort": 14550}' # Remove UDP output curl -X POST http://localhost:3001/api/removeudpoutput \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"removeoutputIP": "192.168.1.100", "removeoutputPort": 14550}' # Reboot flight controller curl -X POST http://localhost:3001/api/FCReboot \ -H "Authorization: Bearer " ``` -------------------------------- ### POST /api/pppmodify Source: https://context7.com/stephendade/rpanion-server/llms.txt Modifies the PPP connection settings. ```APIDOC ## POST /api/pppmodify ### Description Updates the PPP connection configuration. ### Method POST ### Endpoint /api/pppmodify ### Request Body - **enabled** (boolean) - Required - Whether the connection is enabled - **device** (string) - Required - Device identifier - **baudrate** (number) - Required - Connection baudrate - **localIP** (string) - Required - Local IP address - **remoteIP** (string) - Required - Remote IP address ### Request Example { "enabled": false, "device": "", "baudrate": 0, "localIP": "0.0.0.0", "remoteIP": "0.0.0.0" } ``` -------------------------------- ### Monitor real-time status via Socket.IO Source: https://context7.com/stephendade/rpanion-server/llms.txt Connects to the Socket.IO server to receive real-time updates on flight controller, NTRIP, cloud, video, and PPP status. ```javascript const io = require('socket.io-client'); // Connect with JWT authentication const socket = io('http://localhost:3001', { auth: { token: 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' } }); // Flight controller status (packets, firmware, vehicle type, connection) socket.on('FCStatus', (data) => { console.log('FC Status:', data); // {numpackets: 1234, FW: "APM", vehType: "Quadcopter", conStatus: "Connected", // statusText: "...", byteRate: 4500, fcVersion: "4.5.0-official"} }); // NTRIP correction status socket.on('NTRIPStatus', (msg) => { console.log('NTRIP:', msg); // "Active - receiving RTCM packets | Online" }); // Cloud upload status socket.on('CloudBinStatus', (msg) => { console.log('Cloud:', msg); // "Syncing..." or "Idle" }); // Video streaming status socket.on('VideoStreamStatus', (msg) => { console.log('Video:', msg); // "Active - Streaming video" or "Not streaming" }); // PPP connection status socket.on('PPPStatus', (msg) => { console.log('PPP:', msg); }); ``` -------------------------------- ### Modify PPP connection settings Source: https://context7.com/stephendade/rpanion-server/llms.txt Updates the PPP connection configuration using a POST request. ```bash curl -X POST http://localhost:3001/api/pppmodify \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"enabled": false, "device": "", "baudrate": 0, "localIP": "0.0.0.0", "remoteIP": "0.0.0.0"}' ``` -------------------------------- ### Create New Release Commit Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Increments the version number (e.g., minor, major, patch) and creates a new Git commit for the release. ```bash npm version minor ``` -------------------------------- ### User Management API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing user accounts. ```APIDOC ## GET /api/users ### Description Lists all registered users. ### Method GET ### Endpoint /api/users ## POST /api/createUser ### Description Creates a new user account. ### Method POST ### Endpoint /api/createUser ### Request Body - **username** (string) - Required - New username - **password** (string) - Required - New password ## POST /api/updateUserPassword ### Description Updates the password for an existing user. ### Method POST ### Endpoint /api/updateUserPassword ### Request Body - **username** (string) - Required - Username - **password** (string) - Required - New password ## POST /api/deleteUser ### Description Deletes a user account. ### Method POST ### Endpoint /api/deleteUser ### Request Body - **username** (string) - Required - Username to delete ``` -------------------------------- ### Update Node.js Libraries Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Checks for and updates outdated Node.js dependencies to their latest versions. ```bash npx npm-check-updates -u ``` -------------------------------- ### POST /api/networkadd Source: https://context7.com/stephendade/rpanion-server/llms.txt Adds a new network connection, such as a WiFi client or Access Point. ```APIDOC ## POST /api/networkadd ### Description Configures and adds a new network connection. ### Method POST ### Endpoint /api/networkadd ### Request Body - **conName** (string) - Required - Connection name - **conType** (string) - Required - Connection type (e.g., wifi) - **conAdapter** (string) - Required - Adapter name (e.g., wlan0) - **conSettings** (object) - Required - Connection specific settings (SSID, mode, password, etc.) ``` -------------------------------- ### Lint Rpanion-server Code Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Applies linting rules to the Rpanion-server codebase using eslint to ensure code quality and consistency. ```bash npm run lint ``` -------------------------------- ### Authentication API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing JWT-based user authentication. ```APIDOC ## POST /api/login ### Description Authenticates a user and returns a JWT token. ### Method POST ### Endpoint /api/login ### Request Body - **username** (string) - Required - Username - **password** (string) - Required - Password ### Response #### Success Response (200) - **token** (string) - JWT authentication token ## POST /api/auth ### Description Verifies if the provided JWT token is valid. ### Method POST ### Endpoint /api/auth ## POST /api/logout ### Description Invalidates the current JWT token. ### Method POST ### Endpoint /api/logout ``` -------------------------------- ### Update Device Permissions Temporarily Source: https://github.com/stephendade/rpanion-server/blob/master/README.md Temporarily grants read/write access to a serial device. Useful for immediate testing or troubleshooting. ```bash sudo chmod 666 /dev/ttyACM0 ``` -------------------------------- ### Flight Logs API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for listing, downloading, and deleting flight log files. ```APIDOC ## GET /api/logfiles ### Description Get list of all log files. ## POST /api/deletelogfiles ### Description Delete all logs of a specific type (tlog, binlog, kmzlog). ``` -------------------------------- ### Flight Controller Telemetry API Source: https://context7.com/stephendade/rpanion-server/llms.txt Endpoints for managing flight controller connections and telemetry routing. ```APIDOC ## GET /api/FCDetails ### Description Retrieves flight controller configuration and available serial ports. ### Method GET ### Endpoint /api/FCDetails ## POST /api/FCModify ### Description Updates flight controller telemetry configuration. ### Method POST ### Endpoint /api/FCModify ## GET /api/FCOutputs ### Description Retrieves current UDP telemetry outputs. ### Method GET ### Endpoint /api/FCOutputs ## POST /api/addudpoutput ### Description Adds a new UDP telemetry output destination. ### Method POST ### Endpoint /api/addudpoutput ### Request Body - **newoutputIP** (string) - Required - Destination IP - **newoutputPort** (number) - Required - Destination Port ## POST /api/removeudpoutput ### Description Removes an existing UDP telemetry output destination. ### Method POST ### Endpoint /api/removeudpoutput ### Request Body - **removeoutputIP** (string) - Required - Destination IP - **removeoutputPort** (number) - Required - Destination Port ## POST /api/FCReboot ### Description Reboots the flight controller. ### Method POST ### Endpoint /api/FCReboot ``` -------------------------------- ### Socket.IO Real-time Status Source: https://context7.com/stephendade/rpanion-server/llms.txt Real-time status updates broadcasted via Socket.IO. ```APIDOC ## Socket.IO Events ### Description Real-time status updates provided via Socket.IO on port 3001. ### Events - **FCStatus**: Flight controller telemetry and connection status. - **NTRIPStatus**: NTRIP correction status. - **CloudBinStatus**: Cloud synchronization status. - **VideoStreamStatus**: Video streaming status. - **PPPStatus**: PPP connection status. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.