RECEIVE ERROR. P2P RAK3172

I use RAK3172-E at P2P mode. But when i recv data, i get RECEIVE ERROR.I have try remove all sensor but not work. The rate of data packet errors is quite high, about 50 to 60%.
I try to use example to receive data, but still error. Is this a hardware error or my program error?

Welcome to the forum @QuocAn

Are both sender and receiver RAK3172?
Are you running a custom code based on RUI3 or using AT commands?
How close (or far) are the two devices from each other?
What is your send interval, P2P settings and payload size?

yes,both TX and RX are rak3172.
2 devices are next to each other, sending time is 1 minute apart. Each time I send, I will send 3 frames and each frame is 5 seconds apart.
The size of each frame is 13 bytes

What SF, CR, Frequency, Preamble length, TX power?

Basically I would like to know the complete P2P setup.

This is my setting:
SF:12 - BW:0 - CR:0 - Preamble: 8 - txPower: 22
Frequency: 922500000

This is my recv-cb funtion . I’m new to rak programming, I’m not sure if my function will run correctly

If the devices are very close and you choose the highest TX power, it could cause a problem with over-saturating the RX transceiver part.
Try to lower the TX power or move the device farther away.

What antennas are you using?

I not sure about antennas, it look like this
Can you give me a recommend TX power ? Do i need setup same TX power for 2 device ?
image

TX power can be different on the two devices.
Are they both sending to each other?
If they are both sending, there might be as well a collision of data while transmitting.
Try to enable CAD (channel activity detection) with AT+CAD=1. If enabled, the transmitting device will first check if the frequency is available for transmission or if another device is already sending. If there is a transmission ongoing from another device, it will delay its own sending.

Try TX power of 5 AT+PTP=5 if the devices are that close.

Is this error due to my program? Can the receive function affect the buffer?
Because the other devices all received the packet correctly (the packet was sent from the gateway), only my device had an error.

I cannot tell you. You shared only a small part of your code and you didn’t mention that there is a LoRa P2P gateway and other nodes.

Is this RECEIVE ERROR a message from your application or is it a message you see in the debug log, but it is not generated by your code?

yes, message from debug log. I’m not generated it

Then it is not your code.

Did you try to lower the TX power and or move the receiving node farther away from your P2P gateway?

I’m trying again. It seems the error has been fixed. I will respond if the error persists. Thank you very much, you saved my life