Solution for Setting spreading factor, power, coding rate and frequency for LoRaWAN join is mandatory.
-
In several topics, the problem of the default parameters for a join in LoRaWAN has been triggered. This one for instance: LoRawan join: operation not possible using spreading factor other than seven(?)
I concur: ADR is not at all sufficient to be rely upon to reach a network, since the gateway might only be reached using SF12 for instance. In this case, adr will never be used.
You could imagine having the default SF to 12, but in some cases, small SFs are received when bigger ones are not.A lot of our lopy's are useless because of that.
Could you consider giving us access to this functionality ?
Otherwise our only solution would be to produce our own lorawan library over the lopy lora stack. It would really be a shame.Thanks in advance !
-
@aris This topic looks quite old, and I really do hope that you have found the solution by now, but if not:
To hardcode SF12 when joining this works for us:
when joining:
self.lora.join(activation=LoRa.OTAA, auth=(self.dev_eui, self.app_eui, self.app_key), timeout=0, dr=0)After setting up the socket:
self.s.setsockopt(socket.SOL_LORA, socket.SO_DR, 0)
-
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
-
@manu True! I find that very usefull too .. .