Getting Started
This guide takes you from a stock DJI drone and remote controller to a live telemetry stream and your first HTTP command.
Prerequisites
Section titled “Prerequisites”- DJI drone + compatible RC, 5 GHz Wi-Fi access point, ground station computer
- Android Studio Koala 2024.1.2
- DJI developer account + API key from developer.dji.com
Install the app
Section titled “Install the app”git clone https://github.com/SDU-UAS-Center/lyrebird.git-
Open
Lyrebird/LyrebirdApp/android-sdk-v5-asin Android Studio. -
Create
local.propertiesfrom the template and set the Android SDK path for your machine:Terminal window cd Lyrebird/LyrebirdApp/android-sdk-v5-ascp local.properties.example local.propertiesExample for a default Linux Android Studio install:
sdk.dir=/home/your-user/Android/Sdk -
Add your DJI API key to
local.properties:AIRCRAFT_API_KEY="Your_App_Key" -
Build and deploy to your RC or Android phone (enable Developer Mode + USB Debugging first).
Command-line build
Section titled “Command-line build”cd Lyrebird/LyrebirdApp/android-sdk-v5-as./gradlew :app:assembleCurrentDebug./gradlew :app:assembleDemoBiomassDebugThe debug APKs are written to:
LyrebirdApp/lyrebird-app/build/outputs/apk/current/debug/Lyrebird-debug.apkLyrebirdApp/lyrebird-app/build/outputs/apk/demoBiomass/debug/Lyrebird-debug.apkTo build/install a selected variant when an Android device is connected over ADB:
cd LyrebirdApp/android-sdk-v5-as./auto_install_on_connect.sh current --build./auto_install_on_connect.sh demo_biomass --buildTo only check which APK will be used:
./auto_install_on_connect.sh current --check./auto_install_on_connect.sh demo_biomass --checkStart the server
Section titled “Start the server”- Launch the Lyrebird app on the RC — servers start automatically on the default layout.
- Note the Device IP shown in the app, call
/config, or use auto-discovery. - Press Enable Virtual Stick (via
/send/enableVirtualStickor the app UI) before sending navigation commands.
Ground station dependencies
Section titled “Ground station dependencies”pip install -e GroundStation/Python # Python interfacepip install -r GroundStation/ROS/requirements.txt # ROS 2 interfaceConnect and control
Section titled “Connect and control”Telemetry (TCP, port 8081)
Section titled “Telemetry (TCP, port 8081)”import socket, json
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)sock.connect(("192.168.1.100", 8081))buffer = ""while True: buffer += sock.recv(4096).decode('utf-8') while '\n' in buffer: line, buffer = buffer.split('\n', 1) if line.strip(): t = json.loads(line) print(f"Battery: {t['batteryLevel']}% Alt: {t['location']['altitude']:.1f}m Sats: {t['satelliteCount']}")Commands (HTTP POST, port 8080)
Section titled “Commands (HTTP POST, port 8080)”import requests
rc = "192.168.1.100"requests.post(f"http://{rc}:8080/send/takeoff")requests.post(f"http://{rc}:8080/send/gotoWaypointNoseForward", data="49.306254,4.593728,20,90,5.0")requests.post(f"http://{rc}:8080/send/navigateTrajectoryDJINative", data="10.0;49.306,4.593,20;49.307,4.594,25;49.308,4.595,20")requests.post(f"http://{rc}:8080/send/RTH")Video (WHIP/WHEP through MediaMTX)
Section titled “Video (WHIP/WHEP through MediaMTX)”docker compose -f GroundStation/video_test/compose.yaml up -d --buildOpen the dashboard at http://localhost:8090. When the dashboard connects to a phone telemetry stream, the app builds a WHIP publish URL such as:
http://<ground-station-ip>:8889/<drone_name>/whipMediaMTX exposes the matching browser playback endpoint:
http://<ground-station-ip>:8889/<drone_name>/whepThe supported public video example is defined by compose.yaml, mediamtx.yml, and the webapp in GroundStation/video_test/webapp. The older direct WebSocket-signaling viewer/server path has been removed from the public app and ground-station tooling.
Next steps
Section titled “Next steps”- Use the high-level Python client instead of raw sockets: Ground Station.
- Browse every command endpoint: HTTP API.
- Fly from QGroundControl: MAVLink 2.