LoPy Cannot Change DR or SF in LoRaWAN mode (always SF10, dr 0, bw 125kHz)
I'm having a lot of difficulty manually setting the data rate and spread factor with the LoPy. I'm wondering if anyone has been able to manually set dr and sf in LoRaWAN mode? I'm doing this:
lora = LoRa(mode=LoRa.LORAWAN, sf=7, region=LoRa.US915) for i in range(72): if 0 <= i < 8: print(curr) lora.add_channel(index=i, frequency=curr, dr_min=3, dr_max=3) curr += f_inc else: lora.remove_channel(i) lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_skey, app_skey)) s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
What happens is that the first 7 messages won't even be detected by the gateway. The 8th message uses sf 10 on 905.1. If I set this value on the socket itself, with
s.setsockopt(socket.SOL_LORA, socket.SO_DR, 3)
nothing is ever picked up by the gateway. BTW, I'm using TTN's US frequencies. Thanks.
robert-hh last edited by
This post is deleted!
@jcaron The Rising HF RHF301, on the frequencies described here:
So, it looks like that's
all on 125 kHz bw.
@brady-aiello what gateway are you using, and what frequencies is it listening on?