What's the Frequency, Kenneth

Trying to be humorous, there, If you don’t get it, please look it up; funny.

I’m feeling overwhelmed with all the options I’ve waded into here. I have a goal of doing some long distance communications on a farm; longer than wifi, like a mile perhaps. i purchased a Feather M0 RFM9x and a RAK2245 Pi Hat.

I downloaded the Full app, burned it onto a microsd (done that many times on many Raspis, Odroids, etc.) I went straight for the web app, and Uh oh. Did I come to the right address?

It starts out with a menu that says chirpstack, but there’s an app that says chirpstack?

So far, I set up the concentrator with SX1301 > RAK4255 > US915 Channels 24-31 + 67 (selecting these channels because they’re in the middle - what do I know)

Then I read I should go into ChirpStack application and go to gateway. But that’s under tenant? What the heck is a tenant? Do I care, am I a tenant? I have not found a guide that explains things in simple steps. I saw some drawings and I’m trying to see where the sensor devices hook in and then I see a note; not shown here! Dangit. It’s half of what I’m looking for.

I’ve got a couple more evenings before vacation starts and i’d like to be able to set up an experimental setup that takes DHT22 on the Feather M0 w/RFM9x and send the stats every minute or so, send it to the gateway and bounce it through the MQTT server to my already installed node-red. I currently use in-building wemos d1 minis with wifi data going into my mqtt/node red setup and all that goes into grafana. Just need a gateway (expanable, I hope) to translate the LoRa traffic through to MQTT then I’ll handle it from there.

Anyway, please show me the way to the newbie’s corner or someplace where I can get a summary of:

What is a gateway? Is that my RAK2245, or is that asoftware package?
From what I’m seeing in the add gateway, there is a field that has a refresh button that generates a gateway ID. Whats that. The notice still says never connected or something like that.
Where is the RAK2245 device code and where do I put it when I find it?
What api codes, eui? codes do I need to put into my sensor code on the Feather?

Thanks for any tips,

I appreciated the title.

Have you looked at the Getting Started section of the docs?


It includes Guides like connecting a gateway, connecting a device, etc.

Here are some other more general LoRaWAN getting started guides:

1 Like

Yes I started with that documentation. A quick review as feedback and how I experienced it. Granted I’m somewhat impatient and like to get to what I need to accomplish my task. So here goes…

Introduction: useless to me
Architecture: I looked for the path, as I hoped for, in the diagrams. I want to know how my feather M0 RFM9x can be programmed to connect to a gateway (could be the raspi?) and where a gateway connects to an MQTT broker and to my Node-Red (been using it since early 2014). I did not see any of what I call devices, meaning sensors and actuators. No multi-region for me, I think so moving on.
V3 Documentation: I think I loaded latest, V4 version - did not liner here.
V3 Documentation: Breaking changes… not a problem if I never used V3. Same goes for migration,
No Docker
Quickstart Debian / Ubuntu: Interesting but looking for Raspi
Quickstart Raspi: finally getting somewhere. I decide I need Full. Just a guess really. And then divert to Chirpstack Gateway OS documentation.

Introduction - told me the same that as before; Full Base Image.
Changelog: I’ll take what I get
Image Types: I still think I need Full
Hardware Support: I see Raspi 4B & RAK 2245 - gives me confidence that I’m still on the right track.
DownLoads > Installation > Raspberry Pi > Full Balena Etcher > First Usage > Getting started
Connecting: all good, I used my pfsense firewall to find the IP and http to that address.
Flash concentrator - optional? - moving on
Configure Concentratord: I have to admit I bounced all around here. Chipset? Sent me on a wild goose chase to try to figure out what chipset my RAK2245 was using. I got frustrated and went through all the options until one indicated it supported the 2245. Channel plan? I could see the 2245 had a 915 on the heat sink label so I picked that and then something in the middle of the range; I ecall 67? Save and apply. Moving on.
Confirm Configuration: HUGE MISTAKE TO OVERLOOK THIS NOTE - My take; I just configured it so what do I know if I configured it correctly or not. I spent considerable time and effort looking for something, the Gateway ID, that was there all along; or at least after a few seconds - but I was in a hurry.
Configure ChirpStack MQTT Forwarder (optional) - do it later after I get some data flowing.
Configure ChirpStack UDP: probably not
Use? > and the content after here has disjointed documentation . Useful, I suppose, but does not move me forward to getting a gateway ready to receive data.

