Technical Documentation

Welcome to the AirLink technical knowledge base. Here you will find in-depth explanations of the protocols and systems that power our decentralized network.

Introduction to Mesh

AirLink operates as a decentralized autonomous mesh network. Unlike traditional star-topology networks where all devices connect to a central access point (like a Wi-Fi router or cell tower), mesh networking allows every device to act as a router for every other device.

This approach offers unprecedented resilience. In a star network, if the central node fails, the entire network dies. In an AirLink mesh, the network dynamically adapts. If a node moves out of range or loses power, the surrounding nodes automatically identify new paths to ensure message delivery continues uninterrupted.

Advanced Mesh Routing

AirLink utilizes a proprietary adaptation of the **Dijkstra algorithm** optimized for dynamic, low-power radio environments. Our routing protocol considers several factors when determining the "cost" of a path:

  • **Signal Strength (RSSI):** Stronger links are prioritized for stability.
  • **Hop Count:** Fewer hops are preferred to reduce latency.
  • **Node Battery Life:** Nodes with low battery are avoided for heavy relay tasks.
  • **Network Congestion:** Busy nodes are bypassed to maintain high throughput.
// Pseudocode for AirLink Routing Cost
function calculatePathCost(link) {
    let rssiFactor = normalize(link.rssi);
    let batteryFactor = link.node.batteryLevel;
    return (1 / rssiFactor) * (1 / batteryFactor);
}

Signal Protocol Deep Dive

Security is not an afterthought in AirLink; it is the foundation. We have implemented a full version of the **Signal Protocol** tailored for asynchronous, peer-to-peer environments.

X3DH (Extended Triple Diffie-Hellman)

When you pair with a new peer via QR code, AirLink performs an X3DH key exchange. This allows two parties to establish a shared secret without ever having to communicate through a central server. It provides mutual authentication and forward secrecy.

The Double Ratchet Algorithm

Once a session is established, every single message sent uses a new set of keys derived from the Double Ratchet. This ensures that even if a specific message key is compromised, future messages remain secure, and past messages cannot be decrypted (Post-Compromise Security).

Neighbor Discovery Protocol

AirLink uses a hybrid discovery mechanism combining **Bluetooth Low Energy (BLE)** for continuous background presence and **Wi-Fi Direct** for high-bandwidth data bursts. Nodes periodically broadcast "Heartbeat" packets containing their unique ID and a summary of their routing table. This allows the mesh to stay up-to-date with its local topology with minimal energy consumption.

Developer FAQ

Can I build on top of the AirLink Protocol?

Yes. We are currently developing an SDK that will allow third-party developers to integrate mesh messaging into their own applications. Check our GitHub for early-access documentation.

How does the app handle data collisions?

We use a custom CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance) layer specifically tuned for the shared radio space of mobile devices.