-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't reach the child on level 3 #160
Comments
I would suggest testing with slightly modified examples or enable debugging to see what is going on for yourself: https://github.com/nRF24/RF24Network/blob/master/RF24Network_config.h#L56 |
/** Debug Options / |
Crap, the debugging output uses printf, I guess its not enabled on STM32. You could try the available libraries like LibPrintf to enable it, but I'm not sure if it will work without additional modifications due to the use of program memory related functions. ( see nRF24/RF24#414 and https://github.com/nRF24/RF24/blob/master/RF24_config.h#L155 ) |
Damn, I just came across a blog post about getting this library working on the STM33F10x. The only problem was addressing the printf problem. It was an old thread (~2016). I'll check my browser history and report back EDIT: sorry it was a dead end |
Replaced pritf with set of serial.print. Here is log of #1 Child Start 1 |
Here is log of #11 Child RF24Network/examples/helloworld_rx/ |
Ok I've made it work. Just swaped NRF modules between 011 an 0111 children. I have no clue what is the difference in that two modules. https://youtu.be/Sr2gImN_1ow |
@Avamander @diygoodies This issue is resolved. Probably a power issue related to either using batteries or using a breakout board for the nRF24L01+ (as seen in the video) -- ultimately it was a hardware problem. So, please close this issue. |
Hi I made four absolutely similar boards with stm32 bluepill and nrf24l01 onboard. And on this moment I want allign them in line and to make connection from base 00, thry child 001, then thry child 011 up to child 0111. Now I have sucsessfuly reached only level 2 chlild such as 011 and 021, level 3 and a child 0111 or 0211 stays unreached for now. The level 3 board is absolutly workable I chechked it on level 2. Here is my code examples. Please give me a advise what can be wrong.
Base
/*
Copyright (C) 2012 James Coliz, Jr. [email protected]
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
Update 2014 - TMRh20
*/
/**
*/
#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>
#define RED_led PA8
#define GRN_led PA9
#define BLU_led PA10
#define BAT_sens PA3
#define RFM_enbl PC14
#define UID_BASE 0x1FFFF7E8U // Unique device ID register base address
RF24 radio(PA0, PA4); // CE, CSN
RF24Network network(radio); // Network uses that radio
uint32_t UnitID_Part_1;
uint32_t UnitID_Part_2;
uint32_t UnitID_Part_3;
uint16_t this_node = 00; // Address of our node in Octal format
uint16_t node_array[4]={0,01,011,0111}; // Address of our node in Octal format
uint16_t other_node = 01; // Address of the other node in Octal format
uint16_t node_total_count = 03; // Node total count in Octal format
uint16_t led_blink_count = 00; // Led blink count in Octal format
const unsigned long interval = 1500; //ms // How often to send 'hello world to the other unit
unsigned long last_sent; // When did we last send?
unsigned long packets_sent; // How many have we sent already
struct payload_t { // Structure of our payload
unsigned long ms;
unsigned long counter;
};
void setup(void)
{
Serial.begin(115200);
UnitID_Part_1 = (uint32_t)(UID_BASE);
UnitID_Part_2 = (uint32_t)(UID_BASE+0x04);
UnitID_Part_3 = (uint32_t)(UID_BASE+0x08);
if (UnitID_Part_1==0x66dff56)
{
this_node = 00;
}
//delay(5000);
Serial.println("Start ");
Serial.println("UID [HEX] : "+String(UnitID_Part_1, HEX)+" "+String(UnitID_Part_2, HEX)+" "+String(UnitID_Part_3, HEX));
Serial.println("RF24Network/examples/helloworld_tx/");
pinMode(RFM_enbl, OUTPUT);
digitalWrite(RFM_enbl, HIGH);
pinMode(RED_led, OUTPUT_OPEN_DRAIN);
pinMode(GRN_led, OUTPUT_OPEN_DRAIN);
pinMode(BLU_led, OUTPUT_OPEN_DRAIN);
pinMode(BAT_sens, INPUT);
digitalWrite(RED_led, HIGH);
digitalWrite(GRN_led, HIGH);
digitalWrite(BLU_led, HIGH);
SPI.begin();
radio.begin();
network.begin(/channel/ 90, /node address/ this_node);
}
void loop() {
network.update(); // Check the network regularly
unsigned long now = millis(); // If it's time to send a message, send it!
if ( now - last_sent >= interval )
{
last_sent = now;
}
}
Child
/*
Copyright (C) 2012 James Coliz, Jr. [email protected]
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
Update 2014 - TMRh20
*/
/**
*/
#include <RF24Network.h>
#include <RF24.h>
#include <SPI.h>
#define RED_led PA8
#define GRN_led PA9
#define BLU_led PA10
#define BAT_sens PA3
#define RFM_enbl PC14
#define UID_BASE 0x1FFFF7E8U
RF24 radio(PA0, PA4); // CE, CSN
RF24Network network(radio); // Network uses that radio
uint32_t UnitID_Part_1;
uint32_t UnitID_Part_2;
uint32_t UnitID_Part_3;
uint16_t this_node = 01; // Address of our node in Octal format ( 04,031, etc)
uint16_t other_node = 00; // Address of the other node in Octal format
struct payload_t { // Structure of our payload
unsigned long ms;
unsigned long counter;
};
void setup(void)
{
Serial.begin(115200);
UnitID_Part_1 = (uint32_t)(UID_BASE);
UnitID_Part_2 = (uint32_t)(UID_BASE+0x04);
UnitID_Part_3 = (uint32_t)(UID_BASE+0x08);
if (UnitID_Part_1==0x66aff55)
{
this_node = 01;
}
if (UnitID_Part_1==0x66bff52)
{
this_node = 011;
}
if (UnitID_Part_1==0x674ff55)
{
this_node = 0111;
}
//delay(5000);
Serial.print("Start ");
Serial.println(this_node);
Serial.println("UID [HEX] : "+String(UnitID_Part_1, HEX)+" "+String(UnitID_Part_2, HEX)+" "+String(UnitID_Part_3, HEX));
Serial.println("RF24Network/examples/helloworld_rx/");
pinMode(RFM_enbl, OUTPUT);
digitalWrite(RFM_enbl, HIGH);
pinMode(RED_led, OUTPUT_OPEN_DRAIN);
pinMode(GRN_led, OUTPUT_OPEN_DRAIN);
pinMode(BLU_led, OUTPUT_OPEN_DRAIN);
pinMode(BAT_sens, INPUT);
digitalWrite(RED_led, HIGH);
digitalWrite(GRN_led, HIGH);
digitalWrite(BLU_led, HIGH);
SPI.begin();
radio.begin();
network.begin(/channel/ 90, /node address/ this_node);
}
void loop(void){
network.update(); // Check the network regularly
while ( network.available() ) { // Is there anything ready for us?
}
}
The text was updated successfully, but these errors were encountered: