Skip to content

LoRa Setup

Configure MikroTik routers as LoRaWAN gateways to connect IoT devices to network servers. MikroTik LoRa support enables long-range, low-power communication for sensor networks, asset tracking, and remote monitoring applications.

LoRa (Long Range) is a wireless modulation technique for long-range communications at low power. LoRaWAN (Long Range Wide Area Network) is the network protocol built on top of LoRa, defining the system architecture for IoT deployments.

DeviceDescriptionLoRa Card
KNOTIoT gateway with LoRa and BluetoothBuilt-in LoRa radio
LtAPPortable LTE/LoRa access pointBuilt-in LoRa radio
mAPLoRa-enabled access pointExternal LoRa card
  • Act as a LoRaWAN gateway for thousands of end devices
  • Support for multiple spreading factors (SF7-SF12)
  • Connect to network servers via UDP, LNS, or CUPS protocols
  • Integrate with The Things Network, The Things Stack, and AWS IoT Core
  • Configure multiple frequency plans for different regions

/iot lora

Before setting up LoRa, ensure you have:

  • MikroTik device with LoRa capability (KNOT, LtAP, or LoRa card)
  • LoRa antenna (typically 868MHz or 915MHz depending on region)
  • Network connectivity (Ethernet, LTE, or Wi-Fi)
  • RouterOS 7.x with IoT package installed
  • Account with a LoRa network server (TTN, TTS, or AWS)
  • Understanding of your regional frequency plan
  1. Power off the router
  2. Insert the LoRa card into the appropriate slot
  3. Attach the LoRa antenna
  4. Power on the router

Check that the LoRa card is detected:

/iot lora pic print

Expected output:

# NAME MODEL VERSION
0 KNOT R11e-LoRa8 v1.0

Enable the LoRa interface:

/iot lora set enabled=yes

Verify interface status:

/iot lora info print
enabled: yes
name: lora1
chip: sx1301
model: R11e-LoRa8
firmware: 1.0
temperature: 38°C

LoRa gateways connect to network servers using one of three protocols:

ProtocolPortUse Case
UDP1700Basic, non-encrypted connections
LNS8883Secure TCP connections (The Things Stack)
CUPS443Configuration updates, certificate management

The simplest way to connect is via UDP to The Things Network:

/iot lora ns add name=ttn address=eu1.cloud.thethings.network port=1700

Enable the gateway:

/iot lora ns set name=ttn enabled=yes

Verify connection:

/iot lora ns print
/iot lora stats print

For The Things Stack, use LNS protocol with authentication:

/iot lora ns add name=tts address=eu1.cloud.thethings.network port=8883 protocol=lns

Configure gateway ID and API key:

/iot lora ns set name=tts gateway-id=eui-XXXXXXXXXXXXXX api-key=XXXXX

CUPS (Concentrator UDP Protocol) provides automatic configuration:

/iot lora cups add name=cups address=eu1.cloud.thethings.network port=443 protocol=cups
/iot lora cups set name=cups gateway-id=eui-XXXXXXXXXXXXXX api-key=XXXXX

Connect to AWS IoT Core via LNS or CUPS:

/iot lora ns add name=aws address=xxxxx.lns.lorawan.eu-west-1.amazonaws.com port=8883 protocol=lns

Import AWS certificates:

/certificate import file-name=aws-cert.pem
/certificate import file-name=aws-private-key.pem passphrase=

Configure TLS:

/iot lora ns set name=aws tls=yes

Configure essential gateway parameters:

/iot lora set \
enabled=yes \
name=lora1 \
frequency-mode=EU868 \
tx-power=14 \
antenna-gain=2.5
ParameterDescriptionDefault
frequency-modeRegional band plan (EU868, US915, etc.)Device default
tx-powerTransmit power in dBm14
antenna-gainAntenna gain in dBi2.5
/iot lora set frequency-mode=EU868

Standard EU868 channels:

  • 868.0 MHz (SF12)
  • 868.1 MHz (SF12)
  • 868.3 MHz (SF12)
  • 868.5 MHz (SF7)
  • 867.0 MHz (SF9)
  • 867.5 MHz (SF9)
/iot lora set frequency-mode=US915

View configured channels:

/iot lora channel print

Add custom channels:

/iot lora channel add frequency=867100000 bandwidth=125000 spread-factor=12

Check gateway connection status:

/iot lora status print
name: lora1
gateway-id: eui-xxxxxxxxxxxx
network-server: ttns
connected-up: yes
frames-received: 1234
frames-sent: 567
rx-packets: 890
tx-packets: 234

Monitor incoming LoRa frames:

/iot lora frame receive print

Monitor transmitted frames:

/iot lora frame transmit print

View gateway statistics:

/iot lora stats print

In The Things Network console:

  1. Navigate to your gateway
  2. Check “Gateway Status” shows “Connected”
  3. Verify “Last seen” timestamp is recent
  4. Check “Uplink” and “Downlink” counters
  1. Verify network server address is correct
  2. Check firewall allows outbound port 1700 (UDP) or 8883/443 (TCP)
  3. Confirm gateway ID matches console registration
  4. Verify API key has correct permissions
/iot lora ns print
/iot lora stats print
  1. Ensure LoRa device is within range
  2. Verify device is configured with correct frequency plan
  3. Check device is joined to the network (OTAA or ABP)
  4. Review network server logs for error messages
/iot lora frame receive print
/iot lora stats print
  1. Check TX power configuration
  2. Verify antenna is properly connected
  3. Confirm device supports downlink on configured frequencies
  4. Review network server queue status
  1. Check cable connections and antenna
  2. Verify sufficient power supply
  3. Review environmental factors (interference, distance)
  4. Check for network latency issues
/ping eu1.cloud.thethings.network
/iot lora info print
  • /iot lora - Main LoRa configuration
  • /iot lora ns - Network server settings
  • /iot lora cups - CUPS configuration
  • /iot lora channel - Channel management
  • /iot lora stats - Gateway statistics
  • /iot lora frame - Frame monitoring
  • /iot lora pic - PIC management