I have an “ESP32-SE Lo-Fi”
I need to use the internal antenna of this ESP to send data to a database (LoRaWan)
The dataBase is not made by me but i’m sure it works.
I have tried to use this code to send data to the LoRaWan but it tells me some error that I am not able to comprehend.
Here is my code (For some safety issue I have deleted the AppEUI, DevEUI, and APPKEY)
// Remplir avec les valeurs obtenues lors de l'enregistrement de votre appareil sur TTN
static const u1_t PROGMEM APPEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getArtEui (u1_t* buf) { memcpy(buf, APPEUI, 8);}
static const u1_t PROGMEM DEVEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevEui (u1_t* buf) { memcpy(buf, DEVEUI, 8);}
static const u1_t PROGMEM APPKEY[16] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevKey (u1_t* buf) { memcpy(buf, APPKEY, 16);}
const lmic_pinmap lmic_pins = {
.rst = 14, // GPIO14 (IO14)
.dio = {2, 15, 4}, // DIO0: GPIO2 (IO2), DIO1: GPIO15 (IO15), DIO2: GPIO4 (IO4)
Serial.println(F("Starting"));
// Initialisation de LMIC
Serial.println(F("LMIC initialized"));
// Réinitialiser l'état MAC. Les sessions et les transferts de données en attente seront annulés.
Serial.println(F("LMIC reset"));
// Désactiver la validation de la vérification de lien
LMIC_setLinkCheckMode(0);
// TTN utilise SF9 pour sa fenêtre RX2.
Serial.println(F("Data rate set"));
// Définir le débit de données et la puissance de transmission (note: txpow semble être ignoré par la bibliothèque)
LMIC_setDrTxpow(DR_SF7, 14);
Serial.println(F("Setup Complete"));
Serial.println(F("Running loop"));
delay(100); // Ajout d'un délai pour éviter de surcharger le CPU
<code>#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
// Remplir avec les valeurs obtenues lors de l'enregistrement de votre appareil sur TTN
static const u1_t PROGMEM APPEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getArtEui (u1_t* buf) { memcpy(buf, APPEUI, 8);}
static const u1_t PROGMEM DEVEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevEui (u1_t* buf) { memcpy(buf, DEVEUI, 8);}
static const u1_t PROGMEM APPKEY[16] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevKey (u1_t* buf) { memcpy(buf, APPKEY, 16);}
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 5, // GPIO5 (IO5)
.rxtx = LMIC_UNUSED_PIN,
.rst = 14, // GPIO14 (IO14)
.dio = {2, 15, 4}, // DIO0: GPIO2 (IO2), DIO1: GPIO15 (IO15), DIO2: GPIO4 (IO4)
};
void setup() {
Serial.begin(115200);
Serial.println(F("Starting"));
// Initialisation de LMIC
os_init();
Serial.println(F("LMIC initialized"));
// Réinitialiser l'état MAC. Les sessions et les transferts de données en attente seront annulés.
LMIC_reset();
Serial.println(F("LMIC reset"));
// Désactiver la validation de la vérification de lien
LMIC_setLinkCheckMode(0);
// TTN utilise SF9 pour sa fenêtre RX2.
LMIC.dn2Dr = DR_SF9;
Serial.println(F("Data rate set"));
// Définir le débit de données et la puissance de transmission (note: txpow semble être ignoré par la bibliothèque)
LMIC_setDrTxpow(DR_SF7, 14);
Serial.println(F("Setup Complete"));
}
void loop() {
Serial.println(F("Running loop"));
os_runloop_once();
delay(100); // Ajout d'un délai pour éviter de surcharger le CPU
}
</code>
#include <lmic.h>
#include <hal/hal.h>
#include <SPI.h>
// Remplir avec les valeurs obtenues lors de l'enregistrement de votre appareil sur TTN
static const u1_t PROGMEM APPEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getArtEui (u1_t* buf) { memcpy(buf, APPEUI, 8);}
static const u1_t PROGMEM DEVEUI[8] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevEui (u1_t* buf) { memcpy(buf, DEVEUI, 8);}
static const u1_t PROGMEM APPKEY[16] = { 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x, 0x };
void os_getDevKey (u1_t* buf) { memcpy(buf, APPKEY, 16);}
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 5, // GPIO5 (IO5)
.rxtx = LMIC_UNUSED_PIN,
.rst = 14, // GPIO14 (IO14)
.dio = {2, 15, 4}, // DIO0: GPIO2 (IO2), DIO1: GPIO15 (IO15), DIO2: GPIO4 (IO4)
};
void setup() {
Serial.begin(115200);
Serial.println(F("Starting"));
// Initialisation de LMIC
os_init();
Serial.println(F("LMIC initialized"));
// Réinitialiser l'état MAC. Les sessions et les transferts de données en attente seront annulés.
LMIC_reset();
Serial.println(F("LMIC reset"));
// Désactiver la validation de la vérification de lien
LMIC_setLinkCheckMode(0);
// TTN utilise SF9 pour sa fenêtre RX2.
LMIC.dn2Dr = DR_SF9;
Serial.println(F("Data rate set"));
// Définir le débit de données et la puissance de transmission (note: txpow semble être ignoré par la bibliothèque)
LMIC_setDrTxpow(DR_SF7, 14);
Serial.println(F("Setup Complete"));
}
void loop() {
Serial.println(F("Running loop"));
os_runloop_once();
delay(100); // Ajout d'un délai pour éviter de surcharger le CPU
}
I have download the “MCCI Arduino LoRaWan Library” and the “esp32” board
Here is a link to the board documentation: https://github.com/sbcshop/Lo-Fi_Software/tree/main/documents
Here is my return who loop
<code>Core 1 register dump:
PC : 0x42002258 PS : 0x00060e34 A0 : 0x82002499 A1 : 0x3fcebfa0
A2 : 0x3c030304 A3 : 0x00000035 A4 : 0x3fc95ad0 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x82002258 A9 : 0x3fcebf80
A10 : 0x3fc95ad0 A11 : 0x00000002 A12 : 0x0000000a A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000016 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff
Backtrace: 0x42002255:0x3fcebfa0 0x42002496:0x3fcebfc0 0x42001ae0:0x3fcebfe0 0x42005eea:0x3fcec010
PC : 0x403796b2 PS : 0x00060c34 A0 : 0x8200d730 A1 : 0x3fcf4360
A2 : 0x00000000 A3 : 0x420198e4 A4 : 0x00060c20 A5 : 0x00000001
A6 : 0x80000000 A7 : 0x3fc92f88 A8 : 0x8200ca3a A9 : 0x3fcf4320
A10 : 0x00000000 A11 : 0x3fc93030 A12 : 0x3fc93030 A13 : 0x00000000
A14 : 0x00060c20 A15 : 0x3fc93040 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtracx�x����x���������x����xx�x���x����xx�x�����������x��������x������x���x����xx�x���������x����������x���x�x���x����xx�x�����xx�x�xx�xx�xx�xx�xxx�xx���x��x�xxx���x�xx��x��������������x�x�xx������x����xx��x�xx�x�x�xx�x��xx�xx�x�x�x��x�x�xx�x�xx�x���ESP-ROM:esp32s3-20210327
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
load:0x3fce3818,len:0x508
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
c:UserstomwiOneDriveDocumentsArduinolibrariesMCCI_LoRaWAN_LMIC_librarysrclmicoslmic.c:53
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
<code>Core 1 register dump:
PC : 0x42002258 PS : 0x00060e34 A0 : 0x82002499 A1 : 0x3fcebfa0
A2 : 0x3c030304 A3 : 0x00000035 A4 : 0x3fc95ad0 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x82002258 A9 : 0x3fcebf80
A10 : 0x3fc95ad0 A11 : 0x00000002 A12 : 0x0000000a A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000016 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff
Backtrace: 0x42002255:0x3fcebfa0 0x42002496:0x3fcebfc0 0x42001ae0:0x3fcebfe0 0x42005eea:0x3fcec010
Core 0 register dump:
PC : 0x403796b2 PS : 0x00060c34 A0 : 0x8200d730 A1 : 0x3fcf4360
A2 : 0x00000000 A3 : 0x420198e4 A4 : 0x00060c20 A5 : 0x00000001
A6 : 0x80000000 A7 : 0x3fc92f88 A8 : 0x8200ca3a A9 : 0x3fcf4320
A10 : 0x00000000 A11 : 0x3fc93030 A12 : 0x3fc93030 A13 : 0x00000000
A14 : 0x00060c20 A15 : 0x3fc93040 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtracx�x����x���������x����xx�x���x����xx�x�����������x��������x������x���x����xx�x���������x����������x���x�x���x����xx�x�����xx�x�xx�xx�xx�xx�xxx�xx���x��x�xxx���x�xx��x��������������x�x�xx������x����xx��x�xx�x�x�xx�x��xx�xx�x�x�x��x�x�xx�x�xx�x���ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4200cdff
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
entry 0x403c9880
Starting
FAILURE
c:UserstomwiOneDriveDocumentsArduinolibrariesMCCI_LoRaWAN_LMIC_librarysrclmicoslmic.c:53
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
</code>
Core 1 register dump:
PC : 0x42002258 PS : 0x00060e34 A0 : 0x82002499 A1 : 0x3fcebfa0
A2 : 0x3c030304 A3 : 0x00000035 A4 : 0x3fc95ad0 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x82002258 A9 : 0x3fcebf80
A10 : 0x3fc95ad0 A11 : 0x00000002 A12 : 0x0000000a A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000016 EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xffffffff
Backtrace: 0x42002255:0x3fcebfa0 0x42002496:0x3fcebfc0 0x42001ae0:0x3fcebfe0 0x42005eea:0x3fcec010
Core 0 register dump:
PC : 0x403796b2 PS : 0x00060c34 A0 : 0x8200d730 A1 : 0x3fcf4360
A2 : 0x00000000 A3 : 0x420198e4 A4 : 0x00060c20 A5 : 0x00000001
A6 : 0x80000000 A7 : 0x3fc92f88 A8 : 0x8200ca3a A9 : 0x3fcf4320
A10 : 0x00000000 A11 : 0x3fc93030 A12 : 0x3fc93030 A13 : 0x00000000
A14 : 0x00060c20 A15 : 0x3fc93040 SAR : 0x0000001d EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtracx�x����x���������x����xx�x���x����xx�x�����������x��������x������x���x����xx�x���������x����������x���x�x���x����xx�x�����xx�x�xx�xx�xx�xx�xxx�xx���x��x�xxx���x�xx��x��������������x�x�xx������x����xx��x�xx�x�x�xx�x��xx�xx�x�x�x��x�x�xx�x�xx�x���ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4200cdff
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
entry 0x403c9880
Starting
FAILURE
c:UserstomwiOneDriveDocumentsArduinolibrariesMCCI_LoRaWAN_LMIC_librarysrclmicoslmic.c:53
Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).
I am really sorry for my writing skill in english and wish that you can help me.
Thanks in advance