cancel
Showing results for 
Search instead for 
Did you mean: 

How to use LoRa E22 900T22D Module with STM32

Strager
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

View solution in original post

6 REPLIES 6
STTwo-32
ST Employee

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.

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

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

I know the values of registers comes from parameters in RF Setting app for Lora. If is it true, how can I obtain, for example what is the REG1 in these parameters?

 

C0 00 09[00 - 02 00 60 40 - 19 4B 00 00]

The 0x60 is REG0, the 0x40 is REG1

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

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?

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)
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..