Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a different SF? #3

Closed
gaijinsr opened this issue Jul 2, 2019 · 1 comment
Closed

Use a different SF? #3

gaijinsr opened this issue Jul 2, 2019 · 1 comment

Comments

@gaijinsr
Copy link

gaijinsr commented Jul 2, 2019

Hi,
in line 67 of radio-mailbox/03_lora_test/lib/RFM95/RFM95.cpp there is

//Spreading factor 7, PayloadCRC On
RFM_Write(0x1E,0xB4);

My gateway receives the packages with SF7 as expected - or rather not:
From the documentation of the chip I understand that bits 4-7 of the 1E register
(i.e. the higher hex digit) give the SF, so I would expect the SF to be B=11 and
not 7... How can I use a larger SF (for longer range)?

Best, Stefan

@gaijinsr
Copy link
Author

gaijinsr commented Jul 4, 2019

Hi, to answer my own question: I was mislead: Register 1E is set to this strange value only during initialization, when the packet is actually sent (line 243), it does
RFM_Write(0x1E,0x74); //SF7 CRC On
and there is the 7 that I expected. Changing this to 9 really makes the module use SF9.

What also took me quite some time to find out: LoRaWan jumps between channels (see lines 193ff),
so if you use a cheap 1-channel gateway with an ESP and a single RFM95, you will only receive a fraction
of the packets. By commenting out the channel hopping I was able to receive all my packets.

@gaijinsr gaijinsr closed this as completed Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant