Replies: 16 comments 17 replies
-
Beta Was this translation helpful? Give feedback.
-
You still have
in your platformio.ini. |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't know this |
Beta Was this translation helpful? Give feedback.
-
I guess you had replaced the fakes here uint8_t nodeDeviceEUI[8] = {+++key++++}; // Dein Device EUI
uint8_t nodeAppEUI[8] = {+++key++++}; // Dein Join EUI (App EUI)
uint8_t nodeAppKey[16] = {+++key+++}; // Dein App Key with the correct values. And set the keys before you initialize the stack Serial.print("Initializing LoRaWAN Stack...");
if (lmh_init(&lmh_callbacks, lora_param_init, doOTAA, LORAWAN_INITIAL_CLASS, LORAWAN_REGION, false) != LMH_SUCCESS) {
Serial.println("\n!!! FAILED lmh_init"); while(1);
} Serial.println(" Done.");
Serial.println("Setting LoRaWAN Keys..."); lmh_setDevEui(nodeDeviceEUI); lmh_setAppEui(nodeAppEUI); lmh_setAppKey(nodeAppKey); Serial.println("Keys set."); should be Serial.println("Setting LoRaWAN Keys..."); lmh_setDevEui(nodeDeviceEUI); lmh_setAppEui(nodeAppEUI); lmh_setAppKey(nodeAppKey); Serial.println("Keys set.");
Serial.print("Initializing LoRaWAN Stack...");
if (lmh_init(&lmh_callbacks, lora_param_init, doOTAA, LORAWAN_INITIAL_CLASS, LORAWAN_REGION, false) != LMH_SUCCESS) {
Serial.println("\n!!! FAILED lmh_init"); while(1);
} Serial.println(" Done."); |
Beta Was this translation helpful? Give feedback.
-
You have to solve the problem of the RF_SW pin. Or connect it to 3.3V for testing. |
Beta Was this translation helpful? Give feedback.
-
I am very interested in everything to do with this kit. Here is the link to seeed about the kit. All LoRa P2P, LoRaWan, both helium and TTN ( in various places around the world, LoRaWan in the USA is different than in Europe or Asia) and Meshtastic working examples should be on this site. https://wiki.seeedstudio.com/wio_sx1262_with_xiao_esp32s3_kit/ These working examples should be Seeed's responsibility. The B2B connector should mean that all connections are correct and we just need working code examples. Hopefully @rallep71 has two or more of the devices so you can check that your modules are working correctly. |
Beta Was this translation helpful? Give feedback.
-
@rallep71 That means the definition for RADIO_RXEN should be:
|
Beta Was this translation helpful? Give feedback.
-
Thank you, that was an important hint!
|
Beta Was this translation helpful? Give feedback.
-
#define LORAWAN_REGION LORAMAC_REGION_EU868 Is this the region you setup in the gateway and in TTN? |
Beta Was this translation helpful? Give feedback.
-
Just verifying.
Why are you controlling this pin from your application. The library controls all of this by itself. Same for lines like
There is no need to do this from application layer. If the settings in hw_config are correct, you should not touch that. |
Beta Was this translation helpful? Give feedback.
-
I can't debug your code. LoRaWanPio.zip I still think your pin definitions are mixed up and you are calling functions in the library that you do not have to touch. |
Beta Was this translation helpful? Give feedback.
-
Can't help anymore here. |
Beta Was this translation helpful? Give feedback.
-
Interesting, the pin out does not match their pin description. }You can try with that. I can't help much anymore. |
Beta Was this translation helpful? Give feedback.
-
I'm following up on our previous discussion (discussion #148 regarding class C with the ESP32-S3 and the Wio-SX1262 module). After a lot of further debugging and testing, I've come across a solution that now reliably enables OTAA joins and subsequent switch to class C for me. There were a few subtle issues that prevented this. The core problem and the solution: The main issue was that key timers (RxWindowTimer1, RxWindowTimer2, AckTimeoutTimer) within the LoRaMacInitialization() function (in LoRaMac.cpp) were not being initialised correctly. This happened because the code block that performs these initialisations and depends on the condition if (!region_change) was skipped. The region_change parameter was apparently passed true to LoRaMacInitialisation(). In my sketch (main.cpp) I have explicitly set the last parameter of the lmh_init() call to false:
After this parameter has been set to false in main.cpp: All timers (MacStateCheckTimer, TxDelayedTimer, RxWindowTimer1, RxWindowTimer2, AckTimeoutTimer) are initialised correctly with TimerInit() and receive unique ticker indices and their respective callback functions. In OnRadioTxDone, RxWindowTimer1 and RxWindowTimer2 are then started with the correct, initialised values (in particular valid callback pointers). The Join Accept is received (IRQ_RX_DONE is triggered and processed). The automatic switch to class C (triggered by lmh_init with request_class_c_at_start = true - this parameter must be in the correct place in the lmh_init signature of your library if it is to be used, or the switch must be made manually after the join) now also works, and LpwanConfirmClass reports the successful switch. Additional observation on the SX126xWaitOnBusy timeout: In summary: |
Beta Was this translation helpful? Give feedback.
-
@beegee-tokyo Hallo Bernd, I see LoRaMacDeviceTimeAnsHandler() is currently empty. My goal is to sync the application's clock after a join and periodically without relying solely on an application-layer downlink for the timestamp. |
Beta Was this translation helpful? Give feedback.
-
Unfortunately that is not implemented. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, maybe someone can help me, my Xiao ESP32-S3 + Wio-SX1262 Kit can't connect to TTN,
stays still when joining, what am I doing wrong, or what have I forgotten?
The pin assignment is correct, the sx1261 is initialised via spi, it goes via a b2b conector. I'll post my code.
Plattform.ini
maybe someone can help me, thanks
Beta Was this translation helpful? Give feedback.
All reactions