Using MKR WAN as a LoRaWAN Gateway

Dear all.

I have some plans to make my own LoRaWAN Gateway.

So , one of Ideas is to try to use Arduino MKR WAN 1310 as a LoRaWAN Gateway.

Does anyone have experience in using MKR WAN 1310 as LoRaWAN Gateway? How to configure it, how to connect it to The internet for stabile connection?

Thx in advance,

Best regards,

Adnan

I made a lorawan gateway from a wemos D1 mini and an rfm95 module, so I think it should be possible with MKR WAN, but since MKR WAN has no WiFi, you will need some kind of internet connection. I think there is a MKR ethernet shield?

This would only be a single channel gateway, of course, not a "true" gateway.

The so called single channel packet forwarders are very disruptive to other users of the supported 8 channel Gateways and can cause connection issues for nearby users of standard nodes.

Only the standard 8+ channel Gateways are permitted on TTN.

Ok, thank you. I just wondering to do , what to buy... this is the sollution that I want to make:

The Things Indoor Gateway is a popular choice and low cost;

People do modify them to fit an external antenna.

For outdoor use, suggest you ask advice in the TTN forum;

I'm also trying to do LoRa peer-to-peer (P2P) communication using two MKRWAN 1310s. I got the MKRWAN LoRa info from GitHub (GitHub - sandeepmistry/arduino-LoRa: An Arduino library for sending and receiving data using LoRa radios.) but I'm having trouble to get it working. Can anyone see what I'm doing wrong? Thank you!

My script for sending is:

#include <SPI.h>
#include <LoRa.h>
#include <MKRWAN.h>

void setup() {
Serial.begin(9600);

while (!Serial);
Serial.println("LoRa Sender");
if (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
while (1); {}
}
delay(1000);
}

void loop() {
Serial.println();
Serial.println("Enter a message to send to network");
// Serial.println("(make sure that end-of-line 'NL' is enabled)");

while (!Serial.available());
String msg = Serial.readStringUntil('\n');

Serial.println();
Serial.print("Sending: " + msg + " - ");
for (unsigned int i = 0; i < msg.length(); i++) {
Serial.print(msg[i] >> 4, HEX);
Serial.print(msg[i] & 0xF, HEX);
Serial.print(" ");
}
Serial.println();

// send packet

Serial.print("Sending packet: ");
LoRa.beginPacket();
for (unsigned int i = 0; i < msg.length(); i++) {
LoRa.print(msg[i] >> 4, HEX);
LoRa.print(msg[i] & 0xF, HEX);
LoRa.print(" ");
}
LoRa.endPacket();
delay(500);
}

My script for receiving is:

#include <SPI.h>
#include <LoRa.h>
#include <MKRWAN.h>
String contents = "";

void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("LoRa Receiver");
if (!LoRa.begin(915E6)) {
Serial.println("Starting LoRa failed!");
while (1); {}
}
delay(1000);
}

void loop() {
// try to parse packet
int packetSize = LoRa.parsePacket();
if (packetSize) {
// received a packet
Serial.print("Received packet '");

// read packet
while (LoRa.available()) {  
  contents += (char)LoRa.read();
}

// print RSSI of packet
Serial.print("' with RSSI ");
Serial.println(LoRa.packetRssi());
Serial.println(contents);

}
LoRa.endPacket();
delay(500);
}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.