Author Topic: Find all networks  (Read 288 times)

Neko

  • Newbie
  • *
  • Posts: 34
  • Country: us
Find all networks
« on: October 17, 2018, 05:52:30 PM »
If I have two sets of nodes with different NETWORK_ID's, is there a way to detect that using a single gateway? That is, can a gateway detect all messages for all networks on a single frequency, regardless of the sender's NETWORK_ID. Sort of like promiscuous mode, but for networks, not just nodes on a single network.

Thanks

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5938
  • Country: us
    • LowPowerLab
Re: Find all networks
« Reply #1 on: October 18, 2018, 12:14:35 PM »
The variable packet mode is described in the datasheet in section 5.5.2.2, and here's the summary with my own added notes for the way it works in the RFM69 library:



The sync contains 2 bytes, one fixed byte of 0x2D and the other is the networkID. Since it's not part of the payload, it is filtered by the transceiver automatically at reception. So the answer is no, you cannot filter in software by network ID. You could however certainly add anything in the PAYLOAD part and do more filtering there.

The SYNC part can have up to 8 bytes, so the network ID could be extended to many networks, however that may be undesirable if they share the same frequency, as collisions are likely to happen especially if there is a large number of nodes on each network.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 306
  • Country: us
    • Syrinx Technologies
Re: Find all networks
« Reply #2 on: October 18, 2018, 04:07:14 PM »
I guess you could do it the "hard" way.  You could start with network ID 0 and work your way up to 254, listening for a short time on each ID and noting which ones have traffic.  You could then build an in-memory array and service just those networks.  Granted, you're probably going to lose a lot of packets when they come in and you're listening for a different network ID.

Guess it would really depend on your application.

Neko

  • Newbie
  • *
  • Posts: 34
  • Country: us
Re: Find all networks
« Reply #3 on: October 19, 2018, 12:48:31 PM »
Yes, that is what I first considered. But the nodes are being transmitted once per minute, and I have to wait for them to check in (can't ping them). To listen on each network for a full minute would take over 3 hours. I could do that, but ideally, I would like something faster.

perky

  • Hero Member
  • *****
  • Posts: 873
  • Country: gb
Re: Find all networks
« Reply #4 on: October 19, 2018, 03:58:50 PM »
Yes, that is what I first considered. But the nodes are being transmitted once per minute, and I have to wait for them to check in (can't ping them). To listen on each network for a full minute would take over 3 hours. I could do that, but ideally, I would like something faster.
If you have only have 2 networks, the simplest way might be to use a single bit in the FROM node byte in the frame to say which network it is from, and use the same network ID for both networks. Or if you've more than 128 devices on one or both networks, use a spare bit in the CTL byte to denote the network.

Mark.