-
Hello all, Now I would like to turn my attention to LoRa radios using individual 'mac' addresses for the purpose of transmitting sensor data from a few hundred (over 255) nodes and only have 4/5 end receivers spread over a 20km city area. After reading every single example for Pjon I did not see any example where a node could receive and retransmit a particular message that is addressed to another node, thus creating a mesh (important for unwired communication, since distance could be a problem). The closest thing i read was Routing, but i don't think it is the same thing. So my questions are: Does each node retransmit the data until it reaches the destination receiver when using radios (LoRa)? Thanks in advance :) Rui |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Ciao @Nume1977, if you want to use the MAC feature you must define Here you find a MAC example: |
Beta Was this translation helpful? Give feedback.
-
@Nume1977 please let me know if you need any help. |
Beta Was this translation helpful? Give feedback.
Ciao @Nume1977, if you want to use the MAC feature you must define
PJON_INCLUDE_MAC
before including PJON, then you should callset_router(true)
(which forces the device to receive all packets, also if not addressed to itself) and use theforward
function to forward a packet to another device when that is received. If you use PJON in shared mode the hop count is included in the packet's meta-data, so when the maximum hop count is reached the packet is discarded (avoiding infinite loops in the network). Then it is your choice if to keep an array of known devices in each device or if using just flooding.Here you find a MAC example:
https://github.com/gioblu/PJON/tree/master/examples/ARDUIN…