2023-12-12 12:43 PM
Hi everyone, I have a project to send a struct to receiver Lora from transmitter Lora. I have searched almost all sources to use Lora with STM32CubeIDE while using a library or not, but I couldn't send a data anyway. Can someone help me about this problem please?
Solved! Go to Solution.
2023-12-12 01:05 PM
You don't get to write the firmware, it runs in an STM8 and interface via a serial port
You want to use LoRaP2P mode?
You're going to have to use the Mx pins to put it in configuration mode, set the internal registers with the desired parameters. Then switch into an operational mode. There I think you just send serial bytes, and they go over the link
https://www.cdebyte.com/products/E22-900T22D
https://www.cdebyte.com/pdf-down.aspx?id=2349
https://www.ebyte.com/en/downpdf.aspx?id=1117
https://www.cdebyte.com/pdf-down.aspx?id=1463
2023-12-12 12:51 PM
Hello @Strager and welcome to the ST Community :smiling_face_with_smiling_eyes:.
I suggest you use the I-CUBE-LRWAN which contains examples for different boards that may help you on your project.
Best Regards.
STTwo-32
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-12-12 01:05 PM
You don't get to write the firmware, it runs in an STM8 and interface via a serial port
You want to use LoRaP2P mode?
You're going to have to use the Mx pins to put it in configuration mode, set the internal registers with the desired parameters. Then switch into an operational mode. There I think you just send serial bytes, and they go over the link
https://www.cdebyte.com/products/E22-900T22D
https://www.cdebyte.com/pdf-down.aspx?id=2349
https://www.ebyte.com/en/downpdf.aspx?id=1117
https://www.cdebyte.com/pdf-down.aspx?id=1463
2023-12-12 01:20 PM
2023-12-12 02:18 PM
C0 00 09[00 - 02 00 60 40 - 19 4B 00 00]
The 0x60 is REG0, the 0x40 is REG1
2023-12-13 01:27 PM
Thank you a lot @Tesla DeLorean and @STTwo-32 . I solved the problem. But now I can send just bytes with adress infos. The problem is to send a struct which have different 30 float and int variables. Should I open a new title for this in community?
2023-12-13 02:24 PM - edited 2023-12-13 02:27 PM
Here is fine.
A structure is just a collection of bytes in memory. Cast the structure pointer to a (uint8_t *) and use sizeof() to get it's byte count.
typedef struct _FOO {
float things[30];
int otherstuff[4];
} FOO;
FOO foo;
write((uint8_t *)&foo, sizeof(foo)); // write(uint8_t *, size_t)