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

    Fixed packets to be sent in an interval

    Scheduled Pinned Locked Moved LoPy
    data ratetime measurmentlopylora socketlora range
    8 Posts 5 Posters 765 Views 5 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.
    • S Offline
      snehasg96
      last edited by

      Hello,
      To best understand the loss rates for LoRa, i am keen on sending some packets of fixed data size and transmit to the receiver over an interval.

      I can get this done for TCP sockets using the time module but for some reason the utime.time() does not seem to work for me.
      Any suggestions on how to send packets for some time in equal intervals so that can calculate the packets received at the other end and calculate the loss rates?

      1 Reply Last reply Reply Quote 0
      • P Offline
        Paul Thornton
        last edited by

        what issue are you having with utime.time() is it throwing errors or simply being inaccurate?

        1 Reply Last reply Reply Quote 0
        • S Offline
          snehasg96
          last edited by

          @paul-thornton I tested sending out packets every 5 seconds using time.sleep(5) for 2 minutes using utime.time(). It is kind of weird why the code runs once and sometimes it doesnt until the next day morning I try. Also when it runs it keeps sending packets until 20 and freezes at that point. So i have to kill the application reset and run again but would freeze again.

          My thoughts

          1. Am i violating the fair policy? I am in the USA and I dont think there exists this duty cycle regulations( I see it for EU bands but not US ones)

          2. I am sending 5 bytes every 5 seconds for a period of 2 mins. Should i modify the time parameter or something.

          Your direction will be much helpful sir.

          E 1 Reply Last reply Reply Quote 0
          • E Offline
            Eric73 @snehasg96
            last edited by

            @snehasg96 In fact LoraWAN-US915 is more restrictive than EU868, you can read it here

            In other point, please be more clear in your test setup. Do you use LoraRAW or LoraWAN ?

            Witch SF you use ?

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              snehasg96 @Eric73
              last edited by

              @eric73 Hi ! I am using LoRA RAW. here is how i initialize it..

              lora = LoRa(mode=LoRa.LORA, region=LoRa.US915)
              s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)

              When i dont specify SF does it take a default value of 6/7 ?

              bmarkusB S 2 Replies Last reply Reply Quote 0
              • bmarkusB Offline
                bmarkus @snehasg96
                last edited by

                @snehasg96 What is at the receiving end, is it a gateway with SX1301/1308 or a device?

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  snehasg96 @bmarkus
                  last edited by

                  @bmarkus I am using 2 LoPy's. The receiving end is also a lopy device with an antenna.

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    sarthak04 @snehasg96
                    last edited by

                    @snehasg96 Can you try the same thing with utime.sleep() instead? I haven't tried it myself yet, but I plan to do so.

                    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