m0x00cycle
m0x00cycle
A self-replicating, mesh-networked, up-armored, off-road motorcycle. For the cyberpunk dystopia we deserve.
This is an ongoing research project, and this page is a wiki. The current status is a rushed hack with parts scavenged from other places prior to a cross-country ride, so please excuse the mess. M0x00cycle-specific software is early stage. That said, it inherits many relatively complete features from MarigoldOS. Several subsections are ripped straight from the listed projects' READMEs/homepages.
Note: My ability to leave the motorcycle plugged into power (and in range of a usable network) is sometimes limited, so some of the screenshots (like audio mixing) are from my laptop.
Party tricks
Offline data delivery
End-to-end encrypted sneakernet. Connected devices can use NNCP to send emails, run terminal commands, and move arbitrarily-large files to-from other airgapped, internet-gapped, or net-connected computers. As the moto rides around it will move packets/mails/commands sneakernet. Files that can't fit on the onboard storage are automatically packetized. Can relay to other mobile nodes to route data wherever it needs to go.
Network in a box
Wifi hotspot with dhcp, dns, and pile of self-hosted stuff (mail-server, git hosting, voice chat, webserver, gemini server, nomadnet server, music streaming server, fileserver, and some other goodies)
More meshnets than you can shake a stick at.
It's not a dystopia unless you are forced to communicate p2p. End-to-end encryption is the default.
Yggdrasil, NNCP, reticulum/nomadnet, APRS, and a 10w dual-band TX/RX radio. The motorcycle has a static IPv6 address that's globally routable (no NAT!) thanks to yggdrasil. Whether over the net or connected directly while floating in the middle of the atlantic -- you reach the bike the same way and you don't need to reconfigure any software. NNCP and reticulum likewise provide encryption-key-based routing for similar guarantees. Some such as reticulum are long-range low-power meshnets that could provide extended connectivity for low-bandwidth messages and webpages.
Self-replicating
Plug it into the ethernet port and netboot this OS as a live image or permanent install to whatever computers you can scavenge from the wreckage of your civilization.
Disaster response in a box
Hurricane? Fires? Floods? If you can manage to ride, drag, or otherwise push this up-armored motorcycle to the nearest tall building you can shove it in a freight elevator (or ride up the stairs. This is a dystopia, right?) and bring it to the roof. Thanks to the 10W VHF/UHF radio, 1/2 wave whip, and built-in generator you can provide voice or digital service to a fairly large area. If that large building happens to have an internet connection you can bridge the voice chat server to the ham radio, too.
Hosts it's own website
When it's running and in network range, obviously.
TL;DR
Hardware
- 1x Lora32 Dual-core MCU
- Single Board PC with 1G RAM/256G flash
- custom printed chorded keyboard built into grip, held in place with medical gauze and a baby sock
- 9 axis IMU w/ accelerometer, gyroscope, magnetometer
- rtl-sdr
- 10W VHF/UHF Ham Radio with waterproof head unit
- 3/8 wave whip
- Ham radio adapter board Two-way summing stereo->mono + impedance matching and PTT pulldown circuit
- USB sound card Came from a cheap headset. It's what ^ plugs into.
- Power distribution block Bluetooth, configurable circuit breakers, voltage cutoffs, and analog/PWM output.
- temperature sensor attached to PDU.
Radio Inventory
- 4x Bluetooth radios
- 3x WiFi radios
- 1x LoRa transceiver
- 1x 100kHz - 1.75GHz tcxo rtl-SDR
- 10W VHF/UHF ham radio
Software
- MarigoldOS Independent in every single sense of the word.
- NNCP Sneakernet (WiFi multicast)
- Yggdrasil meshnet (WiFi/ethernet multicast)
- Reticulum meshnet (Lora/long-range, Bluetooth, UART) meshnet
- rnode firmware self-replicating mesh network firmware for Lora32
- APRS (VHF, high power/long range) Meshnet
- Gitea/Gitweb hosting it's own source code
- IPXE Self-replicating. Capable of bootstrapping a 0x00/MarigoldOS laptop or another motorcycle with ipxe without an internet connection Many caveats apply
- Software-controlled PTT
- Dynamic Audio Routing between radios, phone, and Bluetooth headset
- Mumble Voice chat server
- whisper.cpp AI Voice Assistant bb (pretending that voice recognition isn't 90s tech) aka whisper.cpp and pretty much straight up using the command example.
- kde connect Some remote control shit, but mainly for the volume level adjustment.
- tcpcrypt opportunistic encryption of all TCP traffic.
Hardware
Lora32
ESP-32 + Lora dev board. Running a Rnode firmware. Routes reticulum traffic via Bluetooth, LoRa, WiFi, and UART. Connected to SBC via USB/UART.
Specs: Dual core 240mhz MCU LoRa (some band) WiFi (probably 2.4 only) Bluetooth (idk my bff jill)
SBC
Single board PC is currently a raspberry PI 3b (You know it, I know it, everyone knows it) running MarigoldOS. It's got a gig of ram, and I scored a high endurance 256GB microsd for $10 on sale a few months ago that needed a home. The m0x00cycle may as well be it, since it's a data-delivery vehicle and intermittent-availability server. Will probably switch to a different board later, or with my tendencies keep this one and add a second.
Keyboard
A last minute addition, it was designed, printed, and installed a couple of hours before a 3k km trip. You can see the original button pod zip-tied to the mirror. The primary input is a minimal chorded keyboard consisting of three pushbutton switches in a 3d-printed sled. It is strapped to the grip with medical gauze and a baby sock with a hole cut in the end. Originally it had four buttons, the fourth being smaller for the pinkie, but I broke that one off on install. So now it's a three-key input. Cest la vie. Currently each switch takes two GPIO pins as a matter of expediency, but going forward a proper pcb and switch matrix will make it a bit smaller and use less GPIO.
IMU
Pololu mini imu v3 Nine-axis IMU, featuring an accelerometer, magnetometer, and gyroscope. This is a motorcycle and it goes offroad. It leans in corners, wheelies in straightaways, stoppies when you're brave, crashes when you're too brave, gets knocked over in parking lots, and otherwise gets beat to snot when ridden like it should be. I'd love to add a second IMU to the front wheel, and a third to the swingarm and auto (or at least semi-auto) tune the suspension at some point.
rtl-sdr
Wideband receive-only SDR. tcxo. More to come.
Ham Radio
Yaesu FTM-10sr. Waterproof control unit and body. 10W VHF 7W UHF. 1/2 wave whip antenna with 3d printed mount.
Ham adapter board
Bidirectional summing stereo->mono + impedance matching and PTT pulldown circuit. Radio outputs stereo audio, raspi microphone is mono. Raspi outputs stero audio and Radio microphone is mono. Matches impedance too, obviously. Also has a PTT circuit that lets the raspi GPIO pull the PTT low to activate the microphone.
Sound card
USB sound card from a logitech headset exposes two 3.5mm audio jacks that ^ plugs into. That's why you see 'Logitech G430 Headset' as the name for the sound device. If you know how I can change that, please lmk.
PDU
Power Distribution Unit with bluetooth control. Measures and controls power, has 6 ciruits each with software-configurable circuit breakers up from 10-15 Amps. Also has analog/PWM output on every circuit, and can control the circuits based on temperature, speed, external triggers, and a bunch of other fancy-pancy stuff. The unit is an Arboreal Systems Neutrino Black Box. I can't in good conscience recommend it as it's closed source in every way shape and form ("Black Box" is in the name!) and using it requires an app downloaded off google play (A small app at only a couple MB, seemingly handmade, and I doubt it's got telemetry/tracking but haven't checked). That said, the number on the website goes direct to the owners cell phone, and he answers questions and will call you back and that's a rarity these days.
temperature sensor
It's attached to the PDU above. It's remote, and mounted in cool air instead of with the rest of the electronics. Can pull the values over BLE.
Software
MarigoldOS
The heart of the 0x00 project, MarigoldOS is a nixos-based distro designed to be independent in every single sense of the word.
NNCP
Data-delivery for when the comms are down and radios are off to save power.
NNCP is a collection of utilities for store-and-forward file/mail transfer and command execution. These utilities are intended to help build up small size (dozens of nodes) ad-hoc friend-to-friend (F2F) statically routed darknet delay-tolerant networks for fire-and-forget secure reliable files, file requests, Internet mail and commands transmission. All packets are integrity checked, end-to-end encrypted, explicitly authenticated by known participants public keys. Onion encryption is applied to relayed packets. Each node acts both as a client and server, can use push and poll behaviour model. Also there is multicasting areas support.
Yggdrasil
Yggdrasil is used for nat-busting and to allow the m0x00cycle to have a globally-reachable static ipv6 address. Yggdrasil is an overlay network implementation of a new routing scheme for mesh networks. It is designed to be a future-proof decentralised alternative to the structured routing protocols commonly used today on the Internet and other networks.
The highlights of Yggdrasil are that it is:
- Scalable - Supports large, complex or even internet-scale topologies
- Self-healing - Network responds quickly to connection failures or mobility events
- Encrypted - Traffic sent across the network is always fully end-to-end encrypted
- Peer-to-peer - Works entirely ad-hoc by design with no built-in points of centralisation
Reticulum
Reticulum is a cryptography-based networking stack for building both local and wide-area networks with readily available hardware, that can continue to operate under adverse conditions, such as extremely low bandwidth and very high latency. Reticulum allows you to build wide-area networks with off-the-shelf tools, and offers end-to-end encryption, forward secrecy, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more. Reticulum enables secure digital communication that cannot be subjected to outside control, manipulation or censorship. Reticulum enables the construction of both small and potentially planetary-scale networks, without any need for hierarchical or beaureucratic structures to control or manage them, while ensuring individuals and communities full sovereignty over their own network segments.
Reticulum Highlights:
- Coordination-less globally unique addressing and identification
- Fully self-configuring multi-hop routing
- Complete initiator anonymity, communicate without revealing your identity
- Asymmetric encryption based on X25519, and Ed25519 signatures as a basis for all communication
- Forward Secrecy by using ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519
- Reticulum uses the Fernet specification for on-the-wire / over-the-air encryption
- All keys are ephemeral and derived from an ECDH key exchange on Curve25519
- AES-128 in CBC mode with PKCS7 padding
- HMAC using SHA256 for authentication
- IVs are generated through os.urandom()
- Unforgeable packet delivery confirmations
- A variety of supported interface types
- An intuitive and developer-friendly API
- Efficient link establishment
- Total bandwidth cost of setting up a link is only 3 packets, totalling 297 bytes
- Low cost of keeping links open at only 0.44 bits per second
- Reliable and efficient transfer of arbitrary amounts of data
- Reticulum can handle a few bytes of data or files of many gigabytes
- Sequencing, transfer coordination and checksumming is automatic
- The API is very easy to use, and provides transfer progress
- Authentication and virtual network segmentation on all supported interface types
- Flexible scalability allowing extremely low-bandwidth networks to co-exist and interoperate with large, high-bandwidth networks
APRS
APRS is a digital communications information channel for Ham radio. As a single national channel, it gives the mobile ham a place to monitor for 10 to 30 minutes in any area, at any time to capture what is happening in ham radio in the surrounding area. The APRS network has grown to most countries with strong Amateur Radio populations.
APRS features:
- Announcements
- Bulletins
- Messages
- Alerts
- Weather
- Simplex radio ranging
- email gateway
- sms gateway
- internet gateway
- objects
- frequencies
- satellites
- nets
- meetings
- Hamfests
- etc.
All of the above is mapped and viewable on https://aprs.fi
Git
Runs gitea and gitweb servers, but one's going to go. Probably Gitea.
IPXE
Pixieboot/netboot. Plug into the ethernet port to load either a live version (complete with all the debug tools needed for both this and your current OS. It packs a hell of a recovery package.) or the installer, to replace whatever lame OS you're currently using. I guess booting over wifi is possible, but I don't see an option to do that in my bios and am not sure how it would be done.
Software Controlled PTT
This is so software like mumble can automatically pull down the PTT circuit on the radio, allowing things like bridging a voice chat room to the ham radio. See next section.
Dynamic Audio Routing
Pipewire. You've got a bluetooth helmet, a phone that you make calls with, a bike that stores a few dozen gigs of (music/podcasts/erotic audio), a voice chat server, a ham radio, skype, snapchat, youtube, carrier pigeons, and smoke signals. You gotta figure out some way to sort this mess out.
Mumble
Mumble is a free, open source, low latency, high quality voice chat application. Multi-channel audio recorder, positional audio, hundreds of simultaneous connections. Provides a background voice chat room that others can join when you're online.
whisper.cpp
AI Voice Assistant (pretending that voice recognition isn't 90s tech) aka whisper.cpp and pretty much straight up using the command example.
rtl_433
(rtl_433)(https://github.com/merbanan/rtl_433) (despite the name) is a generic data receiver, mainly for the 433.92 MHz, 868 MHz (SRD), 315 MHz, 345 MHz, and 915 MHz ISM bands. It supports a wide range of protocols.
kde connect
project page Mainly used for volume control of all the audio devices right now. It's got a lot of remote control stuff that's mostly useless for a headless/server use case. File transfer is cool. find-my-phone could be useful, but gotta figure out how I want to manage that wrt vpns/lan.
tcpcrypt
Tcpcrypt is a protocol that attempts to encrypt (almost) all of your network traffic. Unlike other security mechanisms, Tcpcrypt works out of the box: it requires no configuration, no changes to applications, and your network connections will continue to work even if the remote end does not support Tcpcrypt, in which case connections will gracefully fall back to standard clear-text TCP.
rnode
Rnode is a firmware that is running on the Lora32 (esp32) board. An RNode is an open, free and unrestricted digital radio transceiver. It enables anyone to send and receive any kind of data over both short and very long distances. RNodes can be used with many different kinds of programs and systems, but they are especially well suited for use with Reticulum. It is self-replicating. The designs, guides and software stored within allows users to create more RNodes, and even to bootstrap entire communications networks, completely independently of existing infrastructure, or in situations where infrastructure has become unreliable or is broken.
V2 wishlist
- Solar panels
- 2x2 SDR
- RF amp for ^
- Positron 3d printer
- lidar
- pcb + low profile buttons for grip.