Is there any way to read the DevEUI in program during P2P mode? Also, I see that every RAK3172 devices comes with a sticker containing deveui, does this DevEUIs are flashed during manufacturing, if not then what is the default DevEUI and is it common for every device?
The DevEUI is a unique ID, assigned during production and stored in flash. Every device has a different DevEUI.
While in P2P mode, LoRaWAN AT commands are not working.
But (inconsistent), I can retrieve the DevEUI with the API call in P2P mode from a custom firmware:
uint8_t node_device_eui[8] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
if (api.lorawan.deui.get(node_device_eui, 8) == true)
{
Serial.print("LoRaWan device EUI = 0x");
for (int i = 0; i < 8; i++)
{
Serial.printf("%02X", node_device_eui[i]);
}
Serial.println("");
}
else
{
Serial.println("LoRaWan device EUI get fail");
}
Returns in both P2P and LoRaWAN mode:
LoRaWAN mode:
10:13:17.303 --> LoRaWan device EUI = 0xAC1F09FFFExxxxxx
10:13:17.303 --> [AT_CMD] Got flag: AA
10:13:17.429 --> [AT_CMD] Got send interval: 0001D4C0
10:13:17.525 --> [AT_CMD] Send interval found 120000
10:13:17.724 --> [SETUP] Confirmed enabled
10:13:17.811 --> [SETUP] Retry = 1
10:13:17.811 --> +EVT:JOINED
10:13:17.811 --> [JOIN-CB] LoRaWan OTAA - joined!
10:13:17.811 -->
10:13:17.924 --> [SETUP] DR = 2
10:13:18.033 --> [SETUP] LINKCHECK = 0
10:13:18.160 --> Current Work Mode: LoRaWAN.
LoRa P2P mode:
10:13:32.126 --> LoRaWan device EUI = 0xAC1F09FFFExxxxxx
10:13:32.126 --> [AT_CMD] Got flag: AA
10:13:32.250 --> [AT_CMD] Got send interval: 0001D4C0
10:13:32.334 --> [AT_CMD] Send interval found 120000
10:13:32.455 --> [UPLINK] Start
10:13:32.546 --> [UPLINK] Sending 4 bytes
10:13:32.666 --> 017401A3
10:13:32.666 --> [CAD-P2P-CB] P2P CAD reports no activity
10:13:32.820 --> P2P CAD reports no activity
10:13:32.820 --> [UPLINK] P2P Packet enqueued
10:13:32.820 --> [TX-P2P-CB] P2P TX finished
10:13:32.893 --> +EVT:TXP2P DONE
10:13:32.893 --> Current Work Mode: LoRa P2P.
Thanks for your reply, I am using stm32cubeide, how can I read the DevEUI? Or is there any register from which the DevEUI can be read?
Sorry, I don’t know. I am not using STM32CubeIDE.
I can answer only for RUI3.
Maybe someone else knows.
Thanks, I will test in Arduino, in the meanwhile if I get any solution regarding the stm32cube I will update here.