LoRaWAN join spreading factor
-
Does anyone know what changes should be made to the source code of the firmware in order to hardcode SF12 during LoRaWAN join?
Maybe the AlternateDatarate() in the MLME_JOIN should be replaced with DR_0?
https://github.com/pycom/pycom-micropython-sigfox/blob/master/lib/lora/mac/LoRaMac.c#L4172
Or maybe the define of MAX_JOIN_DATARATE should be 0 at https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlora.c#L59
Or something from line 1466 to 1479 https://github.com/pycom/pycom-micropython-sigfox/blob/master/esp32/mods/modlora.c
-
I think you are right. I don't know how it was stuck in my mind that I could not change the join DR. Maybe by older topics of the forum.
Thank you!
-
@aris
Why are you trying to hardcode SF12 from the C side of things?You could just pass the dr option to LoRa.join()
lora.join(activation, auth, * ,timeout=None, dr=None)
just set dr to be your desired datarate. Check the docs page for more help:
https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.html