Node to Node communication without gatway
-
Hello,
I have two sensor nodes and I want to send data from one node to the other.
But I want to use them in an environment where is no gateway available.
I got the communication to work with the gateway.
So I can send data from the first node to the second (which is configured as a repeater).
But if I disconnect the gatway nothing works.
How do I have to configure the two nodes so that they can talk directly with each other without a gateway?node one (sender):
#define MY_NODE_ID 150
#define CHILD_ID 0 // Id of the sensor child
MyMessage msg(CHILD_ID, V_TEXT);
void presentation()
{
sendSketchInfo("Liedanzeige_Sender", "1.0");
present(CHILD_ID, S_INFO,"Lied",true);
}send Data with : "send(msg.setSensor(CHILD_ID).setDestination(151).set("Test"),true);"
node two (receiver):
#define MY_REPEATER_FEATURE
#define MY_NODE_ID 151
#include <MySensors.h>
#define CHILD_ID 0 // Id of the sensor child
MyMessage msg(CHILD_ID, V_TEXT);
void presentation()
{
sendSketchInfo("Liedanzeige_Empfang", "1.0");
present(CHILD_ID, S_INFO, "Empfänger", true);
} -
Hello,
I have two sensor nodes and I want to send data from one node to the other.
But I want to use them in an environment where is no gateway available.
I got the communication to work with the gateway.
So I can send data from the first node to the second (which is configured as a repeater).
But if I disconnect the gatway nothing works.
How do I have to configure the two nodes so that they can talk directly with each other without a gateway?node one (sender):
#define MY_NODE_ID 150
#define CHILD_ID 0 // Id of the sensor child
MyMessage msg(CHILD_ID, V_TEXT);
void presentation()
{
sendSketchInfo("Liedanzeige_Sender", "1.0");
present(CHILD_ID, S_INFO,"Lied",true);
}send Data with : "send(msg.setSensor(CHILD_ID).setDestination(151).set("Test"),true);"
node two (receiver):
#define MY_REPEATER_FEATURE
#define MY_NODE_ID 151
#include <MySensors.h>
#define CHILD_ID 0 // Id of the sensor child
MyMessage msg(CHILD_ID, V_TEXT);
void presentation()
{
sendSketchInfo("Liedanzeige_Empfang", "1.0");
present(CHILD_ID, S_INFO, "Empfänger", true);
}
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login