LOPY on a lorawan public network,
-
@lj
Set it in the init of lorasf=12
https://docs.pycom.io/chapter/firmwareapi/pycom/network/lora.htmllok also about
tx_powermax 14 on 868 and 20 in 915
lora.init(mode=LoRa.LORA, tx_power=14, sf=12) -
@livius how can help that in to one lorawan public network?
I think was about how to set radio to SF12 in lorawan mode...
-
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.
-
@chumelnicu
Sorry, too fast reading.. -
@livius .. no problem ! :)
-
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.
-
@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. -
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
-
@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 -
@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 -
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...')
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login