Node to node comunication with optional controller
-
@AWI get an error. [!MCO:SND:NODE NOT REG]
perhaps you have changed more? in you MyConfig.h maybe?@Doomic This is what I have in the sketch.. no changes in the config
// Enable debug prints to serial monitor #define MY_DEBUG #define MY_PARENT_NODE_ID 0 #define MY_NODE_ID 90 // fixed node number // Enable and select radio type attached #define MY_RADIO_NRF24 #define MY_RF24_CHANNEL 83 // 83, radio channel, default = 76 #define MY_RF24_PA_LEVEL RF24_PA_LOW // helps (sometimes) to get a stable communication #define MY_TRANSPORT_WAIT_READY_MS 1 // sketch moves on if no registration -
I don't get it.
It keep saying "NODE NOT REG"I have cleaned my sketch completly and it is now looking like below. But no progress on this.
Compared myconfig.h file.. no changes with the one on github.
removed some defines, tried all kind of combination.What am i missing?
#define MY_DEBUG #define MY_RADIO_NRF24 #define MY_RF24_CHANNEL 83 #define MY_RF24_PA_LEVEL RF24_PA_LOW #define MY_NODE_ID 21 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_REGISTRATION_RETRIES 0 #undef MY_REGISTRATION_FEATURE #define MY_TRANSPORT_WAIT_READY_MS 1 #include <SPI.h> #include <MySensors.h> MyMessage msgTest(2, V_LIGHT); void setup() { msgTest.setDestination(20); } void presentation() { sendSketchInfo("Test", "1.0"); } void loop() { Serial.println("send"); send(msgTest.set(false)); wait(3000); } -
I don't get it.
It keep saying "NODE NOT REG"I have cleaned my sketch completly and it is now looking like below. But no progress on this.
Compared myconfig.h file.. no changes with the one on github.
removed some defines, tried all kind of combination.What am i missing?
#define MY_DEBUG #define MY_RADIO_NRF24 #define MY_RF24_CHANNEL 83 #define MY_RF24_PA_LEVEL RF24_PA_LOW #define MY_NODE_ID 21 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_REGISTRATION_RETRIES 0 #undef MY_REGISTRATION_FEATURE #define MY_TRANSPORT_WAIT_READY_MS 1 #include <SPI.h> #include <MySensors.h> MyMessage msgTest(2, V_LIGHT); void setup() { msgTest.setDestination(20); } void presentation() { sendSketchInfo("Test", "1.0"); } void loop() { Serial.println("send"); send(msgTest.set(false)); wait(3000); } -
Yes i am using the newest 2.1 version. I may try to reinstall mysensors, however i dont think that is the problem.
Compiling isnt the problem, but when i run the sketch on my Arduino, It tells me trough the serial monitor that the node is not registered. (Because i doesnt have a gateway/controller nearby). Therefor it can't make calls.
-
I don't get it.
It keep saying "NODE NOT REG"I have cleaned my sketch completly and it is now looking like below. But no progress on this.
Compared myconfig.h file.. no changes with the one on github.
removed some defines, tried all kind of combination.What am i missing?
#define MY_DEBUG #define MY_RADIO_NRF24 #define MY_RF24_CHANNEL 83 #define MY_RF24_PA_LEVEL RF24_PA_LOW #define MY_NODE_ID 21 #define MY_PARENT_NODE_ID 0 #define MY_PARENT_NODE_IS_STATIC #define MY_REGISTRATION_RETRIES 0 #undef MY_REGISTRATION_FEATURE #define MY_TRANSPORT_WAIT_READY_MS 1 #include <SPI.h> #include <MySensors.h> MyMessage msgTest(2, V_LIGHT); void setup() { msgTest.setDestination(20); } void presentation() { sendSketchInfo("Test", "1.0"); } void loop() { Serial.println("send"); send(msgTest.set(false)); wait(3000); }@Doomic I have compiled (a stripped version of) you sketch and it show the behaviour I would expect. i.e. it does not loop any more but gets going. Next thing is that it cannot send messages because it did not find any node in the network where it can register. For me that is certain as I purposely set
#define MY_RF24_CHANNEL ...to a non used channel in my network.You need a gateway with the same communicaton characteristics to get communication going....
-
A gateway you say..
There is a problem.. because the gateway is connected to my pc where the controller is running.
The Gateway is not always switched on.
That is the reason why i want to use node to node communication. Not depending on anther node (gateway) to work.But why does it need a gateway?
Both nodes have a fixed id. Therefor there is nothing to register, is it?The title should be: "Node to node communication with optional
controllergateway"
Lets ask my question a litle bit different:Is it posible to only have 2 standalone nrf24/arduino devices running the mysensors library to communicate with each other.
And if there is; what should the sketches look like? -
A gateway you say..
There is a problem.. because the gateway is connected to my pc where the controller is running.
The Gateway is not always switched on.
That is the reason why i want to use node to node communication. Not depending on anther node (gateway) to work.But why does it need a gateway?
Both nodes have a fixed id. Therefor there is nothing to register, is it?The title should be: "Node to node communication with optional
controllergateway"
Lets ask my question a litle bit different:Is it posible to only have 2 standalone nrf24/arduino devices running the mysensors library to communicate with each other.
And if there is; what should the sketches look like? -
i think i finally get it.
It is impossible... well the only way to let nodes communicate with each other is when a gateway is available (directly or trough other nodes) when the node is starting up.
This forum discussion is explaining me the most..a solution may be.. transform the node that is always on to an gateway. And use antoher channel.. Sidenode; then you can't tell the controller what the status is.
Is there realy no way that this can supported? Node to node comunication without the need of an gateway inside the network? Skipping the registration and just send the message around.
perhaps i will dive into the source one day and change the registration behavior.Thanks anyway for the help and the very fast responding.