After this I read some online stuff and I went into the Chirpstack Application (admin:admin - good). I see there 2 main categories:
Network Server

I see some duplication in both categories. Both have
API Keys

The server has Tenants, Device Profile Templates, and Regions
The Tenant has Gateways and Applications.

I did find the ? in the upper right but that took me back to the same documentation I just went through.

With some online searching I started to realize that I needed to add a gateway. I read that I needed to go into the application and go to the gateway > add gateway.

I tried to add a gateway but I was in no way realizing this was about the same gateway I had registered in the non-application part of the web site. It took me a few ore rounds to put that together. I added, named it, described it, hen got to the GATEWAY ID. I clicked on MSB and LSB. Who knows what that means. I clicked on the refresh icon and wow. It seemed to have created a gateway id for me. I looked at the hex string and hex array; again, what it that for. 30 second intervals, sure. Submitting gave no satisfaction.

So then I went on a search for what my 2245 revealed as a gateway ID. I got out a magnifier because the writing is very small on the device to see if they written the device’s ID. Noy joy.

I went back to where I had configured the RAK2245 in the first web site, and lo-and-behold there is a value in a field named, amazingly, Gateway ID. I went back into the Chirpstack Application and applied that number to the gateway field uner Tenants, and… Nothing. Ach! Who do I need to know… an then I see a little green dot and the word, Online. Yahoo.

NEXT. To learn how to program the Feather M0 RFM9x device. and see if I can get some data through the gateway.

So sorry for the long post but it’s just my 2c about my experience with the documentation and the software… I suggest a “New to LoRa” section that gets a gateway and a device up and running and communicating for a quick win. I suspect there are those who are not so tenacious and have given up because the learning curve is steeper than most projects; and I’ve done a lot.

I my other googling, I note that the LSB and MSB are for lowest, and most significant bits and that the Hex String/Array was was something I might need in the code for the Feather?

On to the next phase of the project.

Thanks for your help.

I think this set of examples from MCCI LoRaWan LMIC, Thomas Telkamp and Matthijs Kooijman, might be a good start.

The first challenge is in trying to find the required values in Chirpstack.
DEVEUI - I found this when I added a device to an Application.
APPKEY - is this the value under the OTAA tab in the application device? Looks like it is 32 characters long.

Then the challenge is to:
get the little-endian format, least-significant-byte first for APPEUI, then same for DEVEUI, and big endian format for APPKEY.

Please, I need the FILLMEIN value locations in Chirpstack and then a format converter. Thank you.

// This EUI must be in little-endian format, so least-significant-byte
// first. When copying an EUI from ttnctl output, this means to reverse
// the bytes. For TTN issued EUIs the last bytes should be 0xD5, 0xB3,
// 0x70.
static const u1_t PROGMEM APPEUI[8]= { FILLMEIN };
void os_getArtEui (u1_t* buf) { memcpy_P(buf, APPEUI, 8);}

// This should also be in little endian format, see above.
// device eui: 4acee5b8c5b70737
static const u1_t PROGMEM DEVEUI[8]= { FILLMEIN };
void os_getDevEui (u1_t* buf) { memcpy_P(buf, DEVEUI, 8);}

// This key should be in big endian format (or, since it is not really a
// number but a block of memory, endianness does not really apply). In
// practice, a key taken from the TTN console can be copied as-is.
// 8f00d39edf5b8da6ce442e1a9987497d
static const u1_t PROGMEM APPKEY[16] = { FILLMEIN };
void os_getDevKey (u1_t* buf) { memcpy_P(buf, APPKEY, 16);}

