Skip to content
  • 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. Ethernet Gateway problem
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Ethernet Gateway problem

Scheduled Pinned Locked Moved Troubleshooting
93 Posts 18 Posters 47.4k Views 6 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.
  • Dan S.D Offline
    Dan S.D Offline
    Dan S.
    Hero Member
    wrote on last edited by
    #5

    Thanks for the input! m26872's web reference was particularly informative. Apparently since the gateway is not a DHCP client (it doesn't ask the router for a IP address) it does not show up in the router's list which is a list of DHCP clients. The gateway and Vera have the same static IP address as specified in the Vera's advanced tab for the plugin and in the Ethernet gateway arduino sketch which they use to communicate with each other.

    1 Reply Last reply
    0
    • Dan S.D Offline
      Dan S.D Offline
      Dan S.
      Hero Member
      wrote on last edited by
      #6

      Back to my first question. Ethernet gateway works for a while and stops updating sensor data till I unplug and plug back in. Wonder if this is related to the wisnet/radio use of SPI problem I saw posted elsewhere.

      1 Reply Last reply
      0
      • AnticimexA Offline
        AnticimexA Offline
        Anticimex
        Contest Winner
        wrote on last edited by
        #7

        It is interesting that you get the W5100 to work with the RF module at all. I cannot have them coexist on the same SPI bus at all, but moving the RF module to a software implemented SPI bus seem to resolve that problem (it introduces other problems but they are believed to be related in other changes in the RF library that were piggy-backed with the introduction of the SW SPI support).
        Here is a thread on the topic: http://forum.mysensors.org/topic/467/ethernet-gateway-troubleshooting-advice

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

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jkbrowne
          wrote on last edited by
          #8

          Hey Dan,

          Just curious, where did you get your Arduino and ethernet board? Is your Arduino a clone or a genuine board from Italy? I'm fighting some issues getting my gateway working and was curious specifically what you're using.

          1 Reply Last reply
          0
          • Dan S.D Offline
            Dan S.D Offline
            Dan S.
            Hero Member
            wrote on last edited by
            #9

            My Arduino Uno is a genuine board from Italy. I got the Ethernet board from amazon: http://www.amazon.com/gp/product/B00CRX7BI2/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1 "ZITRADES Ethernet Shield W5100 Development board For Arduino "

            I wouldn't exactly call it working. It works for a short time. From the symptoms, it appears that both the Ethernet and radio work for a time and then the radio eventually stops working. I no longer receive sensor updates but it appears that Vera keeps communicating with the gateway as indicated by commo lights on the Ethernet board and no Vera error messages.

            1 Reply Last reply
            0
            • bjornhallbergB Offline
              bjornhallbergB Offline
              bjornhallberg
              Hero Member
              wrote on last edited by bjornhallberg
              #10

              I have the MQTT sketch (basically the same right?), a clone uno r3 and a clone w5100 shield with a three test sensors reporting data every 10min. Even had a motion sensor sketch completely pummel the gateway with a few hundred messages in a very short time. Does seem to work as intended for me at least. Doesn't show up under device list in the router either though. Same thing with my other Uno+W5100 that I also have connected for my old custom (no mysensors) mailbox alarm, despite it having routines to specifically request and re-request an ip using dhcp, it also usually doesn't show in the list (also running Tomato).

              I can also ping the IP for the MQTT gateway and get a response. Surely there must be a lot of people on the forum that have the ethernet shield working with the vanilla nrf24? This is the first I've heard of this.

              1 Reply Last reply
              0
              • Dan S.D Offline
                Dan S.D Offline
                Dan S.
                Hero Member
                wrote on last edited by
                #11

                I plugged the sensor into the computer to monitor it. Start the serial gateway and the sensor shows proper commo with the gateway and Vera registers the light value. After a time the gateway stops commo the sensor. Restart the gateway and it starts communicating again. Right now the Ethernet gateway and the sensor have been reliably communicating for about an hour. Am guessing if I had the SPI bus problem it wouldn't work at all or is it that it causes the gateway to randomly lock up like I am experiencing?

                1 Reply Last reply
                0
                • AnticimexA Offline
                  AnticimexA Offline
                  Anticimex
                  Contest Winner
                  wrote on last edited by
                  #12

                  The shield maybe has a HW workaround to handle the SPI issue. I have gotten my GW to work using Ethernet as well, but have not investigated stability. My primary concern for the moment is to make sure the SPI problem is resolved in a good way. Using a soft SPI solution at least works, but I think of it is a last resort.

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

                  1 Reply Last reply
                  0
                  • Dan S.D Offline
                    Dan S.D Offline
                    Dan S.
                    Hero Member
                    wrote on last edited by
                    #13

                    Well, the gateway worked fine for an hour and a half, and then it stopped communicating with the sensor. Once that happens, it never recovers by itself. Have to unplug it , plug it back in and reload vera and everything starts working again.

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

                      And you'we got a cap on radio and tried switching power supply?

                      1 Reply Last reply
                      0
                      • Dan S.D Offline
                        Dan S.D Offline
                        Dan S.
                        Hero Member
                        wrote on last edited by
                        #15

                        Yes Have a cap on the radio and even have the radio receiving its 3.3 power from AMS1117 with everything connected to a 1 amp wall wart. It does seem to be a heat/power related problem. I noted that it stays online longer if I give it time to cool down before restarting. I am going to try a different, more capable wall wart.

                        1 Reply Last reply
                        0
                        • Dan S.D Offline
                          Dan S.D Offline
                          Dan S.
                          Hero Member
                          wrote on last edited by
                          #16

                          Tried new 2 amp 5v dc power supply. Same thing--after about an hour of receiving and acknowledging sensor messages, stopped responding to the messages. Plugin still appears to be connected to and communicating with Vera via the Ethernet, but no responding to (and probably not hearing) the sensor. My inclination is to blame the sharing of the SPI bus but I have no direct evidence and doubt that it is causing my problem. Need suggestions for further debugging. The only clue is that unplugging and plugging in the gateway results in it reestablishing commo with the sensor. It never appears to lose Ethernet commo with Vera.

                          1 Reply Last reply
                          0
                          • NuubiN Offline
                            NuubiN Offline
                            Nuubi
                            wrote on last edited by
                            #17

                            How often your sketch is sending? Just thinking that if it send continuously, things get piled up.

                            1 Reply Last reply
                            0
                            • Dan S.D Offline
                              Dan S.D Offline
                              Dan S.
                              Hero Member
                              wrote on last edited by
                              #18

                              sensor sends light level once per minute (if it changes during that time). Only one sense reporting

                              1 Reply Last reply
                              0
                              • Dan S.D Offline
                                Dan S.D Offline
                                Dan S.
                                Hero Member
                                wrote on last edited by
                                #19

                                I now have the gateway plugged into the computer to read the serial moniter. Had the sensor hooked up before and the gateway was plugged into the vera. Per the Serial.print line in the gateway sketch it showing the messages it is sending to the sensor. Will see if it hangs up after a while when it is not plugged into the internet. Given that it seems to be executing the main loop properly, would think it is a hardware problem that causes it to eventually stop.

                                1 Reply Last reply
                                0
                                • Dan S.D Offline
                                  Dan S.D Offline
                                  Dan S.
                                  Hero Member
                                  wrote on last edited by
                                  #20

                                  With the Ethernet gateway hooked to the pc and on the serial monitor, it just keeps humming along with no hang ups. So my gateway hangups are Ethernet related.

                                  1 Reply Last reply
                                  0
                                  • Dan S.D Offline
                                    Dan S.D Offline
                                    Dan S.
                                    Hero Member
                                    wrote on last edited by
                                    #21

                                    Would like to try the softSPI solution but as a newbie I am not sure how to modify the gateway sketch and associated libraries to do this. Can anyone provide specific step by step instructions on how to modify and compile the gateway with softSPI?

                                    1 Reply Last reply
                                    0
                                    • AnticimexA Offline
                                      AnticimexA Offline
                                      Anticimex
                                      Contest Winner
                                      wrote on last edited by Anticimex
                                      #22

                                      I am a bit short on time tonight, but here is at least some pointers to get this to work:

                                      1. Get the patched RF24 lib
                                      2. Download the DigitalIO library and add it to your library tree (next to MySensors lib)
                                      3. Patch RF24_config.h to enable softspi, uncomment
                                        //#define SOFTSPI
                                        and select pins to use with
                                        const uint8_t SOFT_SPI_MISO_PIN = 15;
                                        const uint8_t SOFT_SPI_MOSI_PIN = 14;
                                        const uint8_t SOFT_SPI_SCK_PIN = 16;
                                        The setting above mean MOSI on A0, MISO on A1 and SCK on A2 on an Arduino Nano.

                                      I am going to give it another shot to patch the code to use the hardware SPI but I need a couple of days to do it (have other things going on at the moment). If I fail I will check with @hek if the ethernet gw description should be updated with info on how to use softSPI or how we should proceed (perhaps choosing a different ethernet module). No matter what, I intend to bend the W5100 to my will and once I got it wrestled down, I will share the details. This thread would be a good place to track that:

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

                                      Dan S.D 1 Reply Last reply
                                      1
                                      • AnticimexA Anticimex

                                        I am a bit short on time tonight, but here is at least some pointers to get this to work:

                                        1. Get the patched RF24 lib
                                        2. Download the DigitalIO library and add it to your library tree (next to MySensors lib)
                                        3. Patch RF24_config.h to enable softspi, uncomment
                                          //#define SOFTSPI
                                          and select pins to use with
                                          const uint8_t SOFT_SPI_MISO_PIN = 15;
                                          const uint8_t SOFT_SPI_MOSI_PIN = 14;
                                          const uint8_t SOFT_SPI_SCK_PIN = 16;
                                          The setting above mean MOSI on A0, MISO on A1 and SCK on A2 on an Arduino Nano.

                                        I am going to give it another shot to patch the code to use the hardware SPI but I need a couple of days to do it (have other things going on at the moment). If I fail I will check with @hek if the ethernet gw description should be updated with info on how to use softSPI or how we should proceed (perhaps choosing a different ethernet module). No matter what, I intend to bend the W5100 to my will and once I got it wrestled down, I will share the details. This thread would be a good place to track that:

                                        Dan S.D Offline
                                        Dan S.D Offline
                                        Dan S.
                                        Hero Member
                                        wrote on last edited by
                                        #23

                                        @Anticimex Thanks for your input. I downloaded the digitalio library. I assume that I should overwrite the Rf24 lib entries in the Mysensors Utilities lib folder with their patched counterparts?

                                        hekH 1 Reply Last reply
                                        0
                                        • Dan S.D Dan S.

                                          @Anticimex Thanks for your input. I downloaded the digitalio library. I assume that I should overwrite the Rf24 lib entries in the Mysensors Utilities lib folder with their patched counterparts?

                                          hekH Offline
                                          hekH Offline
                                          hek
                                          Admin
                                          wrote on last edited by
                                          #24

                                          @Dan-S.

                                          Yes, exactly. And un-comment SOFTSPI-define in RF24_config.h

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


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular