3. On the Mac, while it is online
Everything that needs the internet happens here, before the Mac joins the robot’s Wi-Fi (it has no internet). At the end of this chapter the Mac holds the robot’s sources in one archive, the app’s APK and a NETRA that runs offline.
3.1 Tools
Docker Desktop, adb and GitHub’s gh (skip what you have already):
brew install --cask docker android-platform-tools
brew install gh
gh auth loginStart Docker Desktop once and give it at least 4 GB of memory (Settings › Resources).
3.2 The robot’s sources in one archive
tools/pack_sources.sh clones x30_ros, every repository of x30.repos with their submodules (FAST-LIO with its ikd-Tree, the Livox driver, the HIKMICRO and Hertzino drivers) and the Livox SDK, and packs them into one archive of about 5 MB, without Git history:
mkdir -p ~/x30 && cd ~/x30
git clone git@github.com:DarmawanRobotics/x30_ros.git
cd x30_ros
bash tools/pack_sources.sh ~/x30/x30_sources.tar.gzA GitHub repository that HTTPS refuses, a private driver, comes over SSH with your GitHub key; nothing in your Git configuration changes. src/SOURCES.txt in the archive lists the commit of every repository.
3.3 The app
cd ~/x30
gh release download -R DarmawanRobotics/X30Controller \
-p 'x30-controller-*.apk'Every release carries Skydroid’s SDK, so it reads the H12’s own sticks; on any other Android device the app drives with touch sticks.
3.4 NETRA
NETRA builds its images and downloads its AI model once; afterwards it starts without internet.
cd ~/x30
git clone --recursive git@github.com:DarmawanWeb/Netra.git
cd Netra
scripts/local.sh setup
scripts/local.sh upsetup checks the Mac, writes .env with generated passwords and fetches Ollama and its model; up builds and starts everything (a few minutes the first time). Open http://localhost and log in as admin with the password setup printed (NETRA_ADMIN_PASSWORD in .env).
3.4.1 License
Without a license NETRA runs its core with one robot and drops the inspection uploads of the robot. The X30 needs the substation module. NETRA accepts only a license signed by a key built into it: be/internal/license/keys/*.pub. The image carries the license tool, so no Go is needed:
netra-license() {
docker run --rm --entrypoint /netra-license -u "$(id -u)" \
-v ~/netra-keys:/keys -v "$PWD/license":/out \
ghcr.io/darmawanweb/netra:main "$@"
}Once, where licenses are issued (skip it when ~/netra-keys/ezra.key exists), the key pair:
mkdir -p ~/netra-keys
netra-license keygen -out /keys/ezraNETRA trusts the public half once it is built in (commit ezra.pub to netra-fleet-be, so that every build does):
cp ~/netra-keys/ezra.pub be/internal/license/keys/
scripts/local.sh upRead the installation ID in Settings › License (e.g.
NETRA-7KQ3-M9XD-2WPA).Issue the license (or in the License Manager):
netra-license issue -key /keys/ezra.key \
-client "Gardu X30" -edition substation -tier pro \
-robots 1 -days 365 \
-installation NETRA-7KQ3-M9XD-2WPA \
-out /out/netra.lic
docker compose restart apiThe API reads license/netra.lic at its start.
The private key
ezra.key signs any license. Keep it offline with a backup, never in a repository, an image or a server.
The substation edition draws robots on a GPS basemap. The X30 has no GPS: it appears there through the site’s reference points (Site map). For a drawing of the substation instead, issue the license with -map floorplan.
3.4.2 The robot
scripts/local.sh robot x30-01 "X30 01"It prints ROBOT_ID, CC_URL and CC_TOKEN: keep the token, it becomes X30_NETRA_TOKEN on the robot (Chapter 7). A robot ID is 2 to 32 lower-case letters, digits, - and _.
3.5 The handheld’s token
The H12 gateway accepts only a handheld that knows its shared secret. Make one and keep it with NETRA’s:
openssl rand -hex 16Tip
Before you leave: open http://localhost once with Wi-Fi off. Everything NETRA needs is then on the Mac.