Questions about LoRaMac-node for Class-B


hi brocaar !

I have some questions about Lora-net/LoRaMac-node/branch/class_b

It will be much appreciate if I can get help from you

1、I use apps\LoRaMac\classB\NucleoL073

2、the code “TimerTime_t currentTime = TimerGetCurrentTime( );”

the fuction is getting the total millisecond ?
but TimerTime_t is uint32_t
so it has a overflow problem

for example

so the currentTime will be (1527471204 *1000+469) & 0xFFFFFFFF=0xA460E875

but in LoRaMacClassBDeviceTimeAns fuction because of the total millisecond 's overflow problem

for example
when currentTime %128000=0
but systime(millisecond ) % 128 may ≠0

while the beacon will send at the time witch modulo 128 equal 0,so if I set the beacon RXwindow by “currentTime ”,the sysTime will diffrent from the gateway send the beacon

best regards !

Sorry, but I can’t / don’t give any support on the LoRaMac-node Class-B code. But maybe somebody else can give a hand here :slight_smile:

@brocaar get that

by the way, do you know when gateway send data to the class b device during ping slot ,witch frequency does the gateway choose?

I read the <lorawantm_regional_parameters_v1.1rb_-_final> but I have not find the answer

thank you !

That depends how you configure your gateway:

The frequencies used per region are documented in the Regional Parameters Specification.

thanks for your reply

I know the beacon freq

I mean the ping freq


That is up to you and will be synchronized between LoRa Server and your device using a mac-command :slight_smile: Please refer to the LoRa Server configuration: