LOPY on a lorawan public network,
-
Hello , I am using the LOPY on a lorawan public network, my device is far away from the nearest antenna, so I 'd like to do the joint on SF12.How can I set this ?.
-
Hello bruno,
this is what I did, instead of using the exemple code, I can set and catch the timeout error hence loop while not joint.
while lora.has_joined() is not True:
try:
lora.join(activation=LoRa.OTAA, auth=(dev_eui, app_eui, app_key), timeout=20000, dr=0)
except Exception as e:
print('Not joined yet...')
-
@lj
You can " try catch" for intercept timeout exception and repet the JOIN to force DR=0.
With no timeout, join procedure use variable DR
-
@brunoS
Hello , I added dr=0 as a param of my lora.join..command , seems to works ..but setting the timeout=20000, leads to timeout error in my case, so I left it to 0 as i am using the code exemple provided in the pycom documentation.
best
-
Hello,
with something like
while lora.has_joined() is not True try lora.join(activation=LoRa.OTAA, auth=(app_eui, app_key), timeout=20000, dr=0) ....
Join is always at SF12, I verifed with spectral analyser
-
@lj
You are welcome. I believe that join attempts are sent with following sequence:
7x DR5, DR4, 7x DR5, DR3, 7x DR5, DR2, 7x DR5, DR1, 7x DR5, DR0
That means that in bad transmission conditions it may take several retries to achieve successful join.
-
I tested your proposal (Using datarate DR0) :
- effectively I don't know if this has an effect for the OTAA JOINT, but at least data are sent using SF12.
Thanks for the advice .
- effectively I don't know if this has an effect for the OTAA JOINT, but at least data are sent using SF12.
-
@livius .. no problem ! :)
-
@chumelnicu
Sorry, too fast reading..
-
Use datarate DR0:
lora_sock.setsockopt(socket.SOL_LORA, socket.SO_DR, 0)
I believe it does not apply for OTAA join, for which specific datarate sequence is pre-defined.
-
@livius how can help that in to one lorawan public network?
I think was about how to set radio to SF12 in lorawan mode...
-
@lj
Set it in the init of lorasf=12
https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.htmllok also about
tx_power
max 14 on 868 and 20 in 915
lora.init(mode=LoRa.LORA, tx_power=14, sf=12)