I did find out from a response to another post that AppEUI is no JoinEUI. That helps.

My basic routine on my Feather M0 RFM9x

#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>

// LoRaWAN credentials in the required format
static const u1_t PROGMEM APPEUI[8] = {  }; // Join EUI in LSB format
static const u1_t PROGMEM DEVEUI[8] = { }; // Device EUI in LSB format
static const u1_t PROGMEM APPKEY[16] = { }; // AppKey in MSB format

void os_getArtEui(u1_t* buf) { memcpy_P(buf, APPEUI, 8); }
void os_getDevEui(u1_t* buf) { memcpy_P(buf, DEVEUI, 8); }
void os_getDevKey(u1_t* buf) { memcpy_P(buf, APPKEY, 16); }

static osjob_t sendjob;

const lmic_pinmap lmic_pins = {
    .nss = 8,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 4,
    .dio = {3, 6, LMIC_UNUSED_PIN}, // Standard pin mapping for Feather M0 with RFM9x

void onEvent(ev_t ev) {
    Serial.print(": ");
    switch (ev) {
        case EV_TXCOMPLETE:
            Serial.println(F("EV_TXCOMPLETE event"));
        case EV_JOINING:
            Serial.println(F("EV_JOINING: Joining network..."));
        case EV_JOINED:
            Serial.println(F("EV_JOINED: Joined network"));
        case EV_JOIN_FAILED:
            Serial.println(F("EV_JOIN_FAILED: Join failed"));
        case EV_RFU1:
            Serial.println(F("EV_RFU1: RFU1"));
        case EV_JOIN_TXCOMPLETE:
            Serial.println(F("EV_JOIN_TXCOMPLETE: Join Tx complete"));
        // Add other event cases here as needed
            Serial.print(F("Unhandled event: "));

void do_send(osjob_t* j) {
    // Simulated sensor data
    uint8_t simulatedData[4];
    simulatedData[0] = random(0, 100); // Simulated temperature
    simulatedData[1] = random(0, 100); // Simulated humidity

    LMIC_setTxData2(1, simulatedData, sizeof(simulatedData), 0);
    Serial.println(F("Sending simulated data..."));
    os_setTimedCallback(&sendjob, os_getTime() + sec2osticks(60), do_send);

void setup() {

void loop() {

What I see in the serial window. It says it is sending but not really, and every once in a while it hickups a join complete, but I suspect not really. I see nothing in the Chirpstack in applications, Devices, Dashboards. It says never seen. Frustration. Anyone have any clues, please.

22:15:22.073 → Sending simulated data…
22:16:22.076 → Sending simulated data…
22:17:22.105 → Sending simulated data…
22:18:22.074 → Sending simulated data…
22:19:07.037 → 1731701418: EV_JOIN_TXCOMPLETE: Join Tx complete
22:19:07.327 → 1731718981: Unhandled event: 17
22:19:22.070 → Sending simulated data…
22:20:22.067 → Sending simulated data…


in Tenants / Chirpstack / Gateways / {RAK2245}> LoRaWan frames

there is an item referencing a DevEUI. Also what is the Join Request. Is that the RAK2245 Device EUI? And is that the DevEUI I need in my Feather Mo RFM9x?

in Tenants / Chirpstack / Applications / {FirstApp} > Devices

there is a list of devices and it has a DevEUI column - is this the DevEUI I want for my Feather? It is a different number from the other DevEUI.

in in Tenants / Chirpstack / Applications / {FirstApp} / Devices / {Temp-Humidity} > OTAA Keys

there is an Application key. I think this is AppKey in the test code above.

in in Tenants / Chirpstack / Applications / {FirstApp} / Devices / {Temp-Humidity} > Configuration

there is Join EUI which I read is what was AppEUI.