GrumpyOldPizza / ArduinoCore-stm32l0

Arduino Core for STM32L0
125 stars 67 forks source link

Setting spreading factor #203

Open SmolBumblebee opened 2 years ago

SmolBumblebee commented 2 years ago

Hi, is there a way for me to set the spreading factor?

I hope to get 125 bytes for the max payload; my region is AS923. I've also noticed that whenever I set the data rate, no matter what value I put, it will always print two on the serial monitor, and my max payload size remains 11. If the data rate is 2, shouldn't the max payload be 125? How do I make the max payload to be 125 bytes?

Thank you

GrumpyOldPizza commented 2 years ago

The spreading factor is set via setDataRate(). The data rate is region specific. So you need to check out the LoRaWAN spec as to what setting you want to use there.

On Mon, Jul 18, 2022 at 12:40 AM SmolBumblebee @.***> wrote:

Hi, is there a way for me to set the spreading factor?

I've also been trying to set the data rate, but no matter what value I put it will always print 2 on the serial monitor, and my max payload size remains as 11. I am hoping to get 125 bytes for the max payload.

Thank you

— Reply to this email directly, view it on GitHub https://github.com/GrumpyOldPizza/ArduinoCore-stm32l0/issues/203, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXBA7FN3CA47FWVKVJJNQLVUT37BANCNFSM533EFO3A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SmolBumblebee commented 2 years ago

Thank you so much for your fast reply; I feel so honored to get a response from GrumpyOldPizza ^_^

It turns out that I need to set ADR(false) for the setDataRate() to affect the max payload size.

Is there documentation for the code by chance? I'm a new-bee