P2P API not working on 3172

I have two RAK3172 setup. I am able to get one to transmit and the other to receive using the LoRa P2P AT command example in the quickstart document

ATE
AT+NWM=0
AT+P2P=915000000:7:125:0:10:14
AT+PRECV=65534 (on the receiving unit)
AT+PSEND=112233 (on the sending unit)

A couple observations:
Whether I use 65535 or 65534 on the receiving unit, I have to send the command again after each message is received, 65534 does NOT seem to stay in RX after a message is received.
The BW value in the example is using the “125” value but it looks like it may have been changed in the later version and requires the index value (ex. 0)

When I try to run the LoRa P2P Arduino API example code (Kongduino) it does not work.
It seems like the send_cb (send callback function) is never called - I assume it should be after each message is transmitted.
Even if I move that code into the loop so it is executed after each successful psend, it still does not work.

I have also written some simplified test code to set up one unit to transmit at a regular interval and the other to only receive.
Here is a sample output from the Transmitting unit:

RAKwireless LoRaWan P2P Example

P2P Start
Hardware ID: stm32wle5xx
Model ID: rak3172T
RUI API Version: 3.2.6
Firmware Version: RUI_4.0.5_RAK3172-T
AT Command Version: 1.5.10
Set P2P mode frequency 915.000: Success
Set P2P mode spreading factor 7: Success
Set P2P mode bandwidth 0: Success
Set P2P mode code rate 4/5: Success
Set P2P mode preamble length 10: Success
Set P2P mode tx power 14: Success
Current Work Mode: LoRa P2P.
P2P send Success
P2P send Success
P2P send Success
P2P send Success

Here is a sample output from the receiving unit:

RAKwireless LoRaWan P2P Example

P2P Start
Hardware ID: stm32wle5xx
Model ID: rak3172T
RUI API Version: 3.2.6
Firmware Version: RUI_4.0.5_RAK3172-T
AT Command Version: 1.5.10
Set P2P mode frequency 915.000: Success
Set P2P mode spreading factor 7: Success
Set P2P mode bandwidth 0: Success
Set P2P mode code rate 4/5: Success
Set P2P mode preamble length 10: Success
Set P2P mode tx power 14: Success
P2P set Rx mode Success
Current Work Mode: LoRa P2P.
+EVT:RXP2P RECEIVE TIMEOUT
Empty buffer.
P2P set Rx mode Success
+EVT:RXP2P RECEIVE TIMEOUT
Empty buffer.
P2P set Rx mode Success
+EVT:RXP2P RECEIVE TIMEOUT
Empty buffer.
P2P set Rx mode Success
+EVT:RXP2P RECEIVE TIMEOUT
Empty buffer.
P2P set Rx mode Success
+EVT:RXP2P RECEIVE TIMEOUT
Empty buffer.

Can anyone please tell me what I am missing.

One other note is that if I don’t include the api.lorawan.precv(0); line before each time I psend, it gives a fail error - only works the first time.

TX_TEST_REV0.ino (2.5 KB)

RX_TEST_REV0.ino (2.7 KB)

Solved. I had the RAK3172-T board selected. Needed to use the RAK3172 Evaluation Board option.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.