LimeSDR 5g API

Use a LimeSDR Mini or LimeSDR USB to act as a local LTE/5G cell that:

  • Broadcasts an OTR validator zone
  • Accepts devices via eSIM + MAC
  • Relays audio, message, and CID data
  • Operates off-grid or in hybrid fallback

How It Works (Flow)

  1. LimeSDR broadcasts a private 4G/5G signal
    • Via open-source RAN stack like srsRAN or Magma
    • Configured to use your own PLMN ID and CID rules
  2. Devices connect via eSIM
    • A second eSIM profile on the phone is tied to your LimeSDR validator zone
    • Users manually or automatically switch to OTR when public service fails
  3. Device trust via MAC Address
    • On connection, device MAC is authenticated
    • /device/verify, /proof/authenticate, and /relay/request APIs are triggered
  4. CID, Audio, Message relay begins
    • CID logs, SafeSignal, VoIP, QR sync all flow through the local mesh
    • No internet needed — relays can hop until they reach a gateway
  5. IPFS Sync (When Online)
    • The validator or gateway node uploads CID logs once online
    • Proof of Relay + Proof of Auth are time-stamped and signed

Required Stack

  • LimeSDR Mini 2.0 (USB-C or Pi connected)
  • srsRAN or Magma open-source RAN stack
  • gateway_relay.py + mac_router.py
  • OTA_Validator_SD.img with:
    • /esim/provision
    • /device/verify
    • /proof/relay
    • /wallet/balance etc.

Key Benefits

FeatureBenefit
Full local LTE/5G coverageOperates even without public cell or Wi-Fi
MAC + eSIM-based accessHardware-authenticated, not spoofable
CID + VoIP + audio relayOTR validator relay stack over RF
IPFS sync fallbackAlways logs, syncs later if needed
Works from cabin or campsitePortable cell validator — no grid needed

OTR LimeSDR Validator Gateway API

1. POST /esim/provision

Provision a new device profile onto the eSIM stack (via QR or manual entry)

Payload:

json{
"device_mac": "AA:BB:CC:DD:EE:FF",
"callsign": "relay1",
"plmn_id": "90170",
"device_type": "phone",
"auth_level": "validator"
}

2. POST /device/verify

Authenticate device via MAC or signed eSIM token.

Payload:

json{
"mac": "AA:BB:CC:DD:EE:FF",
"signature": "0xabc123",
"timestamp": 1717435123
}

Returns:

json{
"status": "verified",
"role": "validator",
"trust_score": 98
}

3. POST /relay/push

Push CID, audio, or message from local device to the validator or remote node.

Payload:

json{
"cid": "QmXYZ...",
"type": "audio",
"source_mac": "AA:BB:CC:DD:EE:FF",
"tags": ["relay_zone", "proof"]
}

4. GET /proof/relay/:cid

Return signed proof that CID was relayed or authenticated at a zone node.

Example:
/proof/relay/QmXYZ123456...

Returns:

json{
"cid": "QmXYZ...",
"signed_by": "validator1",
"timestamp": 1717435199,
"mac_verified": true,
"zone": "OTR-Relay-North",
"sig": "0xabc999..."
}

5. GET /gateway/status

Healthcheck and diagnostics for SDR relay node.

Returns:

json{
"lime_status": "active",
"srsran_service": "running",
"connected_devices": 3,
"network_zone": "OTR-Fallback"
}

6. POST /camera/scan

Scan QR from camera, extract CID, and relay.

Payload:

json{
"device_mac": "AA:BB:CC:DD:EE:FF",
"qr_data": "QmABC123...",
"auto_push": true
}

Key Android Modules:

  1. QR Scanner
    Use ZXing or ML Kit to read QR codes (for /camera/scan endpoint).
  2. eSIM Control (Android 9+ or eUICC required)
    Interface with system profiles to allow toggle between commercial SIM and OTR eSIM fallback.
  3. MAC Address Access
    Use WifiInfo.getMacAddress() or system UID to identify device (with fallback hash).
  4. Retrofit or OkHttp
    Easily connect to /esim/provision, /device/verify, /relay/push.
  5. Background Service
    Auto-monitor connection to the LimeSDR gateway (/gateway/status), and push payloads if within range.
  6. Proof Viewer UI
    Allow user to confirm that messages/CIDs were relayed and signed — great for validator payouts or audit tools.

OTRPhoneApp/
├── MainActivity.kt
├── QRScanFragment.kt
├── RelayService.kt
├── AuthManager.kt
├── ApiService.kt
├── models/
│ ├── RelayPayload.kt
│ ├── DeviceProfile.kt
│ └── ProofResponse.kt
└── utils/
└── EsimSwitcher.kt

LimeSDR + OTR Integration Summary

Role:

LimeSDR acts as a local base station and validator that bridges:

  • Offline Android/iOS devices
  • MAC-authenticated hardware
  • The full OTR relay/validator stack

Architecture

swift📱 Android Phone        💻 Pi/Validator w/ LimeSDR
───────────────▶ ┌─────────────────────────────┐
│ OTR Validator Node │
│ • srsRAN (LimeSDR driver) │
│ • mac_router.py │
│ • gateway_relay.py │
│ • IPFS + CID logging │
└─────────────────────────────┘


🧠 Internet (optional)
or Mesh Relay

Security Stack

  • MAC Address Authentication/device/verify
  • eSIM Profile Handling/esim/provision
  • Proof of Authentication/auth/proof.json
  • Proof of Relay/relay/proof.json
  • CID Log Export/cid/export

What LimeSDR Enables

  • Acts as an offline-first base station using srsRAN
  • Accepts signal from phones connected over 4G/5G (band-specific)
  • Offers a MAC-authenticated connection even without a SIM
  • Pushes audio, message, CID payloads to IPFS via the gateway
  • Returns signed proofs of relay for earnings/audit
  • Can optionally connect to full OTR Validator mesh if internet available

How You Can Use It:

  • Deploy a portable or Pi-based validator
  • Bind to LimeSDR (or future SDR devices)
  • Onboard any MAC-authenticated phone via QR + eSIM
  • Relay messages or audio even when offline
  • Sync logs + CID proofs to IPFS for earnings + trust
  • Build apps with the /relay, /device, /auth, /cid endpoints

What You Can Build:

  • Emergency mesh apps
  • Off-grid 5G messenger
  • Remote audio/video drop relays
  • Trusted proof-based access tools
  • Biometric login or locator tools over SDR