[SOLVED] Error sending the same information several times
I have a problem, that just started (I think) with the new upgrade (1.7.9.b1), because yesterday was working very good and this morning after upgrade the firmware stop working properly..
Basically, I have the following source code (is a basic source code to send information through lora):
lora = LoRa(mode=LoRa.LORAWAN) dev_addr = struct.unpack(">l", binascii.unhexlify('XXXXXblabla'.replace(' ',''))) nwk_swkey = binascii.unhexlify('YYYYYYYblabla'.replace(' ','')) app_swkey = binascii.unhexlify('ZZZZZblabla'.replace(' ','')) lora.join(activation=LoRa.ABP, auth=(dev_addr, nwk_swkey, app_swkey)) while not lora.has_joined(): pass soc = socket.socket(socket.AF_LORA, socket.SOCK_RAW) soc.setsockopt(socket.SOL_LORA, socket.SO_DR, 5) soc.setblocking(False) def sender(): soc.send('ping') print("send ping") time.sleep(3)
Well, if I complete the code running the sender() function:
I get always the same result in my IoT platform (LoRa Server): baa527f5. That is, I always sent the 'ping' string and get always the same data (baa527f5), so that is fine.
But If I put the sender() function in a loop, I get each time different information in my IoT backend: 25d1c825, 2352feeb, c073cbce
while True: sender()
So, how is possible sending the same information ('ping' in this case), I get different information just doing inside a loop?.
Thanks in advance and best regards.
@jmarcelino Yep, you're right. Know it works perfectly.
I did not now that a new version was released! =).
Thank you very much!
jmarcelino last edited by
Update to 1.7.1.b3, there was a problem with LoRa on the earlier build.
No one?No ideas?