I’m having an issue where using psend, either in AT mode or in the arduino code returns TRUE but does not print “+EVT:TXP2P DONE”.
I have been able to make it print occasionally but doing a clean upload of the latest .hex file, then uploading my code which allows psend to work correctly on the next run, but usually fails again after a reset.
I can confirm that no LoRa packets are sent when psend return TRUE with the “+EVT:TXP2P DONE”, but do send when I get that message.
Something I noticed: trying to use AT+PSEND again without calling AT+PRECV=0 prints “AT_BUSY_ERROR” which seems to suggest that the module is still processing the previous PSEND which never completes (even after several minutes).
Same issues with the example P2P code.
I’m using RUI3 STM32 Boarss 4.2.4 in arduino
Board firmware: RUI_4.2.4_RAK3172-T
RUI API Version: 3.2.11
If you receive AT_BUSY_ERROR, it does not mean that the last PSEND is still in process. It simply means that while in RX mode, you cannot send a packet.
See AT+PRECV for options to send while RX is still active.
I can confirm that no LoRa packets are sent when psend return TRUE with the “+EVT:TXP2P DONE”, but do send when I get that message.
Confusing sentence, please clarify.
How exactly does your API call for psend look like? Are you enabling CAD?
See psend() for the different options.
Hey @beegee,
Apologies for the confusion. I’ll try explain the issue more clearly. Using psend like in the example code given in psend(). - Serial.printf(“P2P send %s\r\n”, api.lora.psend(sizeof(payload), payload)? “Success” : “Fail”);
I get the “P2P Send Success” message but no “+EVT:TXP2P DONE”.
I have observed that without the “+EVT:TXP2P DONE” message, the packet does not actually send.
I have been able to get the “+EVT:TXP2P DONE” on any of my codes immediately after using STM32CubeIDE to do a clean install of the firmware and then uploading my code. But any subsequent code uploads / or resets (including the same code that just worked) will result in the same issue of getting the “P2P Send Success” message but no “+EVT:TXP2P DONE”.
It seems like the board is getting into a stuck state that at the moment, I can only fix by doing a clean firmware install.
Is there a way to force the board to print either “+EVT:TXP2P DONE” or “+EVT:TXP2P TIMEOUT”?
yes, I did implement the TX callback but it never triggers. Also have never enabled CAD, I just ran a test where it was explicitly disabled and no different. I’ve uploaded a screenshot of what I’m seeing + the code I am running.
@param data pointer to the data with the received data
*/
void recv_cb(rui_lora_p2p_recv_t data)
{
Serial.printf(“RX-P2P-CB, P2P RX, RSSI %d, SNR %d”, data.Rssi, data.Snr);
for (int i = 0; i < data.BufferSize; i++)
{
Serial.printf(“%02X”, data.Buffer[i]);
}
Serial.print(“\r\n”);
//tx_active = false;
}