RF24mesh - occasional 'Send Fail, Test OK' message in serial monitor


hi all! i've been trying out rf24mesh library , associated demo code on 2 mega 2560 fitted nrf24l01+ transceiver devices.

quite nice how communications works!

i see occasional 'send fail, test ok'. [this post technical, there post involving rfmesh24 library terminology, @ ....click here....].

i popped electrolytic , ceramic capacitors (for decoupling) between mega 2560 5v socket , gnd ground socket (just in case). didn't fit capacitors nrf24 devices though.

maybe other people here have used same demo code.... slave receiver code attached below.

just quick question occasional "send fail, test ok" messages. this..... slave serial monitor window shows slave sending out millis() time values well...but don't make out.

send ok: 30094
send ok: 31094
send ok: 32094
send ok: 33094
send fail, test ok
send ok: 35094
send ok: 36094
send ok: 37094


do occasional messages well?

my master , slave receivers relatively close in distance ...... 30 cm apart, , run serial speed came code.... 115200 bit per second.

i thought i'd ask this, in case can hardware or software have communications having no send fails @ all.

actually, know 'test ok' part of message means? can related 'send fail', don't know 'test ok' means here.

anyway, once again ...... rf24mesh library looks pretty good. working alright here.

thanks!



code: [select]


/** rf24mesh_example.ino tmrh20

   example sketch shows how manually configure node via rf24mesh, , send data the
   master node.
   nodes refresh network address single write fails. allows the
   nodes change position in relation each other , master node.
*/


#include "rf24.h"
#include "rf24network.h"
#include "rf24mesh.h"
#include <spi.h>
//#include <printf.h>


/**** configure nrf24l01 ce , cs pins ****/
rf24 radio(9, 53);
rf24network network(radio);
rf24mesh mesh(radio, network);

/**
   user configuration: nodeid - unique identifier each radio. allows addressing
   change dynamically physical changes mesh.

   in example, configuration takes place below, prior uploading sketch device
   unique value 1-255 must configured each node.
   stored in eeprom on avr devices, remains persistent between further uploads, loss of power, etc.

 **/
#define nodeid 1


uint32_t displaytimer = 0;

struct payload_t {
  unsigned long ms;
  unsigned long counter;
};

void setup() {

  serial.begin(115200);
  //printf_begin();
  // set nodeid manually
  mesh.setnodeid(nodeid);
  // connect mesh
  serial.println(f("connecting mesh..."));
  mesh.begin();
}



void loop() {

  mesh.update();

  // send master node every second
  if (millis() - displaytimer >= 1000) {
    displaytimer = millis();

    // send 'm' type message containing current millis()
    if (!mesh.write(&displaytimer, 'm', sizeof(displaytimer))) {

      // if write fails, check connectivity mesh network
      if ( ! mesh.checkconnection() ) {
        //refresh network address
        serial.println("renewing address");
        mesh.renewaddress();
      } else {
        serial.println("send fail, test ok");
      }
    } else {
      serial.print("send ok: "); serial.println(displaytimer);
    }
  }

  while (network.available()) {
    rf24networkheader header;
    payload_t payload;
    network.read(header, &payload, sizeof(payload));
    serial.print("received packet #");
    serial.print(payload.counter);
    serial.print(" @ ");
    serial.println(payload.ms);
  }
}

update: hi all. news.

i decided go ahead , add decoupling capacitors vcc (3.3 pin) , gnd pin of nrf24l01+ transceiver modules themselves. in case, added 100 nanofarad capacitors master , slave nrf24l01+ (across power pin , ground pin). doing has eliminated occasional sendfail messages. communications solid now.


Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > RF24mesh - occasional 'Send Fail, Test OK' message in serial monitor


arduino

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts