Skip to main content
Associate II
October 1, 2025
Solved

GPS data transmission using B-L072Z-LRWAN1

  • October 1, 2025
  • 2 replies
  • 261 views

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.

Best answer by martian_first

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.

2 replies

Andrew Neil
Super User
October 1, 2025

@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?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
martian_firstAuthorBest answer
Associate II
October 2, 2025

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.