Help with RF24Network and nRF24L01+

Hi again!

I've tested your suggestions but still not work.
The first attempt was to "reset" the char array setting it to '\0' in the function where I get the message:

void handle_T(RF24NetworkHeader& header)
{
  // The 'T' message is just a ulong, containing the time
  unsigned long message;

  radioMessage[0] = '\0';              ///////// <------------------------------------- HERE
  network.read(header,radioMessage,sizeof(radioMessage));

  printf_P(PSTR("[%lu] >> APP Received '%s' from 0%o   <--------\n\r"),millis(),radioMessage,header.from_node);

    // If this message is from ourselves or the base, don't bother adding it to the active nodes.
  if ( header.from_node != this_node || header.from_node > 00 )
    add_node(header.from_node);
  
}

But I still get these values:

Slave sends:
5;0;1;5100;1700;0;0;0;10;50;
Master receives:
5;0;1;5100;1700;0;0;0;0;;50;

It happens randomly. Somewhere there is a reason.

Then, I've tried a different approach. I've defined a new char array to handle incoming messages different from those I send, also, from the sketch I've added at the beginning:

char radioBuffer[40];

and then the function looks like this:

/**
 * Handle a 'T' message
 *
 * Add the node to the list of active nodes
 */
void handle_T(RF24NetworkHeader& header)
{
  // The 'T' message is just a ulong, containing the time
  unsigned long message;

  radioBuffer[0] = '\0';
  network.read(header,radioBuffer,sizeof(radioBuffer));

  printf_P(PSTR("[%lu] >> APP Received '%s' from 0%o   <--------\n\r"),millis(),radioBuffer,header.from_node);

    // If this message is from ourselves or the base, don't bother adding it to the active nodes.
  if ( header.from_node != this_node || header.from_node > 00 )
    add_node(header.from_node);
  
}

Well, now seems radioBuffer is always populated not more than a defined size of characters. Look here:

NODE0:

[12723631] >> APP Sending 0;0;1;4600;2100;0;0;0;10;50; to 00...
----------
12723635: APP Send ok
[12725639] >> APP Received '0;0;1;4600;2100;0;0;0;10' from 00   <--------

this on the same node.

And from other node, NODE5:

[12781575] >> APP Sending 5;0;1;5300;1700;0;0;0;0;4; to 00...

To NODE0

[12877550] >> APP Received '5;0;1;5300;1700;0;0;0;0;' from 05   <--------

This makes me crazy, what's wrong?

Please help :slight_smile:

Simon