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

    Lopy4 to Lopy4 over Lora Raw pack String

    Scheduled Pinned Locked Moved LoPy
    lopy4
    5 Posts 2 Posters 197 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.
    • W Offline
      Wolli01
      last edited by

      How can I pack this transmit string for Lora-Raw and unpack it at the receiver so that it becomes smaller?
      f3:cc:cb:97:1c:eb,-91,5,39.6875,22.325,102187,-996,-108,-76,2960,4

      Can I actually use WiFi and Lora Raw at the same time?
      Are there any sending restrictions for Lora-Raw like LoraWan?

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

        @Wolli01 You can use ustruct.pack to pack your data, it should become much smaller. Pay attention to endianness and floating point formats if deciding on a different platform, though. Also correctly pick integer sizes based on the expected ranges of the values.

        Most limitations in LoRaWAN come from regional regulations on transmit power, duty cycles, etc, so the same rules should apply (though they are not necessarily enforced by the firmware). LoRa-raw uses LBT (Listen Before Talk), however, do the rules may be somewhat different (though in theory one has to use AFA — Adaptative Frequency Agility — as well).

        Your best best to stay in the clear is to read the regulations for your market(s).

        Note that you will save a bit of overhead by avoiding LoRaWAN, but you will often end up re-implementing many of the features of LoRaWAN and end up with your own overhead instead. If you need to identify multiple senders, know if frames have been lost, handle retries, etc, you should think hard before reinventing the wheel.

        W 1 Reply Last reply Reply Quote 0
        • W Offline
          Wolli01 @jcaron
          last edited by

          @jcaron Thank you very much for this information.

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wolli01
            last edited by

            I have understood the packing so far but how do I pack the Mac address?
            Example: f3:cc:cb:97:1c:eb

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

              @Wolli01 start by checking you actually didn’t get it as bytes initially, it is often the case.

              Otherwise you can use the ˋubinascii.unhexlify` method.

              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