rpi-lora-tranceiver icon indicating copy to clipboard operation
rpi-lora-tranceiver copied to clipboard

setting spreading factor has no effect

Open oschade opened this issue 5 years ago • 2 comments

Hello,

I changed the spreading factor in dragino_lora_app to 10:

// Set spreading factor (SF7 - SF12)
sf_t sf = SF10;

and run "make" (of course).

But this has no effect. The server still receives SF7-messages, but not SF10-messages.

oschade avatar Jan 12 '20 11:01 oschade

Hi oschade, I have the same problem. Were you able to solve it?

badjoke avatar Apr 05 '20 23:04 badjoke

Hi, I have been debugging this board for a week and there are a few issues with the code provided. Changing the SF does nothing, because they first set the registers in the setup function, and only then in the main function, they call the opmodeLora() function. But according to the manual, those registers can be set only after changing the the chip to the LoRa mode. The way they do it here in the code, you always get the default values for the three setup registers. If you want to quick fix your issue, move the opmodeLora() call from the main function into the SetupLora() function, right after setting the SLEEP state.

kubelvla avatar Aug 18 '20 19:08 kubelvla