Application EUI and general guidance

Hello, I am sorry for the low level of the question but I am new to these things, and I find it quite difficult to find myself within the documentation, basically I need to test some crypto algorithmes on a loraWan network for a school project, I have a multitech gateway and two arduinos and the goal is to encrypt messages and share them through the lorawan network, I have added the gateway through the chirpstack web interface (it remains in a state of “never seen”) and then I wrote the following code (with the help of chatgpt) and injected it to my arduino : `#include <MKRWAN.h>

LoRaModem modem;

// Replace with your network credentials
String appEui = “YOUR_APP_EUI”;
String appKey = “YOUR_APP_KEY”;

void setup() {
while (!Serial);

// Attempt to start the modem
if (!modem.begin(EU868)) {
Serial.println(“Failed to start module”);
while (1);

// Print module version
Serial.print("Your module version is: ");

// Print device EUI
Serial.print("Your device EUI is: ");

// Attempt to join the network
Serial.print("Joining network: ");
if (modem.joinOTAA(appEui, appKey)) {
Serial.println(“Successfully joined network”);
} else {
Serial.println(“Failed to join network”);
while (1);

void loop() {
// Your loop code here
I also added the arduino as a device (remains never seen aswell), I dont know where to find the application EUI to run the code. Any help of some sorts would be immense because I have received no training nor introduction to these topics and I am basically putting band aids on my project, even telling me go read the documentation (and pointing to the proper place in the documentation to look at) would be more help than I have received untill this point. thanks alot and have a wonderful evening.

To connect to the Chirpstack network your server will need to know two things about the device: 1) the devEUI (here I am assuming this is your appEUI, LoRaWAN key terminology changes a lot through the versions) and 2) the appKey. (The server also needs to know the lorawan/regional specifications the device follows but keywise those are the only two)

The devEUI/appEUI is the unique identifier of your device, typically this is just the MAC address of your device, but as long as your server and device both have the same 16 hex digit code it should work.

The appKey is the cryptographic key used to generate the session keys that are used to encrypt messages between server and device. Again, as long as the server and device have the same value here (32 hex digit code) the communication should work.

So if the arduinos MAC address is not suitable to use as the devEUI I would simply recommend the following for testing/setup:

appEUI = “0102030405060708”
appKEY = “01020304050607080910111213141516”

I’m not going to look over your device code so I can’t guarantee it will work, but what is concerning is that your gateway is not showing that it is connected. What backhaul method are you using for the Multitech gateway? UDP packet forwarder + gateway bridge on server? Could you share your chirpstack logs to see if there are any errors?