Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    TX_FAILED_EVENT not triggered

    Scheduled Pinned Locked Moved LoPy
    lorawanlopy4
    2 Posts 1 Posters 188 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      berryskies
      last edited by berryskies

      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.

      1. Send command to lopy4 to uplink data to server (this works fine). I have set socket to uplink confirmed messages.
      2. I have set a delay of 15 seconds from receiving command to send uplink and beginning transmission.
      3. After seeing on the serial console that node has received command I pull the plug on my gateway before node starts transmitting.
      4. 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 resetting
      

      Any help gratefully received.

      Thanks
      Alan

      B 1 Reply Last reply Reply Quote 0
      • B Offline
        berryskies @berryskies
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0

        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
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom