TX_FAILED_EVENT not triggered
-
Hi everyone.
I have setup my lora.callback to to handle TX_FAILED_EVENT trigger as per examples on Pycom site. I have been trying to test using following method.
- Send command to lopy4 to uplink data to server (this works fine). I have set socket to uplink confirmed messages.
- I have set a delay of 15 seconds from receiving command to send uplink and beginning transmission.
- After seeing on the serial console that node has received command I pull the plug on my gateway before node starts transmitting.
- I expect to see that TX_FAILED_EVENT event is triggered as node will not receive any ACK from server. However it appears the event is never triggered evidenced by no messages printed to console from theTX_FAILED_EVENT.
Here is the event code below.
if events & LoRa.TX_FAILED_EVENT: print("TX Failed. ACK not received after 1 retries") print("Reset") pycom.rgbled(0xFFFFFF) lora.nvram_erase() # this should force a rejoin of network time.sleep(2.5) machine.reset() # TX failed so try and rejoin network by resettingAny help gratefully received.
Thanks
Alan -
@berryskies My bad! Stupid error (as usual?). I misread the socket.SO_CONFIRMED option. I thought this was a constant boolean and didn't set the trailing 0 to 1 (slap to forehead). All working as expected.
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