Giter VIP home page Giter VIP logo

Comments (15)

luke2023 avatar luke2023 commented on June 16, 2024 2

@2bndy5 thank you so much for your answer ! I will share my project on github when I am done ! (making a low cost IOT standard for automation )

Luke lin

from rf24network.

TMRh20 avatar TMRh20 commented on June 16, 2024 2

I guess I was thinking about using the RF24 layer when I made the comment about disabling auto-ack and using the same address. Typically with RF24Network, you can also just call network.multicastLevel(1) on each device while retaining normal functionality and having a unique id for each device. Both methods will work I guess.

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024 2

Yeah, that's a much better idea that should retain normal network behavior. Here's an updated example pseudo code:

network.begin(thisNode); // pass logical address specific to the device
network.multicastLevel(1); // for all devices except master

// ...

// send to all siblings from master node
network.multicast(header, message, sizeof(message), /*level*/ 1);

from rf24network.

TMRh20 avatar TMRh20 commented on June 16, 2024 1

The radios are designed with a limited number of 'pipes' that can be assigned addresses. Typically, if you want to have more than 5 devices connected to a single device, you need to create a network with intermediate nodes passing traffic to more distant nodes, or you can disable Auto-Ack and have all of the devices using the same address and use multicast. These are the two most common scenarios.

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024 1

It is a hardware limitation, not a software limitation.

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024 1

or you can disable Auto-Ack and have all of the devices using the same address and use multicast.

example pseudo code:

const uint16_t siblings = 01; // used for all devices except master
const uint16_t master_node = 00;

network.begin(siblings); // pass `master_node` on the network master device 
radio.setAutoAck(false); // not usually recommended

// ...

// send to all siblings from master node
network.multicast(header, message, sizeof(message), /*level*/ 1);
// 1 is the network level for devices using the logical address `01`-`05`

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024 1

Disabling AutoAck with the radio object isn't guaranteed to persist after a normal network.write(). Furthermore, calling radio.setAutoAck(false) before network.write() could instigate data loss because network-acks is disabled as well.

from rf24network.

TMRh20 avatar TMRh20 commented on June 16, 2024 1

If I can remain each unique id for each device(like TMRh20 recommended) ,can 011 get the message with network.multicast( ,, /level/ 1); while 01 has dead?

Yes, as long as you call network.multicastLevel(1); on each device except master. Master can be level 0.

Or I should set every device to 01 except master?

You should set the devices as normal, each with a unique address. Then call network.multicast(header, message, sizeof(message), /*level*/ 1); when sending from master. Nodes sending to master can send to level 0.

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024 1

Yes, if you want to use the default multicast levels that are calculated when you pass the logical address to network.begin().

If you set each device to use the same multicast level with network.multicastLevel(x), then you only need to call network.multicast(..., /*level*/ x) once.

from rf24network.

luke2023 avatar luke2023 commented on June 16, 2024

@TMRh20 Thank you for your reply, do you mean if I use the same address every of my device will get the message from the master? Thank you so much !

(My possible solution: many two way communication https://www.hackster.io/lightthedreams/nrf24l01-for-communication-1-way-and-2-way-80e65c)

Luke Lin

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024

Please don't use the RF24 radio object directly when using RF24Network library! It will break the network object's behavior if you manually set the pipe addresses yourself, especially if you don't know what exactly you're doing.

TMRh20 is referring to RF24Network::multicast() which is listed in the docs as an advanced function because it requires a basic understanding of network topology (see here and here)

from rf24network.

2bndy5 avatar 2bndy5 commented on June 16, 2024

It should be noted that network addresses (AKA "logical addresses") are different from the "physical addresses" used for the radios' pipes.

from rf24network.

luke2023 avatar luke2023 commented on June 16, 2024

@2bndy5 thank you for the replay!
If I can remain each unique id for each device(like TMRh20 recommended) ,can 011 get the message with network.multicast( ,, /*level*/ 1); while 01 has dead?

Or I should set every device to 01 except master?
Thank you!

Luke Lin

from rf24network.

luke2023 avatar luke2023 commented on June 16, 2024

@TMRh20 Thank you, if I want to broadcast to all the devices, should I use
For (int i =0 ;i<5;i++){network.multicast( ,, /*level*/ i);} ? Thank you!

from rf24network.

luke2023 avatar luke2023 commented on June 16, 2024

@2bndy5 Thank you, I understand now!

from rf24network.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.