Closed ABHITHLALC closed 7 months ago
There could be a problem with the connection to between the ESP32 and the SX1262
W (2434) SX1262: [SX126xWaitOnBusy] Timeout waiting for BUSY pin to be low
Says that BUSY pin of the SX1262 is never seen to go low. Either the pin assignment is wrong or the power supply of the SX1262 is wrong.
Another thing is AppEUI all zeros. While TTN states that this is ok, it is not good to do it and I have seen problems with other LNS when the AppEUI is all zeros.
Third thing, do you see the join request packet on the gateway log or on the LNS log?
Says that BUSY pin of the SX1262 is never seen to go low. Either the pin assignment is wrong or the power supply of the SX1262 is wrong.
This is the logic analyzer screenshot. which shows the BUSY pin state changes. But the DI01 pin(ISR) is always low.
The Arduino code(arduino IDE) on same hardware setup.
Another thing is AppEUI all zeros. While TTN states that this is ok, it is not good to do it and I have seen problems with other LNS when the AppEUI is all zeros.
Yes, It is not good to have all zero's in AppEUI. But this is for testing purpose. I've sent LoRa messages to the same TTN device with the same credentials using Arduino code.
Third thing, do you see the join request packet on the gateway log or on the LNS log?
No, there is nothing on Gateway Log and the TTN console
EU868 is what you want to use? That's what I see in the logs. I don't see a TX finished IRQ callback in the logs, only TX timeout. Do you call lmh_join()?
Yes, I am calling lmh_join() in main.c
void app_main()
{
uint32_t ret;
ret = lora_hardware_init();
if(ret != ESP_OK)
{
ESP_LOGE("LORA","Lora hardware init failed - %d", ret);
}
ret = timers_init();
if(ret != ESP_OK)
{
ESP_LOGE("LORA","timers_init failed - %d", ret);
}
lmh_setDevEui(nodeDeviceEUI);
lmh_setAppEui(nodeAppEUI);
lmh_setAppKey(nodeAppKey);
ret = lmh_init(&lora_callbacks, lora_param_init, true, CLASS_A, LORAMAC_REGION_EU868);
if(ret != ESP_OK)
{
ESP_LOGE("LORA","Lmh initialisation failed init failed - %d", ret);
}
if (!lmh_setSubBandChannels(1))
{
ESP_LOGE("LORA","lmh_setSubBandChannels failed. Wrong sub band requested?");
}
/*Joining process starts*/
lmh_join();
send_lora_frame();
}
If you do not see packets in the Gateway, it could be the antenna switch control is not correct, the antenna is not connected correct or damaged. Difficult to say. Do you have an SDR to check whether there is really a signal sent by the device?
Sorry I don't have SDR. Is there any other methods to test and verify?
You could try to measure the power consumption of the device. You should see a significant peak in the current (~100mA) while the SX1262 is transmitting. But for that you need a good instrument as well, like the PPK2 (Nordic Power Profile Kit II)
Thank you, Unfortunately I don't have access to that also.
Would you be able to share your port to the ESP-IDF? I have the same LoRa module as you and I am trying to get it to work with an ESP32 C6.
I am sorry, I have no experience with ESP-IDF, I never used it. I cannot help with the porting.
My comment was more to @ABHITHLALC :) Perhaps I can help him with the porting if he like to share his current progress.
Hi @beegee-tokyo I am reaching out to seek assistance with an issue I am encountering while attempting to integrate the SX1262 LoRa module with the ESP-IDF framework. I have been working on porting the SX126x-Arduino library to the ESP-IDF platform for use with an ESP32 microcontroller. While I have successfully ported and built the code, I am experiencing difficulties establishing communication with the network server. The SX1262 module is failing to join the network server, Despite following the configuration steps outlined in the documentation, including setting the correct SyncWord and channel frequencies, the module fails to establish a connection.
Troubleshooting Steps Taken:
Despite these efforts, I have been unable to resolve the issue and would greatly appreciate any guidance or assistance your team can provide. If possible, I would appreciate any suggestions for troubleshooting steps or configuration adjustments to achieve successful communication with the network server.
Hardware: ESP32 microcontroller with the Waveshare SX1262 LoRa module. Software: ESP-IDF framework version 4.4.1 and SX1262-Arduino library by beegee-tokyo. Relevant Code Snippets: I can provide excerpts from the ESP-IDF code and configuration files upon request.
The LOG from ESP-IDF code:
Thank you for your attention to this matter. I am looking forward to your prompt assistance in resolving this issue and achieving successful integration of the SX1262 module with the ESP-IDF platform.