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. Nothing on serial monitor on MySensor sketches

Nothing on serial monitor on MySensor sketches

Scheduled Pinned Locked Moved Troubleshooting
18 Posts 3 Posters 7.7k 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.
  • H Offline
    H Offline
    hooraysimpsons
    wrote on last edited by
    #9

    If the issue was a bad radio would there still be some kind of output on the serial monitor or would the failure to connect to the gateway cause an issue that prevents the remainder of the code from executing and giving an output?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hooraysimpsons
      wrote on last edited by
      #10

      If I replace gw.begin() with the below line of code and continue to comment out the remainder of the gw lines I can get the light output on the serial monitor.

      void begin(void (* msgCallback)(const MyMessage &)=NULL, uint8_t nodeId=AUTO, boolean repeaterMode=false, uint8_t parentNodeId=AUTO, rf24_pa_dbm_e paLevel=RF24_PA_LEVEL, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE);

      My understanding is the gw.begin() and that line of code should be equivalent. I've coded in the past with Fortran but not for years so I may be missing something obvious here.

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by hek
        #11

        Sorry meant you could edit begin() (not setup) in MySensor.cpp to lower the serial baudrate above if you have problem with the serial line at high speeds.

        You should at least get a startup message if you have DEBUG enabled in MyConfig.h.

        Remve Serial.begin(9600); from your sketch and use the baudrate you use /set in begin().

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hooraysimpsons
          wrote on last edited by
          #12

          #define BAUD_RATE 9600 is already placed in mysensors.h.

          I don't see any reference to baud rate or starting the serial output in the begin function in mysensors.h

          That is why I added serial.begin(9600) to the sketch to see if that helped. It didn't but I left it in so that it would be started when I commented out the gw.begin

          1 Reply Last reply
          0
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by hek
            #13

            Set it here:
            https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.h#L38

            Which affects this line:
            https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L36

            1 Reply Last reply
            0
            • H Offline
              H Offline
              hooraysimpsons
              wrote on last edited by
              #14

              I forgot about the .cpp files. Did I tell you I was new to this?

              So by placing serial.println commands in my mysensors.cpp file I have identified where things seem to get stuck:

              Within the findparentnode routine:

              Serial.println("FPN1");
              sendWrite(BROADCAST_ADDRESS, msg, true);
              Serial.println("FPN1");

              I'll keep investigating when I get time. Thanks for your help

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hooraysimpsons
                wrote on last edited by
                #15

                I turned on failure_handling within the rf24 config. Now I get the following messageon my serial output:

                send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:

                as well as:

                sensor started, id 255
                req node id

                This happens three times before it appears to give up and runs the rest of the parent sketch which starts a serial output of A0.

                1 Reply Last reply
                0
                • daulagariD Offline
                  daulagariD Offline
                  daulagari
                  Hero Member
                  wrote on last edited by
                  #16

                  send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:

                  Seems like your node is requesting a id from a controller, see for example http://forum.mysensors.org/topic/531/using-an-uno-for-sensor-with-negative-results

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hooraysimpsons
                    wrote on last edited by
                    #17

                    I added capacitors to my radios to see if that would help. I'm also testing with a serial gateway without much difference. I tried assigning a node id of 1. Didn't seem to change much.

                    The debug output goes to the serial monitor correct? I'm wondering why I'm not getting any debug messages.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hooraysimpsons
                      wrote on last edited by
                      #18

                      Ok. My primary problem was the radios I purchased form Ebay weren't the correct type. I've purchased new ones. Still got some problems to work through but I'll put in a seperate thread.

                      For others reading later:

                      Other references to these radios:
                      http://forum.mysensors.org/topic/878/no-debug-data-from-sensors-or-gateway-bad-radios
                      http://forum.mysensors.org/topic/728/radio-setup-give-check-wires/17
                      And specifically mentioned on the troubleshooting page as well.

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      18

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      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