RN2483 bug when trying to get last used SF?

(Kasper S) #1

Hello all,

I’m using the RN2483 for my LoRa node, and i wanted to program my node so that it could calculate how much of the duty cycle it has left every time it has sendt a message.

so i use the command: Radio get sf
but the RN2483 says it uses “sf12” almost every time, every 12th’ish time it says “sf7”.
on the server it says that the node is using “sf7”…:disappointed_relieved:

Do anyone have experienced the same, or is there a bug in the firmware, my node is v. 1.0.1.

Thanks :slight_smile:

(Arjan) #2

That’s because it has been listening for a response. See Can I tell on which channel an RN2483 has just sent?

As TTN uses SF9 for RX2, you should most often get SF9, not SF12. I assume you’re using ABP, but have not configured the downlink parameters correctly. It should be listening on SF9 for RX2.

(As an aside: if you’re thinking about using the maximum possible duty cycle, then I feel that’s a bad idea. If everyone would do that, then the number of collisions would explode, rendering the network useless, I’m afraid.)

(Kasper S) #3

I did not want to use all the duty cycle, but i just wanted to monitor how much i use.

Thanks, i will have to look in to that. :slight_smile:

(Arjan) #4

Note that TTN’s showStatus API method includes air time.

(Or maybe not any longer, as I don’t see it in the actual code.)

(Arjan) #5

it seems the code to calculate air time was removed in February. Might still help though.

(Kasper S) #6

thats also a different library then i use, i use the library from here.

I think i have to look at that and maybe use that instead, and see how it works…

Thanks, i have a lot of things to investigate now :slight_smile:

(Arjan) #7

I see the following in that code, which should set RX2 to use SF9 on 869.525 (like TTN uses), I think…

sendRawCommand(F("mac set rx2 3 869525000"));

So, when sending on SF7, RX1 should be SF7 on that very same channel, and RX2 should be SF9 on 869.525. I wonder why you’re seeing SF12 then… (Assuming you’re using ABP; for OTAA the RX2 parameters should be set automatically in the Join Accept.)

(Kasper S) #8

I am using ABP.

I now used the code radio get freq and radio get sf, and i got:


So the freq. is right, but SF is wrong for some reason…

(Arjan) #9

I can only assume that your ABP code does not invoke setFrequencyPlan. (But that’s unrelated to getting the used values for the last uplink, but I guess you understand.)