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.
  • 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
          • electrikE Offline
            electrikE Offline
            electrik
            wrote on last edited by
            #21

            I don't think this is a software issue. More likely your NRF24 is failing.

            A 1 Reply Last reply
            0
            • electrikE electrik

              I don't think this is a software issue. More likely your NRF24 is failing.

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

              @electrik It's highly unlikely. I have more than one type of module and more than one module of each type, none of them work. I also swapped the modules between working GW and Mega node and it still works, I swap the module between working GW and the node, it doesn't work.

              1 Reply Last reply
              0
              • electrikE Offline
                electrikE Offline
                electrik
                wrote on last edited by
                #23

                Could you try version 2.2 of mysensors? I remember summer changes in 2.4 regarding nrf modules

                A 1 Reply Last reply
                0
                • electrikE electrik

                  Could you try version 2.2 of mysensors? I remember summer changes in 2.4 regarding nrf modules

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

                  @electrik :

                  Could you try version 2.2 of mysensors? I remember summer changes in 2.4 regarding nrf modules

                  I went to the oldest available version and it doesn't work.

                  I don't really get it, if I swap the radios between the Mega node and the Nano node, it stops working, swapping CE/CSN also makes it stop working - any alterations make it fail loud and clear.

                  It does initialize the radio and claim everything is okay. I can be quite certain it's not the radios, it's not the boards themselves, it's not the wiring.

                  There's something very specific to the Nanos themselves that 2.x.x is unable to use the nRF24L01+.

                  I will assemble an Arduino Uno board and see if the issue is specific to the AtMega328P.

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

                    I also ran the full "test" suite of RF24 and all examples work great, so I am very certain communication is likely to be very good.

                    It's just that something makes MySensors not like it.

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

                      Just in case I also took clean RepeaterNode example and just defined the CE/CSN pins and channel, it's still unable to work.

                      I also tried the same example without any repeater functionality enabled, it's still unable to register. It's basically a blank sketch.

                      Changing Node ID didn't also work.

                      1 Reply Last reply
                      0
                      • electrikE Offline
                        electrikE Offline
                        electrik
                        wrote on last edited by
                        #27

                        In your first sketch the baud rate was 2mbps. How is your existing network configured?
                        If you take an example sketch and an example gateway sketch, does it work then. So don't change channels and so on

                        A 1 Reply Last reply
                        0
                        • electrikE electrik

                          In your first sketch the baud rate was 2mbps. How is your existing network configured?
                          If you take an example sketch and an example gateway sketch, does it work then. So don't change channels and so on

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

                          In your first sketch the baud rate was 2mbps. How is your existing network configured?

                          That's exactly the same across all my sketches.

                          If you take an example sketch and an example gateway sketch, does it work then. So don't change channels and so on

                          Yeah, I did that and wrote about it above, took RepeaterNode and just defined CE/CSN on GW and the node.

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

                            I've determined that it doesn't matter which:

                            • Radio
                            • Radio's power supply/source
                            • Nano
                            • Bootloader
                            • Arduino IDE (tried 1.8.2 and latest nightly)
                            • 2.x.x MySensors
                            • Example, or custom sketch
                            • Channel, data rate, power level or node ID
                            • Repeater or not
                            • WAIT_READY_MS or not
                            • Predefined master or not
                            • SPI bus speed, 0.5*default SPI speed didn't help

                            I just can't make a Nano act as a regular node.

                            Maybe a MySensors dev has an idea what I could try.

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

                              I'm going to finish my Arduino Uno node and if that too doesn't work getting MyController to work must take some goat sacrifice because I can't do it.

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

                                I just discovered that on the Arduino Uno RF24_250KBPS works, but RF24_2MBPS doesn't. On the Nanos, neither work.

                                I used RF24 and tested the boards for a while, I've determined that 2MBPS on that specific channel works great, I've sent at least 100 000 packets and lost only two. Auto-ack and dynamic payloads also work.

                                I am 99.99% certain this is a bug in MySensors. @mfalkvidd maybe you have some ideas where to look next?

                                YveauxY 1 Reply Last reply
                                0
                                • A Avamander

                                  I just discovered that on the Arduino Uno RF24_250KBPS works, but RF24_2MBPS doesn't. On the Nanos, neither work.

                                  I used RF24 and tested the boards for a while, I've determined that 2MBPS on that specific channel works great, I've sent at least 100 000 packets and lost only two. Auto-ack and dynamic payloads also work.

                                  I am 99.99% certain this is a bug in MySensors. @mfalkvidd maybe you have some ideas where to look next?

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #32

                                  @Avamander nano's are basically just regular atmega328 boards, running off 5v at 16MHz. The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
                                  What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.
                                  What nano boards do you use? Could you try a different atmega328 based arduino?

                                  http://yveaux.blogspot.nl

                                  A 1 Reply Last reply
                                  0
                                  • YveauxY Yveaux

                                    @Avamander nano's are basically just regular atmega328 boards, running off 5v at 16MHz. The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
                                    What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.
                                    What nano boards do you use? Could you try a different atmega328 based arduino?

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

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

                                    The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
                                    What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.

                                    Because I'm really rather certain it isn't the hardware. You can read what I've replaced, swapped and tried. The radios have been decoupled, the power has been decoupled. The setup works in all possible ways when using RF24.

                                    What nano boards do you use? Could you try a different atmega328 based arduino?

                                    Yeah, I said I tried an Uno and it exhibited pretty much the same symptoms when acting as a regular node.

                                    tekkaT 1 Reply Last reply
                                    0
                                    • A Avamander

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

                                      The MySensors stack doesn't know if it is running on a nano, uno or pro mini, so why are you so certain this is a bug in the stack?
                                      What I do know is that a lot of low quality nanos are available from Chinese sources, with bad ground planes or crappy power regulators.

                                      Because I'm really rather certain it isn't the hardware. You can read what I've replaced, swapped and tried. The radios have been decoupled, the power has been decoupled. The setup works in all possible ways when using RF24.

                                      What nano boards do you use? Could you try a different atmega328 based arduino?

                                      Yeah, I said I tried an Uno and it exhibited pretty much the same symptoms when acting as a regular node.

                                      tekkaT Offline
                                      tekkaT Offline
                                      tekka
                                      Admin
                                      wrote on last edited by tekka
                                      #34

                                      @Avamander Can you upload both, the GW and node sketches from the working pair nanoGW/megaNode? Also, it would be helpful to see the full GW log from the non-working combination (nanoNode/megaGW) with MY_DEBUG_VERBOSE_RF24 enabled. If time allows, I'd like to reproduce and test your setup.

                                      A 1 Reply Last reply
                                      1
                                      • tekkaT tekka

                                        @Avamander Can you upload both, the GW and node sketches from the working pair nanoGW/megaNode? Also, it would be helpful to see the full GW log from the non-working combination (nanoNode/megaGW) with MY_DEBUG_VERBOSE_RF24 enabled. If time allows, I'd like to reproduce and test your setup.

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

                                        @tekka

                                        Just to be clear, the Arduino Mega node (megaNode) can talk to the Arduino Nano gateway (nanoGW), but no Arduino Nano node (nanoNode) can talk to the Arduino Nano gateway.

                                        I'll post the sketches and logs.

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

                                          Ah, I think cussing is warranted here, I copied the radio configuration from my old sketch to the new ones, the node had:

                                          #define RF24_DATARATE RF24_2MBPS
                                          

                                          The GW has:

                                          #define MY_RF24_DATARATE RF24_2MBPS
                                          

                                          Lesson learned: Never copy configuration from an existing older sketch, you never know what has been deprecated without a warning. MY_RADIO_NRF24 threw a warning and I fixed that, had no idea about RF24_DATARATE and I didn't notice it. :sweat_smile:

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


                                          28

                                          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