2025-09-30 7:53 PM - last edited on 2025-10-01 1:57 AM by Andrew Neil
I am trying to send GPS data using B-L072Z-LRWAN1. I use PingPong project and changed the PingPong_Process as follows.
static void PingPong_Process(void) {
Radio.Sleep();
memcpy(BufferTx, tempBuffer, sizeof(tempBuffer) - 1);
Radio.Send(BufferTx, PAYLOAD_LEN);
}
"tempBuffer" contains a portion of the GPS data. When I receive data on another B-L072Z-LRWAN1 and view it in TeraTerm, it appears to be capturing GPS data. However, data reception stops after a few minutes. Sometimes it stops after one minute, while other times it continues for about 20 minutes. I can send text data using same B-L072Z-LRWAN1 without problem. However, errors occur when sending and receiving GPS data.
Edited to apply source code formatting - please see How to insert source code for future reference.
Solved! Go to Solution.
2025-10-02 1:00 AM
I checked the code. I found another place where memcpy was used, so I fixed it there and the error disappeared. Thank you very much.
2025-10-01 2:03 AM - edited 2025-10-01 2:09 AM
@martian_first wrote:data reception stops after a few minutes
Is it just the reception that stops, or also transmission ?
@martian_first wrote:However, errors occur when sending and receiving GPS data.
What errors, exactly ?
@martian_first wrote:I can send text data using same B-L072Z-LRWAN1 without problem. .
What, exactly, do you mean by that? Fixed, literal text strings?
Stuff that works for "a while", then breaks always smells of buffer problems - overrun, memory leaks, etc ...
PS:
Your memcpy uses the actual length of some buffer:
memcpy(BufferTx, tempBuffer, sizeof(tempBuffer) - 1);
But then the Radio.Send just uses a fixed length:
Radio.Send(BufferTx, PAYLOAD_LEN);
Are you sure that's right?
2025-10-02 1:00 AM
I checked the code. I found another place where memcpy was used, so I fixed it there and the error disappeared. Thank you very much.