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. Arduino Uno with Ethernet Shield W5100 not working

Arduino Uno with Ethernet Shield W5100 not working

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 6 Posters 3.2k 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.
  • kduinoK Offline
    kduinoK Offline
    kduino
    wrote on last edited by
    #3

    Hi, I've cut present, setup and loop not to waist to much space. I edit and add them too...
    Unfortunately as you can see, the gateway is not receiving anything and therefore not answering the node.
    I will test with different hardware now, if there is something weird.

    mfalkviddM 1 Reply Last reply
    1
    • kduinoK kduino

      Hi, I've cut present, setup and loop not to waist to much space. I edit and add them too...
      Unfortunately as you can see, the gateway is not receiving anything and therefore not answering the node.
      I will test with different hardware now, if there is something weird.

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by
      #4

      @kduino thanks for clearing that up.

      st=OK:
      

      means that the node is getting a hardware acknowledgement on the sent message. So something (probably the gateway unless you have other MySensors nodes nearby) receives the message and acknowledges it, but then nothing happens.

      Could you add #define MY_DEBUG_VERBOSE_RF24 to both sketches to see if that can give a clue?

      1 Reply Last reply
      0
      • kduinoK Offline
        kduinoK Offline
        kduino
        wrote on last edited by
        #5

        Wow cool, so the hardware is basically running, but for some reason, the gateway doesn't accept the message.
        I'll double-check the signing algorithm (perhaps I comment it to see, if there are arriving unsigned messages) and I will post the result.
        Strange thing. Thank you very much!
        I'll do this tonight.

        AnticimexA 1 Reply Last reply
        1
        • kduinoK kduino

          Wow cool, so the hardware is basically running, but for some reason, the gateway doesn't accept the message.
          I'll double-check the signing algorithm (perhaps I comment it to see, if there are arriving unsigned messages) and I will post the result.
          Strange thing. Thank you very much!
          I'll do this tonight.

          AnticimexA Offline
          AnticimexA Offline
          Anticimex
          Contest Winner
          wrote on last edited by
          #6

          @kduino looks like communication fails already during parent lookup. Signing should not kick in until after that so I don't think that is the issue. But you could always try to disable signing to see if it affects things (the added code from signing could lead to stack problems which might manifest itself in many obscure ways, in case you are limited in RAM).

          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

          1 Reply Last reply
          1
          • kduinoK Offline
            kduinoK Offline
            kduino
            wrote on last edited by
            #7

            This is what is coming out of the gateway debug:

             MCO:BGN:INIT GW,CP=RNNGAS--,VER=2.3.0
            53 TSM:INIT
            54 TSF:WUR:MS=0
            55 RF24:INIT
            56 RF24:INIT:PIN,CE=5,CS=6
            59 RF24:WBR:REG=0,VAL=14
            66 RF24:WBR:REG=3,VAL=3
            68 RF24:WBR:REG=4,VAL=95
            70 RF24:WBR:REG=5,VAL=76
            72 RF24:WBR:REG=6,VAL=37
            74 RF24:WBR:REG=16,VAL=115
            77 RF24:WBR:REG=29,VAL=4
            79 RF24:RBR:REG=6,VAL=37
            81 RF24:RBR:REG=5,VAL=76
            83 RF24:WBR:REG=2,VAL=2
            87 RF24:WBR:REG=1,VAL=0
            89 RF24:WBR:REG=28,VAL=3
            91 RF24:FRX
            92 RF24:FTX
            93 RF24:WBR:REG=7,VAL=112
            96 TSM:INIT:TSP OK
            97 TSM:INIT:GW MODE
            99 RF24:WBR:REG=2,VAL=3
            101 RF24:WBR:REG=1,VAL=1
            103 RF24:STL
            105 RF24:WBR:REG=0,VAL=15
            107 RF24:WBR:REG=10,VAL=0
            109 TSM:READY:ID=0,PAR=0,DIS=0
            112 MCO:REG:NOT NEEDED
            114 RF24:RBR:REG=23,VAL=17
            16766 GWT:TIN:IP=192.168.178.XYZ
            17769 MCO:BGN:STP
            17771 RF24:RBR:REG=6,VAL=37
            17774 RF24:RBR:REG=5,VAL=76
            17776 MCO:BGN:INIT OK,TSP=1
            17779 RF24:RBR:REG=23,VAL=17
            17782 RF24:RBR:REG=23,VAL=17
            17784 RF24:RBR:REG=23,VAL=17
            17787 RF24:RBR:REG=23,VAL=17
            

            Last line is repeating for ever

            Just to be sure I insert the gateway code again:

            
            // Enable debug prints to serial monitor
            #define MY_DEBUG
            
            // Enable and select radio type attached
            #define MY_RADIO_RF24
            //#define MY_RADIO_NRF5_ESB
            //#define MY_RADIO_RFM69
            //#define MY_RADIO_RFM95
            
            // Enable gateway ethernet module type
            #define MY_GATEWAY_W5100
            
            // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
            //#define MY_W5100_SPI_EN 4
            
            // Enable Soft SPI for NRF radio (note different radio wiring is required)
            // The W5100 ethernet module seems to have a hard time co-operate with
            // radio on the same spi bus.
            #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
            #define MY_SOFTSPI
            #define MY_SOFT_SPI_SCK_PIN 14
            #define MY_SOFT_SPI_MISO_PIN 16
            #define MY_SOFT_SPI_MOSI_PIN 15
            #define MY_RF24_CE_PIN 5
            #define MY_RF24_CS_PIN 6
            #endif
            
            
            
            // When W5100 is connected we have to move CE/CSN pins for NRF radio
            
            // Enable UDP communication
            #define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
            
            // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
            //#define MY_IP_ADDRESS 192,168,178,66
            
            // If using static ip you can define Gateway and Subnet address as well
            //#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
            //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
            
            // Renewal period if using DHCP
            //#define MY_IP_RENEWAL_INTERVAL 60000
            
            // The port to keep open on node server mode / or port to contact in client mode
            #define MY_PORT 5003
            
            // Controller ip address. Enables client mode (default is "server" mode).
            // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
            #define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 46
            
            // The MAC address can be anything you want but should be unique on your network.
            // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
            // Note that most of the Arduino examples use  "DEAD BEEF FEED" for the MAC address.
            #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
            
            // Enable inclusion mode
            #define MY_INCLUSION_MODE_FEATURE
            // Enable Inclusion mode button on gateway
            //#define MY_INCLUSION_BUTTON_FEATURE
            // Set inclusion mode duration (in seconds)
            #define MY_INCLUSION_MODE_DURATION 60
            // Digital pin used for inclusion mode button
            //#define MY_INCLUSION_MODE_BUTTON_PIN  3
            
            // Set blinking period
            #define MY_DEFAULT_LED_BLINK_PERIOD 300
            
            // Flash leds on rx/tx/err
            // Uncomment to override default HW configurations
            //#define MY_DEFAULT_ERR_LED_PIN 7  // Error led pin
            //#define MY_DEFAULT_RX_LED_PIN  8  // Receive led pin
            //#define MY_DEFAULT_TX_LED_PIN  9  // Transmit led pin
            
            #if defined(MY_USE_UDP)
            #include <EthernetUdp.h>
            #endif
            #include <Ethernet.h>
            
            // Singing issues:
            #define MY_SIGNING_SOFT
            #define MY_SIGNING_SOFT_RANDOMSEED_PIN A5
            //#define MY_SIGNING_REQUEST_SIGNATURES
            
            #define MY_DEBUG_VERBOSE_RF24
            
            #include <MySensors.h>
            
            void setup()
            {
                // Setup locally attached sensors
            }
            
            void presentation()
            {
                // Present locally attached sensors here
            }
            
            void loop()
            {
                // Send locally attached sensors data here
            }
            
            1 Reply Last reply
            0
            • kduinoK Offline
              kduinoK Offline
              kduino
              wrote on last edited by
              #8

              What I have to mention: The setting was running great as a Serial Gateway config. But when I changed to ethernet gateway I was not able to restore this condition together with the W5100 shield. Moreover I don't know if the pin4 is making some trouble. As far as I know its used for writing to the sd card (which I don't use...).

              YveauxY 1 Reply Last reply
              0
              • kduinoK kduino

                What I have to mention: The setting was running great as a Serial Gateway config. But when I changed to ethernet gateway I was not able to restore this condition together with the W5100 shield. Moreover I don't know if the pin4 is making some trouble. As far as I know its used for writing to the sd card (which I don't use...).

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

                @kduino Could you give this a try? Add the following to your sketch:

                //...
                #define SD_SS_PIN                     (4)  // chip-select for SD card (unused, pull high!) 
                //...
                
                void before() {
                    pinMode(SD_SS_PIN, OUTPUT);
                    digitalWrite(SD_SS_PIN, HIGH); 
                }
                
                

                http://yveaux.blogspot.nl

                1 Reply Last reply
                0
                • kduinoK Offline
                  kduinoK Offline
                  kduino
                  wrote on last edited by
                  #10

                  I'll try this as soon as possible. Although the ip network connection doesn't seem to be the issue since ip dedication is without problem.

                  alexsh1A 1 Reply Last reply
                  0
                  • kduinoK kduino

                    I'll try this as soon as possible. Although the ip network connection doesn't seem to be the issue since ip dedication is without problem.

                    alexsh1A Offline
                    alexsh1A Offline
                    alexsh1
                    wrote on last edited by
                    #11

                    @kduino Did you manage so solve it please?

                    1 Reply Last reply
                    0
                    • SpannersS Offline
                      SpannersS Offline
                      Spanners
                      wrote on last edited by Spanners
                      #12

                      I'm experiencing the same issue with 2x Uno+NRF24+W5100 Shields that I tried to upgrade from 2.2.0 to 2.3.1 yesterday with Arduino IDE 1.8.8

                      I didn't modify the sketch. It does nothing funky like run other sensors, use signing or encryption.
                      I have the code to disable the the SD reader in setup() already. Haven't tried in before() yet.
                      The devices had been working fine previously.
                      I have upgraded 2 other W5100 Ethernet gateways based on FreeTronics EtherTen and EtherMega to 2.3.1 with no issues.
                      I have upgraded a Nano based Repeater with 2.3.1 with no issues.
                      I have upgraded an Energy Monitoring Sensor with 2.3.1 and it works fine with the FreeTronics gateways but not with the Uno gateways.

                      On the Uno Gateways:

                      I have tried downgrading to MyS 2.2.0
                      I have tried downgrading Ethernet library from 2.0 to 1.x (can't remember exact version)
                      Tried downgrading the AVR boards definition in the IDE

                      Thus far have not been able to get them working on any combination of older code. Any suggestions on how to troubleshoot further would be most welcome.

                      YveauxY 1 Reply Last reply
                      0
                      • SpannersS Spanners

                        I'm experiencing the same issue with 2x Uno+NRF24+W5100 Shields that I tried to upgrade from 2.2.0 to 2.3.1 yesterday with Arduino IDE 1.8.8

                        I didn't modify the sketch. It does nothing funky like run other sensors, use signing or encryption.
                        I have the code to disable the the SD reader in setup() already. Haven't tried in before() yet.
                        The devices had been working fine previously.
                        I have upgraded 2 other W5100 Ethernet gateways based on FreeTronics EtherTen and EtherMega to 2.3.1 with no issues.
                        I have upgraded a Nano based Repeater with 2.3.1 with no issues.
                        I have upgraded an Energy Monitoring Sensor with 2.3.1 and it works fine with the FreeTronics gateways but not with the Uno gateways.

                        On the Uno Gateways:

                        I have tried downgrading to MyS 2.2.0
                        I have tried downgrading Ethernet library from 2.0 to 1.x (can't remember exact version)
                        Tried downgrading the AVR boards definition in the IDE

                        Thus far have not been able to get them working on any combination of older code. Any suggestions on how to troubleshoot further would be most welcome.

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

                        @spanners said in Arduino Uno with Ethernet Shield W5100 not working:

                        I have the code to disable the the SD reader in setup() already. Haven't tried in before() yet.

                        Please do so. It makes a big difference!

                        http://yveaux.blogspot.nl

                        SpannersS 1 Reply Last reply
                        0
                        • YveauxY Yveaux

                          @spanners said in Arduino Uno with Ethernet Shield W5100 not working:

                          I have the code to disable the the SD reader in setup() already. Haven't tried in before() yet.

                          Please do so. It makes a big difference!

                          SpannersS Offline
                          SpannersS Offline
                          Spanners
                          wrote on last edited by Spanners
                          #14

                          @yveaux - unfortunately not that much of a difference that the two Uno's started working..

                          0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1
                          16:26:38.766 -> 10006 TSM:INIT
                          16:26:38.766 -> 10008 TSF:WUR:MS=0
                          16:26:38.766 -> 10015 TSM:INIT:TSP OK
                          16:26:38.766 -> 10017 TSM:INIT:GW MODE
                          16:26:38.766 -> 10019 TSM:READY:ID=0,PAR=0,DIS=0
                          16:26:38.766 -> 10022 MCO:REG:NOT NEEDED
                          16:26:39.349 -> 10586 GWT:TIN:IP=10.0.0.244
                          16:26:40.337 -> 11589 MCO:BGN:STP
                          16:26:42.372 -> 13596 MCO:BGN:INIT OK,TSP=1
                          16:26:42.372 -> 13603 TSM:READY:NWD REQ
                          16:26:42.399 -> 13641 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                          
                          

                          Then they just sit there.

                          With verbose NRF debug on:

                          20777 RF24:RBR:REG=23,VAL=17
                          20780 RF24:RBR:REG=23,VAL=17
                          20783 RF24:RBR:REG=23,VAL=17
                          20786 RF24:RBR:REG=23,VAL=17
                          20788 RF24:RBR:REG=23,VAL=17
                          20791 RF24:RBR:REG=23,VAL=17
                          20794 RF24:RBR:REG=23,VAL=17
                          20796 RF24:RBR:REG=23,VAL=17
                          20799 RF24:RBR:REG=23,VAL=17
                          

                          Goes on forever

                          Edit:

                          /epic_facepalm Tried everything including downgrading the IDE to 1.8.5, all the libraries etc..

                          Out of desperation I thought I'd try the Uno Gateways on the same MY_RF24_CHANNEL/MY_RF24_BASE_RADIO_ID as my production MyS network and they started picking up transmits.

                          Focus now changed to the test sensor. I started replacing hardware and discovered a flaky Dupont pin for the GND connection on my NRF radio... on the sensor I was using to test with.. of course... So between validating that my test sensor worked on the other gateways and then testing the upgraded gateways, the sensor ceased transmitting reliably.

                          That my friends, is Murphy's law as applied to MySensors builds.

                          YveauxY 1 Reply Last reply
                          1
                          • SpannersS Spanners

                            @yveaux - unfortunately not that much of a difference that the two Uno's started working..

                            0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1
                            16:26:38.766 -> 10006 TSM:INIT
                            16:26:38.766 -> 10008 TSF:WUR:MS=0
                            16:26:38.766 -> 10015 TSM:INIT:TSP OK
                            16:26:38.766 -> 10017 TSM:INIT:GW MODE
                            16:26:38.766 -> 10019 TSM:READY:ID=0,PAR=0,DIS=0
                            16:26:38.766 -> 10022 MCO:REG:NOT NEEDED
                            16:26:39.349 -> 10586 GWT:TIN:IP=10.0.0.244
                            16:26:40.337 -> 11589 MCO:BGN:STP
                            16:26:42.372 -> 13596 MCO:BGN:INIT OK,TSP=1
                            16:26:42.372 -> 13603 TSM:READY:NWD REQ
                            16:26:42.399 -> 13641 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
                            
                            

                            Then they just sit there.

                            With verbose NRF debug on:

                            20777 RF24:RBR:REG=23,VAL=17
                            20780 RF24:RBR:REG=23,VAL=17
                            20783 RF24:RBR:REG=23,VAL=17
                            20786 RF24:RBR:REG=23,VAL=17
                            20788 RF24:RBR:REG=23,VAL=17
                            20791 RF24:RBR:REG=23,VAL=17
                            20794 RF24:RBR:REG=23,VAL=17
                            20796 RF24:RBR:REG=23,VAL=17
                            20799 RF24:RBR:REG=23,VAL=17
                            

                            Goes on forever

                            Edit:

                            /epic_facepalm Tried everything including downgrading the IDE to 1.8.5, all the libraries etc..

                            Out of desperation I thought I'd try the Uno Gateways on the same MY_RF24_CHANNEL/MY_RF24_BASE_RADIO_ID as my production MyS network and they started picking up transmits.

                            Focus now changed to the test sensor. I started replacing hardware and discovered a flaky Dupont pin for the GND connection on my NRF radio... on the sensor I was using to test with.. of course... So between validating that my test sensor worked on the other gateways and then testing the upgraded gateways, the sensor ceased transmitting reliably.

                            That my friends, is Murphy's law as applied to MySensors builds.

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

                            @spanners I told you it would make a big difference :-)

                            Thanks for reporting back!

                            http://yveaux.blogspot.nl

                            1 Reply Last reply
                            0
                            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.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