Skip to content

unable to retrive lorawan devEui #45

Closed
@naveen-79

Description

@naveen-79

Describe the bug
unable to retrive devEui set using setDevEui.

To Reproduce

#include <STM32LoRaWAN.h>

STM32LoRaWAN modem;

String appEUI_Set = "7649FC09A028FE04";
String devEUI_Set = "9A0684E16B882E92";
String appKey_Set = "E236B8E7D41F0B8966285798925BA7A6";

void setup() {
  Serial.begin(115200);
  pinMode(LED_BUILTIN, OUTPUT);

  modem.begin(IN865);

  // Set LoRaWAN credentials
  if (modem.setDevEui(devEUI_Set)) {
    Serial.println("DevEUI successfully set!");
  } else {
    Serial.println("Failed to set DevEUI!");
  }
  modem.setAppEui(appEUI_Set);
  modem.setAppKey(appKey_Set);

  // Attempt to join OTAA
  // if (modem.joinOTAA()) {
  //   Serial.println("Join OTAA success!");
  // } else {
  //   Serial.println("Join OTAA failed!");
  // }

  delay(1000);

  String devEUI;
  modem.getDevEui(&devEUI);
  Serial.print("DevEUI: ");
  Serial.println(devEUI);
}

void loop() {
  digitalToggle(LED_BUILTIN);
  delay(1000);
}

Expected behavior
Serial Output

DevEUI successfully set!
DevEUI: B1C4E90005012038

expected output 9A0684E16B882E92. got B1C4E90005012038

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows 11
  • Arduino IDE version: 2.3.3
  • STM32 core version: 2.9
  • Library version: 0.2.0
  • Tools menu settings if not the default:
  • Upload method: swd

Hardware (please complete the following information):

  • Board Name: Wio-E5-Mini
  • Hardware Revision: [e.g. Rev B]
  • Extra hardware used if any:

Additional context
https://github.com/orgs/stm32duino/discussions/2581#discussion-7557324

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions