arduino-libraries / MKRWAN

An Arduino library for sending and receiving data using LoRaWAN protocol and LoRa® radios.
https://www.arduino.cc
GNU Lesser General Public License v3.0
88 stars 60 forks source link

Faster upload speeds #124

Closed Flamabalistic closed 1 year ago

Flamabalistic commented 1 year ago

I've been quite keen on using LoRaWAN for the past few months, and I've been making my own sensors and integrating them with more mainstream products. For my new project, I'm using an MKR WAN 1310 to transmit quite a large amount of data quickly. It should theoretically be possible to reach 1560B/s, however the maximum I've gotten while testing is 12.8B/s

image

To test, I've been trying to upload a packet of 64 Bytes once every 10 seconds. Then seeing how many go through

I've tried:

Is there something I'm missing? Or is the MKR WAN 1310 not built for these sorts of speeds.

Thanks, Xavier

Flamabalistic commented 1 year ago

I figured out my problem!

Not sure why, but only DR6 works reliably for me. If you're running into similar problems, the below code snippet should help. I'm still getting significantly lower than the 1.5kB/s shown, but it's enough for what I need.

modem.setADR(true); // true - disables ADR (automatic data rate) | false - enables it
modem.dataRate(6);