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. Hardware
  3. [Solved] Arduino Nanos don't work as nodes

[Solved] Arduino Nanos don't work as nodes

Scheduled Pinned Locked Moved Hardware
37 Posts 6 Posters 181 Views 5 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.
  • A Offline
    A Offline
    Avamander
    wrote on last edited by tekka
    #1

    My issue is rather simple, no matter what I do, Arduino Nano nodes are unable to act as nodes.

    I have a working pair of an Arduino Nano based GW and an Arduino Mega 2560 based node.

    I have:

    • Switched the radios between the nodes, the same radios that work on the GW and the Mega work on each other.
    • Tried PA+LNA and two different regular nRF24 boards (no, not the COB ones)
    • Built three new boards to plug the radio and the Nano into -
    • Tried 1uF, 10uF and 470uF decoupling all separately
    • Tried both with and without MY_PARENT_NODE_ID and MY_PARENT_NODE_IS_STATIC
    • Tried with and without MY_TRANSPORT_WAIT_READY_MS
    • I wiped the EEPROM of all the devices
    • Tried an external 3.3V regulator
    • With both the old and new Nano bootloader
    • Multiple Nano boards
    • Downloaded newer Arduino IDE and newest MySensors
    • Switched channel and tried different power levels

    But the node still either outputs:

    16 MCO:BGN:INIT REPEATER,CP=RNNRA---,FQ=16,REL=255,VER=2.3.2
    27 TSM:INIT
    28 TSF:WUR:MS=0
    34 TSM:INIT:TSP OK
    36 TSM:INIT:STATID=1
    38 TSF:SID:OK,ID=1
    40 TSM:FPAR
    45 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2052 !TSM:FPAR:NO REPLY
    2054 TSM:FPAR
    2058 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4065 !TSM:FPAR:NO REPLY
    4067 TSM:FPAR
    4071 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6078 !TSM:FPAR:NO REPLY
    6080 TSM:FPAR
    6084 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8091 !TSM:FPAR:FAIL
    8092 TSM:FAIL:CNT=1
    8094 TSM:FAIL:DIS
    8096 TSF:TDI:TSL
    18098 TSM:FAIL:RE-INIT
    18100 TSM:INIT
    18106 TSM:INIT:TSP OK
    18108 TSM:INIT:STATID=1
    18111 TSF:SID:OK,ID=1
    18113 TSM:FPAR
    18117 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20124 !TSM:FPAR:NO REPLY
    20126 TSM:FPAR
    

    or with MY_TRANSPORT_WAIT_READY_MS:

    16 MCO:BGN:INIT REPEATER,CP=RNNRAS--,FQ=16,REL=255,VER=2.3.2
    54 TSM:INIT
    58 TSF:WUR:MS=1
    64 TSM:INIT:TSP OK
    66 TSM:INIT:STATID=1
    68 TSF:SID:OK,ID=1
    69 TSM:FPAR
    70 TSM:FPAR:STATP=0
    72 MCO:BGN:INIT OK,TSP=0
    74 TSM:ID
    1
    Sensor: 17
    76 !MCO:SND:NODE NOT REG
    79 MCO:SLP:MS=500,SMS=0,I1=255,M1=255,I2=255,M2=255
    84 !MCO:SLP:REP
    86 TSM:ID:OK
    87 TSM:UPL
    123 !TSF:MSG:SEND,1-1-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    2
    Sensor: 34
    586 !MCO:SND:NODE NOT REG
    589 MCO:SLP:MS=500,SMS=0,I1=255,M1=255,I2=255,M2=255
    594 !MCO:SLP:REP
    

    Node code:

    // Enable debug prints to serial monitor
    #define MY_DEBUG
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    
    #define MY_REPEATER_FEATURE
    #define MY_TRANSPORT_SANITY_CHECK
    #define MY_SIGNAL_REPORT_ENABLED
    #define MY_RF24_CE_PIN     9
    #define MY_RF24_CS_PIN     10
    #define MY_RF24_CHANNEL   29
    #define RF24_DATARATE      RF24_2MBPS
    #define RF24_PA_LEVEL      RF24_PA_MIN
    #define RF24_PA_LEVEL_GW   RF24_PA_MIN
    #define MY_NODE_ID         1
    #define MY_PARENT_NODE_ID  0
    #define MY_PARENT_NODE_IS_STATIC
    
    #define MY_TRANSPORT_WAIT_READY_MS 1
    
    #include <MySensors.h>
    
    uint32_t SLEEP_TIME = 500; // Sleep time between reads (in milliseconds)
    
    MyMessage msg(0, V_LIGHT_LEVEL);
    
    void presentation()
    {
      pinMode(A7, INPUT);
      
      Serial.begin(115200);
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Basicsensor 1", "0.1");
    
      // Register all sensors to gateway (they will be created as child devices)
      delay(10);
      present(0, S_LIGHT_LEVEL, F("Light level sensor"), true);
    }
    
    uint16_t lightLevel = 0;
    uint16_t lastLightLevel = 0;
    
    void loop()
    {
      lightLevel = analogRead(A7);
    
      if (lightLevel != lastLightLevel) {
        Serial.print("Sensor: ");
        Serial.println(lightLevel);
        send(msg.setSensor(0).setType(V_LIGHT_LEVEL).set(lightLevel));
        lastLightLevel = lightLevel;
      }
    
      sleep(SLEEP_TIME);
    }
    

    I now suspect there's a bug somewhere in MySensors introduced by some newer version affecting Arduino Nanos. Because I remember MySensors working on Nanos a while ago.

    Maybe someone here has some ideas how to narrow the issue down?

    1 Reply Last reply
    0
    • alowhumA Offline
      alowhumA Offline
      alowhum
      Plugin Developer
      wrote on last edited by
      #2

      I created a new gateway on an Arduino Nano today, and that worked. Not sure if that was using the very latest MySensors though. The rest of my network is all based on the RF-Nano, which I'm a big fan of. It shields me from exactly these types of issues :-)

      How are you powering them?

      Tried an external 3.3V regulator

      The Nano itself runs on 5v, but I suspect you know that.

      Have you tried enabling the advanced radio debug option? (I forget it's name). That can magicaly enable things sometimes. At the very least it will tell you more about what's going on.

      Are you sure there's nothing like encrpytion on the gateway?

      Built three new boards to plug the radio and the Nano into -

      Have you tried replacing all the wires between the nano and the radio module?

      I recommend just buying the Arduino Nano Wireless Expansion Board. They cost a dollar on Aliexpress.

      Maybe you have some of those fake Atmel chips?

      1 Reply Last reply
      0
      • alowhumA Offline
        alowhumA Offline
        alowhum
        Plugin Developer
        wrote on last edited by
        #3

        pinMode(A7, INPUT); should not be in presentation. It should be in setup. Similarly, don't put Serial.begin(115200); in there. All that should be in presentation function is sendSketchInfo and present.

        Also, don't use "delay", use wait() instead.

        And where is your setup function in the first place?

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #4

          Also, your code never loads MySensors? It's commented out?

          Your node code is very strange.

          A 1 Reply Last reply
          0
          • A Offline
            A Offline
            Avamander
            wrote on last edited by
            #5

            @alowhum said in Arduino Nanos don't work as nodes:

            How are you powering them?

            USB, tried a wall-wart and two different PCs.

            Are you sure there's nothing like encrpytion on the gateway?

            Yes, it's the default gateway sketch, except configured to use the right channel, data rate and nRF24.

            Have you tried replacing all the wires between the nano and the radio module?

            Yeah, I have multiple boards, some years old and have worked with other nRF24 projects. Plus, any wiring changes actually break it for things such as RF24.

            Have you tried enabling the advanced radio debug option? (I forget it's name).

            I'll look into that.

            Maybe you have some of those fake Atmel chips?

            Three of them bought at different times, and the only issues are with MySensor? :P Seems unlikely.

            1 Reply Last reply
            0
            • alowhumA alowhum

              Also, your code never loads MySensors? It's commented out?

              Your node code is very strange.

              A Offline
              A Offline
              Avamander
              wrote on last edited by
              #6

              Also, your code never loads MySensors? It's commented out?

              Um, line 22 #include <MySensors.h>

              Your node code is very strange.

              It was of the examples, barely modified.

              1 Reply Last reply
              0
              • alowhumA Offline
                alowhumA Offline
                alowhum
                Plugin Developer
                wrote on last edited by
                #7

                @Avamander said in Arduino Nanos don't work as nodes:

                Um, line 22 #include <MySensors.h>

                Ah, you're right. Have been programming in other languages lately, where that indicates a comment.

                1 Reply Last reply
                0
                • alowhumA Offline
                  alowhumA Offline
                  alowhum
                  Plugin Developer
                  wrote on last edited by
                  #8

                  Is there a reason you're swapping your CE and CS pins?

                  A 1 Reply Last reply
                  0
                  • alowhumA alowhum

                    Is there a reason you're swapping your CE and CS pins?

                    A Offline
                    A Offline
                    Avamander
                    wrote on last edited by
                    #9

                    @alowhum said in Arduino Nanos don't work as nodes:

                    Is there a reason you're swapping your CE and CS pins?

                    Because they're wired that way and it doesn't/shouldn't matter.

                    1 Reply Last reply
                    0
                    • alowhumA Offline
                      alowhumA Offline
                      alowhum
                      Plugin Developer
                      wrote on last edited by
                      #10

                      What happens if you remove everything but the essentials for your network here?

                      #define MY_REPEATER_FEATURE
                      #define MY_TRANSPORT_SANITY_CHECK
                      #define MY_SIGNAL_REPORT_ENABLED
                      #define MY_RF24_CE_PIN     9
                      #define MY_RF24_CS_PIN     10
                      #define MY_RF24_CHANNEL   29
                      #define RF24_DATARATE      RF24_2MBPS
                      #define RF24_PA_LEVEL      RF24_PA_MIN
                      #define RF24_PA_LEVEL_GW   RF24_PA_MIN
                      #define MY_NODE_ID         1
                      #define MY_PARENT_NODE_ID  0
                      #define MY_PARENT_NODE_IS_STATIC
                      
                      #define MY_TRANSPORT_WAIT_READY_MS 1
                      

                      Maybe only leave #define MY_RF24_CHANNEL 29?

                      1 Reply Last reply
                      0
                      • alowhumA Offline
                        alowhumA Offline
                        alowhum
                        Plugin Developer
                        wrote on last edited by
                        #11

                        Look for something like MY_DEBUG_VERBOSE_NRF24 - something along those lines, for that debug option I mentioned.

                        A 1 Reply Last reply
                        0
                        • alowhumA alowhum

                          Look for something like MY_DEBUG_VERBOSE_NRF24 - something along those lines, for that debug option I mentioned.

                          A Offline
                          A Offline
                          Avamander
                          wrote on last edited by
                          #12

                          @alowhum

                          // Enable debug prints to serial monitor
                          #define MY_DEBUG
                          #define MY_DEBUG_VERBOSE_RF24
                           
                          // Enable and select radio type attached
                          #define MY_RADIO_NRF24
                          #define MY_TRANSPORT_SANITY_CHECK
                          #define MY_RF24_CE_PIN     9
                          #define MY_RF24_CS_PIN     10
                          #define MY_RF24_CHANNEL    29
                          #define RF24_DATARATE      RF24_2MBPS
                          #define RF24_PA_LEVEL      RF24_PA_MIN
                          #define RF24_PA_LEVEL_GW   RF24_PA_MIN
                          #define MY_NODE_ID         1
                          
                          16 MCO:BGN:INIT NODE,CP=RNNNA---,FQ=16,REL=255,VER=2.3.2
                          26 TSM:INIT
                          28 TSF:WUR:MS=0
                          29 RF24:INIT:PIN,CE=9,CS=10
                          31 RF24:SBY
                          32 RF24:WBR:REG=0,VAL=14
                          39 RF24:WBR:REG=3,VAL=3
                          41 RF24:WBR:REG=4,VAL=95
                          44 RF24:WBR:REG=5,VAL=29
                          47 RF24:WBR:REG=6,VAL=37
                          49 RF24:WBR:REG=29,VAL=4
                          51 RF24:RBR:REG=29,VAL=4
                          53 RF24:RBR:REG=6,VAL=37
                          55 RF24:RBR:REG=5,VAL=29
                          58 RF24:WBR:REG=2,VAL=2
                          60 RF24:WBR:REG=1,VAL=0
                          62 RF24:WBR:REG=28,VAL=3
                          64 RF24:FRX
                          65 RF24:FTX
                          66 RF24:WBR:REG=7,VAL=112
                          69 TSM:INIT:TSP OK
                          70 TSM:INIT:STATID=1
                          72 RF24:WBR:REG=2,VAL=3
                          74 RF24:WBR:REG=1,VAL=1
                          76 RF24:STL
                          78 RF24:WBR:REG=0,VAL=15
                          80 RF24:WBR:REG=10,VAL=1
                          82 TSF:SID:OK,ID=1
                          84 TSM:FPAR
                          86 RF24:SPL
                          87 RF24:WBR:REG=0,VAL=14
                          89 RF24:OWP:RCPT=255
                          91 RF24:WBR:REG=10,VAL=255
                          93 RF24:WBR:REG=16,VAL=255
                          96 RF24:TXM:TO=255,LEN=7
                          98 RF24:FTX
                          99 RF24:WBR:REG=4,VAL=80
                          103 RF24:WBR:REG=7,VAL=112
                          106 ?RF24:TXM:MAX_RT
                          108 RF24:FTX
                          109 RF24:WBR:REG=4,VAL=95
                          111 RF24:STL
                          113 RF24:WBR:REG=0,VAL=15
                          115 RF24:WBR:REG=10,VAL=1
                          117 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          2125 !TSM:FPAR:NO REPLY
                          2127 TSM:FPAR
                          2128 RF24:SPL
                          2130 RF24:WBR:REG=0,VAL=14
                          2132 RF24:OWP:RCPT=255
                          2135 RF24:WBR:REG=10,VAL=255
                          2138 RF24:WBR:REG=16,VAL=255
                          2140 RF24:TXM:TO=255,LEN=7
                          2143 RF24:FTX
                          2144 RF24:WBR:REG=4,VAL=80
                          2149 RF24:WBR:REG=7,VAL=112
                          2151 ?RF24:TXM:MAX_RT
                          2153 RF24:FTX
                          2155 RF24:WBR:REG=4,VAL=95
                          2157 RF24:STL
                          2158 RF24:WBR:REG=0,VAL=15
                          2161 RF24:WBR:REG=10,VAL=1
                          2163 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          4171 !TSM:FPAR:NO REPLY
                          4173 TSM:FPAR
                          4174 RF24:SPL
                          4175 RF24:WBR:REG=0,VAL=14
                          4178 RF24:OWP:RCPT=255
                          4180 RF24:WBR:REG=10,VAL=255
                          4184 RF24:WBR:REG=16,VAL=255
                          4186 RF24:TXM:TO=255,LEN=7
                          4189 RF24:FTX
                          4190 RF24:WBR:REG=4,VAL=80
                          4195 RF24:WBR:REG=7,VAL=112
                          4197 ?RF24:TXM:MAX_RT
                          4199 RF24:FTX
                          4201 RF24:WBR:REG=4,VAL=95
                          4203 RF24:STL
                          4204 RF24:WBR:REG=0,VAL=15
                          4207 RF24:WBR:REG=10,VAL=1
                          4209 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
                          6217 !TSM:FPAR:NO REPLY
                          

                          Still no reply.

                          1 Reply Last reply
                          0
                          • N Offline
                            N Offline
                            niclas
                            wrote on last edited by niclas
                            #13

                            I'm not super experienced using mysensors but I do have 3 nodes working and when first settings things up I had some problems with NODE IDs. It looks like you are setting a Static node Id? Is that ID "free" in the gateway? Have you tried powering of all the nodes you have running, wiping the EEPROM of the gateway, powering up the gateway and shortly after powering up the node?

                            Someone else perhaps knows this better but, if the gateway don't want to include the node, does that generate the FPAR:No reply?

                            And also, how is the interrupt pin connected?

                            A 2 Replies Last reply
                            0
                            • electrikE Offline
                              electrikE Offline
                              electrik
                              wrote on last edited by
                              #14

                              I use Arduinos all the time and have problem with them.
                              I suggest to start with one of the examples.

                              The RF channel is the same everywhere I guess?
                              What does the output on the gateway say?

                              1 Reply Last reply
                              0
                              • N niclas

                                I'm not super experienced using mysensors but I do have 3 nodes working and when first settings things up I had some problems with NODE IDs. It looks like you are setting a Static node Id? Is that ID "free" in the gateway? Have you tried powering of all the nodes you have running, wiping the EEPROM of the gateway, powering up the gateway and shortly after powering up the node?

                                Someone else perhaps knows this better but, if the gateway don't want to include the node, does that generate the FPAR:No reply?

                                And also, how is the interrupt pin connected?

                                A Offline
                                A Offline
                                Avamander
                                wrote on last edited by
                                #15

                                @niclas

                                It looks like you are setting a Static node Id? Is that ID "free" in the gateway?

                                Yes, there are no other nodes (other than the one with a different static node ID that works)

                                Have you tried powering of all the nodes you have running,

                                Yes.

                                wiping the EEPROM of the gateway, powering up the gateway and shortly after powering up the node?

                                Yes, I've wiped EEPROMs of all the nodes.

                                N 1 Reply Last reply
                                0
                                • A Avamander

                                  @niclas

                                  It looks like you are setting a Static node Id? Is that ID "free" in the gateway?

                                  Yes, there are no other nodes (other than the one with a different static node ID that works)

                                  Have you tried powering of all the nodes you have running,

                                  Yes.

                                  wiping the EEPROM of the gateway, powering up the gateway and shortly after powering up the node?

                                  Yes, I've wiped EEPROMs of all the nodes.

                                  N Offline
                                  N Offline
                                  niclas
                                  wrote on last edited by
                                  #16

                                  @Avamander I meant, have you erased the EEPROM of the gateway?

                                  1 Reply Last reply
                                  0
                                  • N niclas

                                    I'm not super experienced using mysensors but I do have 3 nodes working and when first settings things up I had some problems with NODE IDs. It looks like you are setting a Static node Id? Is that ID "free" in the gateway? Have you tried powering of all the nodes you have running, wiping the EEPROM of the gateway, powering up the gateway and shortly after powering up the node?

                                    Someone else perhaps knows this better but, if the gateway don't want to include the node, does that generate the FPAR:No reply?

                                    And also, how is the interrupt pin connected?

                                    A Offline
                                    A Offline
                                    Avamander
                                    wrote on last edited by Avamander
                                    #17

                                    @niclas

                                    I meant, have you erased the EEPROM of the gateway?

                                    Yes, that too.

                                    And also, how is the interrupt pin connected?

                                    The radio's IRQ pin is not connected. (The IRQ pin is only required to be connected if the MY_RX_MESSAGE_BUFFER_FEATURE is defined in the sketch.)

                                    N 1 Reply Last reply
                                    0
                                    • A Avamander

                                      @niclas

                                      I meant, have you erased the EEPROM of the gateway?

                                      Yes, that too.

                                      And also, how is the interrupt pin connected?

                                      The radio's IRQ pin is not connected. (The IRQ pin is only required to be connected if the MY_RX_MESSAGE_BUFFER_FEATURE is defined in the sketch.)

                                      N Offline
                                      N Offline
                                      niclas
                                      wrote on last edited by niclas
                                      #18

                                      @Avamander Regarding the interrupt pin, at least when using the RFM95 I need to have the pin connected to be able to receive anything. It doesnt poll the module to check for incoming messages. Maybe its different with nRF24.

                                      I haven't tried messing with the MY_RX_MESSAGE_BUFFER_FEATURE so I wouldnt know about that.

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        Avamander
                                        wrote on last edited by Avamander
                                        #19

                                        @niclas

                                        Well, the documentation says I don't have to have it connected.

                                        @electrik

                                        I suggest to start with one of the examples.

                                        The gateway and node both are examples with the minimal required changes.

                                        The RF channel is the same everywhere I guess?

                                        Yes.

                                        What does the output on the gateway say?

                                        Nothing, totally silent. When I plug in the Mega node, then it starts outputting all the sensor and other data.

                                        Anyways, the weird thing here is that I remember this working a few years or so ago on the same boards and stuff, it just doesn't work now and I have 0 clue why. I'm thinking about downgrading MySensors to 1.something

                                        N 1 Reply Last reply
                                        0
                                        • A Avamander

                                          @niclas

                                          Well, the documentation says I don't have to have it connected.

                                          @electrik

                                          I suggest to start with one of the examples.

                                          The gateway and node both are examples with the minimal required changes.

                                          The RF channel is the same everywhere I guess?

                                          Yes.

                                          What does the output on the gateway say?

                                          Nothing, totally silent. When I plug in the Mega node, then it starts outputting all the sensor and other data.

                                          Anyways, the weird thing here is that I remember this working a few years or so ago on the same boards and stuff, it just doesn't work now and I have 0 clue why. I'm thinking about downgrading MySensors to 1.something

                                          N Offline
                                          N Offline
                                          niclas
                                          wrote on last edited by
                                          #20

                                          @Avamander Found the documentation you were referring to and yes. Seems to be true for the RF24 which I haven't used in a long time.

                                          #define MY_RX_MESSAGE_BUFFER_FEATURE
                                          
                                          This enables the receiving buffer feature.
                                          
                                          This feature is currently not supported for anything but RF24. Require MY_RF24_IRQ_PIN to be set.
                                          
                                          Note: Not supported on ESP8266, ESP32, STM32, nRF5 and sketches that use SoftSPI. See below issue for details https://github.com/mysensors/MySensors/issues/1128
                                          
                                          Definition at line 2406 of file MyConfig.h.
                                          
                                          
                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          26

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          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