You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in case of receiving(no transmitting job), when dio1 interrupt triggered, there are chances getPacketLength() return 0. everytime this happened the lora will stop working, no more interrupt will be triggered unless it will be reset.
Debug mode output
there are no dbg info showed up while it happend. though other info such as found chip is displayed.
therefore I write some log.
most of time, it will receive perfectly, after the dio1 interrupt is triggered
I (335159) LORA_DEVICE: operation 1 Done transmitflag0!
I (335161) LORA_DEVICE: lora 1 received message len 13 msg:0xaf 0xff 0x01 0x00 0x90 0x00 0xaf 0xfe 0x0a 0x28 0x02 0x20 0x00
but once a few hour after one interrupt hit, getPacketLength() will return 0. and it will stuck. since then no more interrupt will be trigged.
I (83884971) LORA_DEVICE: operation 1 Done transmitflag0!
W (83884971) LORA_DEVICE: lora 1 interrupt but no message
Sketch that is causing the module fail
if (operationDone[id])
{
ESP_LOGI(LORA_TAG, "operation %d Done transmitflag%d!", id, (int)transmitFlag[id]);
// reset flag
operationDone[id] = false;
if (transmitFlag[id])
{
...
}
else
{
int len = radio[id]->getPacketLength();
if (len == 0)
{
ESP_LOGW(LORA_TAG, "lora %d interrupt but no message", id);
bWaitingForReset = true;
loraError[id] = true;
return false;
}
int state = radio[id]->readData(receivebuffer[id], len);
std::stringstream sentStr;
for (size_t i = 0; i < len; i++)
{
sentStr << "0x" << std::setfill('0') << std::setw(sizeof(uint8_t) * 2) << std::hex << (int)receivebuffer[id][i] << " ";
}
ESP_LOGI(LORA_TAG, "lora %d received message len %d msg:%s", id, len, sentStr.str().c_str());
}
}
Expected behavior
it should has none 0 packetlength , and keep receiving afterwards.
Hi @trustmiao, there is a reason that there is a template when you file an issue. That reason is that we can't help you unless you fill out the whole template. So please do that first (and always)!
@trustmiao could you try to replicate this using a minimum sketch? From the snippet you have posted, I'm guessing there's a lot more behind the scenes that we don't see. Assuming the description is accurate, you should be able to trigger this using just the default interrupt receive example.
Also, since there's no debug information for the basic level, could you also include the SPI debug in the time when that issue happens?
in case of receiving(no transmitting job), when dio1 interrupt triggered, there are chances getPacketLength() return 0. everytime this happened the lora will stop working, no more interrupt will be triggered unless it will be reset.
Debug mode output
there are no dbg info showed up while it happend. though other info such as found chip is displayed. therefore I write some log.
most of time, it will receive perfectly, after the dio1 interrupt is triggered
but once a few hour after one interrupt hit, getPacketLength() will return 0. and it will stuck. since then no more interrupt will be trigged.
Sketch that is causing the module fail
Expected behavior
it should has none 0 packetlength , and keep receiving afterwards.
Additional info (please complete):
MCU: esp32 idf
Wireless module type: SX1262
Version: "7.1.0.0"
Platform: "Generic"
The text was updated successfully, but these errors were encountered: