I don't know.. I need help with RAK7268

I am currently studying about LoRa by purchasing rak7268 but I don’t know how to use gateway.
Currently, I want to send the counted value using the sensor and send it to the gateway, but if I simply match the frequency, I can’t see it in the log of the gateway?

Good night,

Did you already read the product documentation? RAK7268 WisGate Edge Lite 2

You will need some configurations in the gateway side, for example, gateway EUI, and in the endnode side, authentication mode OTAA, Device EUI, Application EUI and Application Key.

Try to do the first step to connect gateway to the LoRa Network Server, the LNS to a Application Server (like TagoIO or Cayenne LPP): RAK7268 Supported LoRa Network Servers.

We will help you in this journey :slight_smile:

Cláudio

1 Like

Hi, good morning.
I’ve read it, but the way i’m trying to do it is simply send the sensor value that the lora module reads to the lora gateway and receive it from the lora gateway.

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

//LORA SX1278
#define ss 7
#define rst 9
#define dio1 10
#define SCK 4
#define MISO 5
#define MOSI 6

//BJ300-DDT-P(PNP)
#define sensorpin 1

static long old_time;

int sensorvalue = 0;
int notsensing = 0;
int counter = 0;

//LoRa
void setup() {
Serial.begin(115200);
while (!Serial);
Serial.println(“Object count”);
SPI.begin(SCK,MISO,MOSI,ss);
LoRa.setPins(ss, rst, dio1);
if (!LoRa.begin(915E6)) {
Serial.println(“LoRa and count failed!”);
while (1);
}
Serial.println(“OK LORA SETUP SENDER END”);
}

void loop() {

sensorvalue = digitalRead(sensorpin);
Serial.println(sensorvalue);
//if(sensorvalue == 1) {
if(sensorvalue == 1 && notsensing == 0 ) {
Serial.print("count: ");
Serial.println(counter);

// send packet
LoRa.beginPacket();
LoRa.print("count: ");
LoRa.print(counter);
LoRa.endPacket();

counter++;

}
//counting
notsensing = sensorvalue;

if(millis()-old_time > 1000){
old_time= millis();
}
//if(sensorvalue == LOW && notsensing == HIGH ) {

}

I’ll put up the code just in case
If you have time, you can answer me
I hope you have a good rest of the day

I think you misunderstand how LoRaWAN works.

End Node (sensor or actuator) <===> Gateway <===> LoRaWAN server

The gateway is just a packet forwarder between the End Node and the LoRaWAN server. It cannot do anything with the data.

You can use the internal LoRaWAN server of the WisGate Edge gateways, but you still need an external integration that can process the data coming from the End Node. Configuration of the WisGate Edge for Internal LoRaWAN server ==> WisGate OS 2 User Manual | RAKwireless Documentation Center

Another solution would be the RAK7391 WisGate Connect. It is a gateway based on the Raspberry Pi CM4 module with slots for 2 concentrators. That’s what is used in the gateways to receive and send packets.
You can install the gateway functionality, the LoRaWAN server and data processing/visualization through e.g. Node Red or Grafana on the WisGate Connect as well. Everything is (relative) easy to setup with Docker.

A few pictures of my personal setup:
Docker container overview:

Chirpstack LoRaWAN server with its applications:

Grafana for data visualization:

Node RED for data processing and triggering actions, depending on the received data:

2 Likes

Thank you for your kind explanation.
If I understand correctly, it is correct that the data value of the module with sensors can not be checked on the gateway, but the gateway only serves to deliver the data to the server, right?
Um… Then I’d like to try the internal lorawan server first, but is there a manual or data check in the link?
Or a commercial example is fine.

Configuration of the WisGate Edge for Internal LoRaWAN server ==> WisGate OS 2 User Manual | RAKwireless Documentation Center

Missing in that tutorial is how to register devices on the internal LNS. Should be somewhere in our docs as well.

Oh…thanks! I’ll refer to it and try it. I’ll be back in the community anytime if I get stuck.