Communication between a LoPy and several LoPys via LORA
-
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 timelora = 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
-
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
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