Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. How to properly debug Serial Gateway nRF24L01+ ?

How to properly debug Serial Gateway nRF24L01+ ?

Scheduled Pinned Locked Moved Troubleshooting
4 Posts 2 Posters 4.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    karl261
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      karl261
      wrote on last edited by karl261
      #2

      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.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        hek
        Admin
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • K Offline
          K Offline
          karl261
          wrote on last edited by karl261
          #4

          @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.

          1. MyTransportNRF24: I commented out the "private:" to make the rf24 function public.
          2. RF24_config.h: I commented out the "#define MINIMAL" to make some more functions available in RF24.cpp.
          3. 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!

          1 Reply Last reply
          0

          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          19

          Online

          12.0k

          Users

          11.2k

          Topics

          113.4k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular