IranTalkایران تاک
All guides

The neighbourhood gateway: Pi, RNode and an uplink

By the end of this page you have a gateway: a small computer that joins the neighbourhood's LoRa mesh to the IranTalk nodes, and keeps messages in its own inbox while the uplink is down.

Tier 0: no internet · Works without internet.

Draft: this page has not been checked on a real device yet, and its Farsi has not been reviewed. Use with care.

A gateway is evidence, more than a handheld: an outdoor antenna, always on, with an uplink. Before buying, read Before you switch on a radio and decide who may know where it is. A gateway inside Iran is never registered on the dashboard and never appears in the list.

1. Parts

PartChoice
ComputerRaspberry Pi 4 or 5, or any Linux single-board computer
Radioan RNode board (Heltec V3 or T-Beam) on USB
Antennaan outdoor antenna for the frequency, as high as possible; height matters more than power
UplinkStarlink Mini, or whatever internet exists at the time; the gateway works without one, nothing just leaves
Powera 12 V battery and a solar panel, or mains with a UPS

2. The radio

Prepare the board on the Pi itself or on a laptop with rnodeconf --autoinstall (A radio for your phone, section 2). On the Pi, the board stays connected by USB.

3. Software

On Raspberry Pi OS (the Lite edition is enough):

  1. Install Reticulum and LXMF: pipx install rns lxmf, or with pip in a virtual environment. The install files are in the offline pack too.

  2. Run rnsd once and stop it so ~/.reticulum/config is created. Then edit it:

    [reticulum]
      enable_transport = Yes
    
    [interfaces]
      [[LoRa]]
        type = RNodeInterface
        enabled = yes
        port = /dev/ttyUSB0
        frequency = 868000000
        bandwidth = 125000
        txpower = 7
        spreadingfactor = 8
        codingrate = 5
    
      [[IranTalk]]
        type = TCPClientInterface
        enabled = yes
        target_host = HOST
        target_port = PORT
    

    Find the USB port with ls /dev/tty* (sometimes /dev/ttyACM0). The frequency, bandwidth, power, spreading factor and coding rate must be exactly what the neighbourhood's radios use; the values above are only an example. Host and port from the "Reticulum (TCP)" row on Ways to connect.

  3. Run rnsd as a service so it comes up with every boot: rnsd --service in a systemd unit you write. rnstatus should show both interfaces up.

  4. The neighbourhood's inbox: in ~/.lxmd/config, section [propagation], enable_node = yes; then lxmd --service as a service. From now on a message sent on the mesh for someone far away stays on the Pi and reaches our nodes when the uplink comes up. lxmd --status shows how many messages are waiting.

Check every switch and every configuration key against rnsd --help, lxmd --help and lxmd --exampleconfig of that version, not against memory.

4. Where the antenna goes

Near a window or on the roof, away from metal walls. An antenna one floor higher gives more range than several times the power. Test with a handheld in the surrounding streets and see how far a message reaches.

5. Who trusts it

The gateway relays the mesh's messages; the content is encrypted and the Pi cannot read it, but it sees which devices are in range. Whoever keeps the gateway must know this. What a node sees and keeps is listed on Before you switch on a radio.

For a public node outside Iran, one that goes into the signed list, the guide is Run and register a node outside Iran. A neighbourhood gateway never goes into that list.