Comments (15)
@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.
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.
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.
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.
It is a hardware limitation, not a software limitation.
from rf24network.
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.
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.
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.
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.
@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.
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.
It should be noted that network addresses (AKA "logical addresses") are different from the "physical addresses" used for the radios' pipes.
from rf24network.
@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.
@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.
@2bndy5 Thank you, I understand now!
from rf24network.
Related Issues (20)
- Nano 33 family not working properly HOT 5
- Only transferring 24bytes of data HOT 3
- using std::deque for external_queue? HOT 1
- Multicast on Python (Master) with Arduino-Nodes HOT 9
- NRF24 network node communication issue HOT 11
- how can clear or reset buffer? HOT 6
- ESP32 not receiving correct data from NRF24L01 HOT 4
- nrf_to_nrf.h expected for any nRF5x board in CI HOT 1
- how to support 8 pipes (on nRF5x devices) HOT 6
- enhancing radio datatype for non-nRF24 HW HOT 67
- Device can send or receive only depending on wiring HOT 14
- How to support NRF52 library? HOT 2
- It's not installing for the Arduino IDE HOT 1
- NodeMCU library HOT 4
- Unable to use the RF24 libraries with platformio since the v1.0.18 release HOT 7
- radio.setDataRate( does not seem to be setting anything HOT 5
- Multichannel networks - Separate channels for different levels HOT 4
- [Q]: How to use .write asynchronously HOT 1
- [Q] How to create multiple networks in the same area/range? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rf24network.