Skip to main content
FPicc.1
Associate III
March 22, 2023
Question

How to transfer a data array via LoRa with PingPong singlecore example?

  • March 22, 2023
  • 2 replies
  • 1195 views

Hello, I'm using the SubGhz_Phy_PingPong example to transfer data via Lora from a NUCLEO stm32WL to another, but I can't figure out how I can send a data array in the main.c file to the other board.

Following the example, it has the main calling the MX_SubGHz_Phy_Process() function, that's in the app_subghz_phy.c file. However, the code that occurs the transaction between boards is in the subghz_phy_app.c, in the PingPong_Process() function.

How do I take the array that I want from main, and send it all the way to that last function to send it?

This topic has been closed for replies.

2 replies

Jay_Bolboli
Associate II
March 29, 2023

In main.c, create a function to accept your array as a parameter. Next, in subghz_phy_app.c, invoke the function and pass your array to it. Finally, copy the contents of the array to the buffer that will be transmitted. Depending on whether it's a "ping" or "pong" message.

Tesla DeLorean
Guru
March 29, 2023

You're going to have to breakdown and sequence the data so it fits withing the maximum packet size of your implementation. Then reconstruct it at the receiving end, perhaps detecting blocks of data that are missing, ie you Ping a Block# request, or range of blocks, the Pong sends those block(s) back.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..