2023-05-31 06:30 AM
Hello everyone,
I am currently new to the STM32 environment.
I am working with two b-L072z-LoRaWAN modules and I would like to establish peer-to-peer Lora communication between them. My goal is to configure one of the modules as a transmitter (TX) and the other as a receiver (RX) in order to send and receive messages, thus enabling a ping-pong communication between the two modules.
I would like to know how I can modify the LoRa Ping pong program code to
make one module function as a master in transmitter mode and the other module
as a slave in receiver mode.
Any help or advice would be greatly appreciated.
2023-05-31 07:50 AM
Hello @RCELI.1 and welcome to ST Community
I advice you to take a look at the demonstration LocalNetwork . This demonstration contains 2 projects , the first implements a Concentrator sending Beacon to administrate a Network of up to 14 sensors and receives each connected Sensor's data and the second implements Sensor sending Sensor
data to the demo concentrator. this demonstration is based on the Ping Pong application with some modification to have a master in transmitter mode and the other module as a slave in receiver mode. this video can be helpful also .
Hope this is helpful .
If this is what you need , I suggest you to mention this answer as best answer so that the information will be defused.
Issam
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-05-31 08:14 AM
Strip out a lot of the junk in the switch/case statements. Most everything of consequence is in the primary loop in main()
The Listener primarily needs to be using Radio.Rx( RX_TIMEOUT_VALUE ); and restarting that after errors, timeout, or actual reception of data.
You can queue things in RxDone() callback
The Talker needs to be using Radio.Send( Buffer, BufferSize ); when it has data.
2023-06-06 03:03 AM
Thank you for your reply.
I have modified the switch/case instructions and used Radio.Rx(RX_TIMEOUT_VALUE) for listening and Radio.Send(Buffer, BufferSize) for sending data.
However, the problem persists: the RX and TX parts are not modified so that one module becomes master in transmitter mode and the other module becomes slave in receiver mode, allowing ping-pong communication between the modules.
2024-06-05 01:37 AM
Have you reached any solution I am trying to do the same thing can you please help me if you reached anything?