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

    LoRa-MAC (Raw LoRa)

    Scheduled Pinned Locked Moved LoPy
    adafruitlopyloramac
    3 Posts 2 Posters 891 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.
    • V Offline
      Vicky_
      last edited by Vicky_

      hello. I follow this tutorial to send data using LoRa MAC

      I received this:
      alt text

      how can I get rid of the b'0.1'? I want 0.1 only because I am publishing this data to cloud.

      I received this in cloud.
      alt text

      how to change this coding:

      s.setblocking(False)
      some_number = s.recv(64)
      client.publish(topic=AIO_RANDOMS_FEED, msg=str(some_number))
      

      Also I wanna ask how far it can goes? I searched but I cant find any documentation about the distance travel for LoRa-MAC.

      Any help would be appreciated. Thanks!

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Vicky_
        last edited by

        @vicky_ you can use decode to get ride of the b
        b'0.1'.decode() gets '0.1", so you code would look like

        s.setblocking(False)
        some_number = s.recv(64)
        client.publish(topic=AIO_RANDOMS_FEED, msg=some_number.decode())
        

        The distance you can achieve with Raw LoRa is the same as with LoRa-MAC, because it is a property of the RF hardware. It all depends on proper RF design of your devices box, antennas in the mote and in your gateway. So, best case are a 5-10 km outdoors, fair case is about 3km, with a sound gateway antenna outdoors, no lower limit for the worst case.

        V 1 Reply Last reply Reply Quote 0
        • V Offline
          Vicky_ @robert-hh
          last edited by

          @robert-hh Thanks! You saved my day again.

          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