# Connection between Arduino and Robustel Gateway via LoRa

**URL:** <https://forum.arduino.cc/t/connection-between-arduino-and-robustel-gateway-via-lora/1315192>\
**Category:** Networking, Protocols, and Devices\
**Created:** [October 25, 2024, 2:32pm UTC](https://forum.arduino.cc/t/connection-between-arduino-and-robustel-gateway-via-lora/1315192 "2024-10-25T14:32:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasbrandi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/lucasbrandi/32/1098908_2.png) [@lucasbrandi](https://forum.arduino.cc/u/lucasbrandi)\
**Post date:** [October 25, 2024, 2:32pm UTC](https://forum.arduino.cc/t/connection-between-arduino-and-robustel-gateway-via-lora/1315192/1 "2024-10-25T14:32:20Z")

</div>

Hello everyone,

I am trying to establish a direct connection between my **Arduino MKR 1310** and a **Robustel R3000-LG4LA Gateway** using **LoRa** , without using the Internet or the **LoRaWAN** network. My goal is to send messages from the Arduino to the gateway and be able to view them directly on the gateway. I’m not using the Internet or network for now because this is the initial phase of a project, where the goal is to keep communication over the air (OTA) for the time being.

**Current Setup:**

- **Hardware** :
  - Arduino MKR 1310 with LoRa module
  - Robustel R3000-LG4LA Gateway

- **Software on Robustel R3000-LG4LA Gateway** :
  - Firmware version 5.2.9
  - Installed applications:
    - Loriot version 5.0.1
    - Rcms version 5.2.0

- **Frequency** : Both devices are set to operate at **868 MHz**.
- **LoRa Parameters** :
  - **Bandwidth** : 125 kHz
  - **Spreading Factor** : 7 (I have tried values from 7 to 12)

**Issues Encountered:**

- **No Communication** : Despite both devices being set with the same parameters, I am unable to establish communication between the Arduino and the gateway.
- **No Message Display** : I cannot see the messages sent from the Arduino on the gateway’s monitor.

**Questions:**

1. Are there any specific settings I need to configure on the gateway to receive data directly from the Arduino?
2. How can I check if the signal is being correctly sent from the Arduino?
3. Are there any code examples or configurations that might help me solve this issue?

The code I am currently using on my Arduino board is as follows.

Any help or advice would be greatly appreciated. Thank you in advance!

```arduino
#include <SPI.h>
#include <LoRa.h>

int counter = 0;
bool runProgram = true; // Variable para controlar la ejecución del envío de paquetes
bool loraInitialized = false; // Variable para verificar la inicialización de LoRa

void setup() {
  Serial.begin(9600);
  while (!Serial); // Espera hasta que se inicie el puerto Serial

  Serial.println("LoRa Sender");

  // Inicializa LoRa con la frecuencia correcta (868 MHz para Europa, 915 MHz para Norteamérica)
  if (!LoRa.begin(868E6)) {
    Serial.println("Starting LoRa failed!");
    while (1);
  } else {
    loraInitialized = true; // Marca como inicializado
  }

  // Configuración adicional de LoRa
  LoRa.setSpreadingFactor(7); // Spreading Factor entre 7 y 12
  LoRa.setSignalBandwidth(125E3); // Bandwidth (125 kHz es lo más común)

  // Muestra en el monitor serial los parámetros de configuración solo si LoRa fue inicializado correctamente
  if (loraInitialized) {
    Serial.println("LoRa initialized with the following parameters:");
    Serial.println("Spreading Factor: 7");
    Serial.println("Signal Bandwidth: 125 kHz");
  }
}

void loop() {
  // Control del programa a través de comandos seriales
  if (Serial.available() > 0) {
    char command = Serial.read(); // Lee el comando desde el Monitor Serie
    if (command == 's') { // 's' para detener el programa
      runProgram = false;
      Serial.println("Sending paused");
    }
    if (command == 'r') { // 'r' para reanudar el programa
      runProgram = true;
      Serial.println("Sending resumed");
    }
  }

  // Solo envía los paquetes si el programa está corriendo y LoRa fue correctamente inicializado
  if (runProgram && loraInitialized) {
    String message = "Message from Arduino, packet # " + String(counter);
    
    Serial.print("Sending packet: ");
    Serial.println(message); // Muestra en el monitor serial el mensaje que se va a enviar

    // Inicia el paquete de LoRa
    LoRa.beginPacket();
    LoRa.print(message); // Envía el mensaje
    LoRa.endPacket(); // Finaliza el paquete y lo envía

    counter++; // Incrementa el contador para que cada mensaje sea único
  }

  delay(5000); // Espera 5 segundos antes de enviar el siguiente paquete
}

```

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [October 25, 2024, 3:36pm UTC](https://forum.arduino.cc/t/connection-between-arduino-and-robustel-gateway-via-lora/1315192/2 "2024-10-25T15:36:55Z")

</div>

> [@lucasbrandi](#):
>
> Robustel R3000-LG4LA Gateway

Have you checked with Robustel if their **LoRaWAN** Gateway can be configured to accept the basic **PTP (point to point)** LoRa packets that your sending from the MKR1310 ?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [April 23, 2025, 3:37pm UTC](https://forum.arduino.cc/t/connection-between-arduino-and-robustel-gateway-via-lora/1315192/3 "2025-04-23T15:37:33Z")

</div>

Closed on April 23, 2025, 3:37pm UTC

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