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

    Communication between a LoPy and several LoPys via LORA

    Scheduled Pinned Locked Moved LoPy
    lopyloralopy to lopysrelaydata origin
    2 Posts 2 Posters 935 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.
    • J Offline
      JeromeMaquoi
      last edited by

      Hello,

      I have two lopys that communicates via Lora and one of my lopy must act as a relay mast so it has to handle communication via Lora with several lopys, possibly at the same time. In fact, the relay LoPy has to be able to receive data from different LoPys and to know from which LoPy the data come. Can I do that if I start from the code below? How can I distinguish the origins of the data?

      from network import LoRa
      import socket
      import time

      lora = LoRa(mode=LoRa.LORA, frequency=863000000)
      s = socket.socket(socket.AF_LORA, socket.SOCK_RAW)
      s.setblocking(False)

      while True:
      rec = s.recv(1024) #reception of the data in bytes
      time.sleep(2)

      Thank you for your answers,

      Jérôme Maquoi

      rcolisteteR 1 Reply Last reply Reply Quote 0
      • rcolisteteR Offline
        rcolistete @JeromeMaquoi
        last edited by

        I suggest to use this Pycom LoRa-Mac nano-gateway to start with :
        LoPy Nano-Gateway Extended (Timeout and Retry)
        It was a development from the earlier version :
        LoPy Nano-Gateway

        My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

        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