How to properly debug Serial Gateway nRF24L01+ ?
-
Hi,
I have a problem with my serial gateway described in more detail here:
http://forum.mysensors.org/topic/797/pimatic-mysensors-controller-plugin/57
I am using the 1.5 mysensors library. And an arduino nano with a nRF24L01+ which has worked for 3 weeks before it started to do weird stuff.My question is now, how can I get some debug messages? I never get any output, apart from the
0;0;3;0;9;gateway started, id=0, parent=0, distance=0 0;0;3;0;14;Gateway startup complete.
So, I tried to add
rf24.printDetails();
in the MyTransportNRF24.cpp but it did not show anything. I also discovered
#define FAILURE_HANDLING #define SERIAL_DEBUG // #define MINIMAL
in the RF24_config.h and that it has something to do with what debug output is shown. But whatever combination of these I do, I never see any debug output.
What am I overlooking?
Thanks!
-
No one? Really? I can't get the output of
RF24 printDetails();
in my sketch.
Can anybody tell me how I can use the printDetails(); function in the SerialGateway.ino to show the radio details on the serial console? I can't get it to work... I am using the 1.5 library.
-
You might get some help from here:
http://forum.mysensors.org/topic/2461/rfm69-temperature-and-how-to-check-rfm69-is-set-to-high-power
-
@hek Thanks a lot! That really helped. Finally had time to look into it. So for other people I will try to write down what I did. I tested this for one of my sensors.
I am using Mysensors 1.5 master branch.- MyTransportNRF24: I commented out the "private:" to make the rf24 function public.
- RF24_config.h: I commented out the "#define MINIMAL" to make some more functions available in RF24.cpp.
- then I added to my sketch:
- "#include <printf.h>" in the beginning, I found the file somewhere on the net.
- in the void setup() function I added "printf_begin();" I do not fully understand this, but it seems to define stdio. Because I read in RF24.h
printf.h
/** * Print a giant block of debugging information to stdout * * @warning Does nothing if stdout is not defined. See fdevopen in stdio.h */ void printDetails(void);
- in the void loop(); I added "radio.rf24.printDetails();"
... and after several months of research it is finally printing some debug output. For example: PA Power = PA_HIGH
I wonder why this is so difficult to use and there is so little info about debugging.
Hope it helps someone!
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 26 Feb 2025, 00:32 • dpcons 26 Feb 2025, 06:22 -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
Ghost Child
Troubleshooting • 15 Mar 2025, 07:44 • FcNanoLed 18 Mar 2025, 18:36 -
JSN-SR04T-V3.0 Coax cable extended
Troubleshooting • 19 Mar 2025, 21:00 • bocalexandru 21 Mar 2025, 12:05 -
Can not compile MySensors on esp8266
Troubleshooting • 24 Aug 2024, 15:35 • TheoL 29 Aug 2024, 20:47