- JavaScript 35%
- Python 34%
- QML 24%
- TypeScript 7%
- Prolog <1%
- 1 more language <1%
LXMFish #
![]()
Instant messaging for Sailfish OS over LXMF, the lightweight message format for Reticulum — the encrypted networking stack behind Sideband and the Reticulum ecosystem.
- Pure QML/Silica + Python (PyOtherSide), noarch RPM, Harbour
compliant (passes
sfdk check -s harbour) - Uses the official RNS, LXMF and qrcode libraries — never a fork
- End-to-end encryption by Reticulum; no servers, no accounts, no tracking
- Connects to Reticulum transport hubs over the Internet (TCP client) or accepts incoming connections (TCP backbone), and to an RNode radio over Bluetooth LE with the full radio parameter set (frequency, bandwidth, TX power, spreading factor, coding rate, airtime limits). Permissions requested: Internet + Bluetooth + Audio (Audio is only used to play received voice messages)
- Conversations with bubbles and delivery states (pending, sending, delivered, propagated, failed); long-press a message to copy it, delete it (with undo) or resend a failed one
- Image messages: received images are shown as thumbnails in the bubble; tap to view full-screen
- Voice messages (Opus): received audio plays right in the bubble — play/pause button, progress bar (drag to seek), elapsed and total timecode
- Contacts management by 32-hex LXMF destination hash
- Peer discovery: see who is announcing on the network and add them with one tap; optional propagation node (on-demand discovery)
- Multiple network interfaces at once (several hubs, a backbone, an RNode), plus a local (shared-instance) interface and an automatic WiFi interface; enable/disable each with a switch, changes apply immediately (hot-applied to the running transport)
- Identity management: generate, import/export, view as QR code, regenerate with backup
- Presence announcements: let your contacts find you automatically
- Pending messages: outbound messages are queued and automatically sent when a path to the peer becomes known
- Identity, contacts and message database stay in the app sandbox; nothing leaves the device except encrypted Reticulum traffic
Building #
Requirements: Sailfish OS 5.1 or newer — older releases ship a
Python runtime older than 3.11, which the backend needs (f-strings,
str | None annotations, typing_extensions.Buffer for bleak), so the
app is not compatible with them. On the host you need the
Sailfish SDK with a SailfishOS 5.1
build target and python3.
tools/get-vendor-libs.py # fetch the pinned libraries into python/vendor/
sfdk build --rpm
python/vendor/ is gitignored: the official packages are fetched
by tools/get-vendor-libs.py (pinned versions) and bundled into the
RPM at build time — no library code lives in this repository. See
Vendored libraries below for the list and the
reason each one is vendored.
Open harbour-lxmfish.pro in the Sailfish IDE (Qt Creator) and pick
a SailfishOS kit (i486 for the emulator, armv7hl/aarch64 for
devices). Building a distribution tarball for rpmbuild:
tools/package.sh.
Vendored libraries #
Fetched by tools/get-vendor-libs.py (pinned in PINNED there) into
python/vendor/ at build time. When bumping a version, re-check
whether the entry is still needed:
| Package | Pinned | Why it is vendored | On upgrade, verify |
|---|---|---|---|
rns |
1.5.7 | Reticulum itself (core) | RNode BLE API (ble:// port, find_device_by_filter); crypto provider probe — we rely on its guarded fallback to the internal provider (python/rnsbootstrap.py) |
lxmf |
1.2.1 | LXMF protocol | FIELD_IMAGE payload shape ["webp", bytes]; FIELD_AUDIO shape [mode, bytes] |
qrcode |
8.2 | address QR matrix (no image backend → no Pillow dependency) | — |
bleak |
0.22.3 | BLE client for the RNode interface; talks to BlueZ over the system bus via dbus-fast | requires typing-extensions>=4.7 on Python < 3.12 (see below); API used: BleakScanner.find_device_by_filter, BleakClient(device, disconnected_callback=...) |
dbus-fast |
1.95.2 | bleak's Linux D-Bus backend. Fetched from the sdist: 2.x wheels ship compiled .so which would break the noarch rule; only the .py files are extracted |
pure-Python fallback works without the C accelerators |
pyserial |
3.5 | RNS.Interfaces.RNodeInterface imports serial unconditionally on Linux, even for BLE-only use |
still imported unconditionally |
typing-extensions |
4.16.0 | bleak needs typing_extensions.Buffer (>= 4.7); the system package on some devices is older, which crashed the RNode interface at startup (ImportError: Buffer, interface stuck "disconnected"). The vendored copy wins (vendor is first on sys.path) |
removable if bleak drops the requirement or the system package is guaranteed >= 4.7 |
All vendored packages are pure Python — the RPM stays noarch.
Running the tests #
python3 -m unittest discover -s tests
Unit tests run without PyOtherSide and cover the database layer,
message handling (including the audio container duration parser),
interface management and the service. An end-to-end
integration test against a real Reticulum transport node on localhost
(two processes exchanging LXMF messages over TCP) was used during
development; see AGENTS.md for the layout.
Using the app #
First start #
On first launch, LXMFish generates a new Reticulum identity (a few seconds on a phone — pure-Python crypto) and connects to the configured TCP hub using the default interface. Your LXMF address (a 32-hex character destination hash) is derived from this identity.
Fresh installs start with the automatic WiFi interface enabled (it discovers local Reticulum nodes on the LAN); add a hub or RNode in Settings → Interfaces as needed.
Your identity #
- View your address: Open the pull-down menu → My identity
- Your LXMF address is displayed as text and as a QR code for easy sharing with contacts
- Use Copy address to copy your destination hash to the clipboard
- Tap Announce now to broadcast your presence on the network
- Manage your identity:
- Show private key: displays your private identity key as base32 (never share this — share your LXMF address instead)
- Import identity: paste a private key from another device to take over that address (current identity is backed up)
- Regenerate identity: creates a new address; old messages and
contacts remain but will not receive messages sent to the old
address (previous identity is kept as
identity.backup)
All identity changes (import or regenerate) take effect on the next app start — Reticulum cannot be reinitialised in-process. A notice appears on the Identity page when a pending change is waiting for a restart.
Connecting to the network #
- Interfaces: Open the pull-down menu → Settings → Interfaces
- Local interface: a single switch at the top of the list (only one can exist by nature); it exposes a shared-instance interface on the device itself
- Auto interface: discovers Reticulum nodes on the local WiFi network automatically; enabled by default on fresh installs
- TCP client: connects out to a Reticulum transport hub (host +
port, default suggestion
fr.rns-backbone.eu:4242) - TCP backbone: listens for incoming connections (useful if you run your own hub)
- RNode (Bluetooth LE): connects to an RNode radio over BLE
(
ble://, optionallyble://<name-or-MAC>), with the radio parameters (frequency, bandwidth, TX power, spreading factor, coding rate, airtime limits). Note: RNS discovers the RNode by BLE scan, so the RNode must be advertising; a paired RNode that is not advertising is invisible to it. Serial/USB RNodes are not possible under Harbour (no/dev/ttyUSB*access) — BLE only. - Interfaces are grouped by type (local, auto, RNode, backbone, TCP client), each group with a header; only types present in the config are shown
- Tap a row or its switch to enable/disable it — applied immediately to the running transport (hot-apply); long-press a row to edit or delete it
- Live connection status (connected/disconnected) is shown per row on the Interfaces page
Adding contacts #
You need your contacts' LXMF destination hash (32 hexadecimal characters) to message them. There are three ways to add a contact:
-
From the Discover page (recommended):
- Open the pull-down menu → Contacts → Discover
- Browse peers who have announced their presence on the network
- Search by name or address using the search field
- Tap a peer to add them directly (form pre-filled with their name and hash)
- Peers already in your contacts are marked with an "In contacts" tag
-
Manual entry:
- Open the pull-down menu → Contacts → New contact
- Enter a display name for your contact
- Paste their LXMF destination hash (32 hex characters, spaces and colons are automatically ignored)
- The hash must be exactly 32 hexadecimal characters
-
From a received message:
- When you receive a message from an unknown peer, they appear in the Discover page
- You can add them from there with one tap
Starting a conversation #
- From Conversations page: tap a contact to open the chat
- From Contacts page: tap a contact to open the chat
- From Discover page: tap a contact (opens chat) or a non-contact (opens add-contact form)
Once in a chat:
- Type your message and press Send or use Enter on the keyboard
- Messages appear in bubbles: your messages on the right, received messages on the left
- Image messages: received images show as a thumbnail in the bubble; tap it to view full-screen
- Voice messages (audio): play right in the bubble with the play/pause button; the progress bar shows elapsed time and can be dragged to seek; the total duration is shown on the right. Codec2/custom audio modes are stored but shown as a placeholder (not decodable on Sailfish)
- Long-press a message for actions: Copy (text to clipboard), Delete (with an undo countdown), Resend (failed messages only)
- Delivery states are shown on your messages with icons:
- Pending (clock icon): waiting for a network path to the peer
- Sending (send icon): message is being transmitted
- Delivered (accept icon): message reached the peer
- Propagated (upload icon): handed to the propagation node
- Failed (cancel icon): delivery failed (can be resent)
- If a path is not yet known, a notice "Looking for a path to..." appears
- Messages are automatically marked as read when you open a conversation
- Pending messages are automatically flushed when a path to the peer becomes known (via announce or incoming message)
Managing contacts #
- View contact info: from a chat, swipe from the right edge
- Shows LXMF address, network path status, peer identity status
- Request path: manually request a network path to the contact
- Copy address: copy the contact's hash to clipboard
- Delete contact: removes the contact and all conversation history
- From Contacts page:
- Info: view contact details
- Delete: remove the contact and its history
- Last seen timestamp is shown when available
- Rename: the contact name updates automatically when you receive an announce with a different display name
- Delete conversation only: from Conversations page, long-press → Delete conversation (keeps the contact, removes message history)
Settings #
Open the pull-down menu → Settings:
-
Identity section:
- Display name: the name announced to your contacts on the network (updates on the next announce)
- Announce on start: automatically announce your presence when the app starts
- Announce now: manually broadcast your presence
-
Connectivity section:
- Interfaces: configure TCP hubs and backbones
Discovering peers #
- Discover page shows peers who have announced on the network
- Announces are stored for 7 days and capped at 256 entries (contacts' announces are never pruned)
- Use the search field to filter by name or address
- Tap a peer to add them as a contact or start a chat
- The "In contacts" tag indicates peers already in your address book
About page #
Open the pull-down menu → About LXMFish:
- App version (matches the RPM version in
harbour-lxmfish.spec) - Project information (developer, license, libraries)
- View source code: opens the repository in browser
- Zen of Reticulum: opens the Reticulum philosophy document
- Privacy notice
Cover (lock screen) #
The app cover shows:
- App name (LXMFish)
- Unread message count (if any)
- Network service status while connecting or if an error occurred
Data location and management #
All application data is stored in:
~/.local/share/eu.rikles/LXMFish/
This directory contains:
lxmfish.db— SQLite database (contacts, conversations, settings, announces)identity— your Reticulum identity fileidentity.backup— previous identity (created when importing or regenerating)reticulum/config— generated Reticulum configurationimages/— received message images (webp transcoded to JPEG/PNG)audio/— received voice messages (stored as received: Ogg/WebM Opus)cache/— cached UI artifacts (e.g. recolored theme icons)service.log— application log (rotated at 64 KB,.1suffix for previous)
Database migrations #
The database schema is versioned (PRAGMA user_version). The app is not
released yet, so the schema is still at v1 and _MIGRATIONS is empty
in python/db.py — changes go directly into the v1 baseline. After the
first release, the baseline is frozen and each new version gets one
entry in _MIGRATIONS.
Technical details #
- Destination hashes: 32 hexadecimal characters (16 bytes, representing the truncated hash; not 64 characters)
- Private keys: exported as base32 (104 characters for the 64-byte key)
- Message states:
pending,sending,delivered,propagated,failed,received(defined once inpython/messagestates.py) - Message directions:
1= inbound,2= outbound - Network permissions: Internet + Bluetooth + Audio (Bluetooth is used only for RNode-over-BLE interfaces — serial/USB is not possible under Harbour; Audio is only used to play received voice messages)
- Architecture: noarch (pure QML + Python, no compiled binaries)
- OS compatibility: Sailfish OS 5.1+ only (Python 3.11 runtime; older Sailfish OS versions are too old at the Python library level)
- Python dependencies: standard library + vendored packages (see
Vendored libraries) +
python3dist(pillow)(Harbour-allowed) for image re-encoding - Cryptography: RNS uses its internal pure-Python provider on
Sailfish OS;
python/rnsbootstrap.pyguards against a present-but-broken systemcryptographypackage (its_openssl.abi3.socan fail against the device OpenSSL) - Sailjail sandbox: Data is stored under the whitelisted
~/.local/share/<OrganizationName>/<ApplicationName>path as defined in the desktop file (eu.rikles/LXMFish)
Troubleshooting #
- "Connecting to the network..." on cover: The service is still starting up (identity generation can take a few seconds on first run)
- Messages stuck in "pending": No network path to the peer yet. Check that both you and your contact are connected to a working Reticulum transport hub
- Identity changes not applied: Restart the app; Reticulum cannot be reinitialised in-process
- Interface changes not applied: they are hot-applied to the running transport, so this should not happen; if a row shows stale status, leave and re-enter the Interfaces page (it polls live status)
- Service failed to start: Check
service.login the data directory for details - RNode interface stays disconnected: the RNode must be advertising over BLE (RNS discovers it by scan only) and paired with the phone; check its own config, and set the interface's BLE device to its MAC
Licensing #
Application code: GPL-3.0-only (see LICENSE). The vendored RNS and
LXMF libraries keep their upstream licenses (MIT-style Reticulum
License, © Mark Qvist); python/vendor/VENDOR-*-METADATA.txt records
the exact releases.