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

    When is the TX_PACKET_EVENT interrupt triggered?

    Scheduled Pinned Locked Moved Firmware
    3 Posts 2 Posters 136 Views 2 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.
    • E Offline
      eranroll
      last edited by

      Hi,

      I am using LORA RAW communication based on a socket: socket.socket(socket.AF_LORA, socket.SOCK_RAW), with an interrupt handler for both TX_PACKET_EVENT and RX_PACKET_EVENT.

      I would like to know when is the TX_PACKET_EVENT being triggered?
      Is it once the message is transmitted or once it is inside the socket's buffer?

      • Afaik, the socket has some sort of buffer (fifo?) which stores messages when I call socket.send(msg), and LoRa messages are being transmitted from this buffer.

      Another question is, can this buffer be emptied in case I only want the last message to be sent and not in order?

      I hope I'm not missing anything with the behaviour I just described.

      Regards,
      Eran

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @eranroll
        last edited by

        @eranroll It should be easy to find out by yourself: send a few 50-byte packets at the slowest possible data rate (SF12 in the EU region for instance). Such packets will take over 1 second to send, so logging the events with timestamps should give you a pretty clear answer.

        Don't forget to report back your findings.

        1 Reply Last reply Reply Quote 3
        • E Offline
          eranroll
          last edited by

          @jcaron thanks! That is clearly a good way of doing that. How come I didn't think of it sooner? :)

          Here is what I sent:
          24 byte payload (on top of headers, CRC, etc.)
          SF12
          US915
          BW500

          The time between when I sent it to when I got the interrupt triggered is: ~460 mili seconds
          The expected time between when I sent it to when I got the interrupt triggered should be: ~450 mili seconds

          So that means that the interrupt is triggered after the entire message has been sent.

          Hopes that helps anyone.

          Regards,
          Eran

          1 Reply Last reply Reply Quote 1

          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