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. Gateway Not Working

Gateway Not Working

Scheduled Pinned Locked Moved Troubleshooting
43 Posts 5 Posters 16.1k Views 2 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.
  • clippermiamiC Offline
    clippermiamiC Offline
    clippermiami
    Hero Member
    wrote on last edited by
    #1

    Please bear with me here, i'm new to Arduino and not sure where to begin. i finally got all the bits and pieces for my Vera Ethernet Gateway, got them assembled and wiring double checked. I've compiled and uploaded to a Arduino Nano. I've modified the IP address to my network (192.168.15.118) and the Port to 80 for simplicity. When I connect it all up and PING it I get no response so obviously something is wrong.

    Results of the compile/upload are attached. Can someone look at this and point me to a resolution?

    Thanks.

    John
    ethernetgateway_compile.txt

    1 Reply Last reply
    0
    • clippermiamiC Offline
      clippermiamiC Offline
      clippermiami
      Hero Member
      wrote on last edited by
      #2

      It has just occurred to me that perhaps the gateway code doesn't respond to Ping so I may have gone down the wrong path to start with :-)

      1 Reply Last reply
      0
      • clippermiamiC Offline
        clippermiamiC Offline
        clippermiami
        Hero Member
        wrote on last edited by
        #3

        So here's where I am after several more hours of fiddling ... nowhere. Results the same as before. I've recompiled the gateway using 192.168.15.118:5001 and uploaded it to the Nano. Compile results exactly the same as before. Vera reports
        "Lua Failure" and "MySensors plugin: Cannot send command - communications failure.

        I've triple checked the connections so I'm confident that's not the problem. I have power to both the Nano and the Ethernet shield and the Nano has a Red LED on solid, slow flashing green LED. My router is no detecting the IP address or MAC for the device so something is clearly gone South.

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

          I see the following line last in your logfile:

          avrdude: stk500_getsync(): not in sync: resp=0x00
          

          This means that nothing has been uploaded to your Arduino. Please check your Tools->Board and Tools->Processor setting.

          1 Reply Last reply
          0
          • clippermiamiC Offline
            clippermiamiC Offline
            clippermiami
            Hero Member
            wrote on last edited by
            #5

            Oh, OK, thanks much. Hopefully I'll get a handle on this soon.

            1 Reply Last reply
            0
            • clippermiamiC Offline
              clippermiamiC Offline
              clippermiami
              Hero Member
              wrote on last edited by
              #6

              Well, some progress anyway. The USB driver had failed to install properly. I uninstalled it and did a scan for changes, it found the device and properly installed the device driver at COM6.

              I recompiled with that setting and Nano w/ ATMega328 as the device. It says the upload completed properly (this time the Tx/Rx LEDs on the Nano were flashing).

              I can see LAN traffic coming TO the device on the Ethernet connector but nothing going out.

              But I still get communications failure so obviously I have another problem.

              BTW is PING supported on the Ethernet side?

              hekH 1 Reply Last reply
              0
              • clippermiamiC clippermiami

                Well, some progress anyway. The USB driver had failed to install properly. I uninstalled it and did a scan for changes, it found the device and properly installed the device driver at COM6.

                I recompiled with that setting and Nano w/ ATMega328 as the device. It says the upload completed properly (this time the Tx/Rx LEDs on the Nano were flashing).

                I can see LAN traffic coming TO the device on the Ethernet connector but nothing going out.

                But I still get communications failure so obviously I have another problem.

                BTW is PING supported on the Ethernet side?

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

                @clippermiami

                I don't think the Ethernet library answers ping messages by default.
                Instead you have to connect with telnet (or like) to the ip/port..

                clippermiamiC 1 Reply Last reply
                0
                • hekH hek

                  @clippermiami

                  I don't think the Ethernet library answers ping messages by default.
                  Instead you have to connect with telnet (or like) to the ip/port..

                  clippermiamiC Offline
                  clippermiamiC Offline
                  clippermiami
                  Hero Member
                  wrote on last edited by
                  #8

                  @hek Well, I cannot get a Telnet connection so there is a basic flaw somewhere. My router normally sees the IP/MAC of any device that comes up on the LAN and it doesn't report 192.168.15.118 or the default MAC DEADBEEFFED so I'm not getting anything at this point. So, back to the drawing board. I'll try recompiling and upload again maybe that will help. I've triple checked the wiring, I see LAN activity at the Ethernet connector socket, I have power on the Arduino and the Ethernet. I suppose I could have a defective Nano or Ethernet but at this point I have no way to change one out.

                  1 Reply Last reply
                  0
                  • clippermiamiC Offline
                    clippermiamiC Offline
                    clippermiami
                    Hero Member
                    wrote on last edited by
                    #9

                    I've tried all the "obvious" solutions (re-compiling, rewiring, etc) so I've ordered another Ethernet shield so see if that's the problem.

                    hekH 1 Reply Last reply
                    0
                    • clippermiamiC clippermiami

                      I've tried all the "obvious" solutions (re-compiling, rewiring, etc) so I've ordered another Ethernet shield so see if that's the problem.

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

                      @clippermiami

                      What does the Arduino IDE serial log say when you connect the gateway to a computer?

                      There is very limited program space on the Arduino which means that full MySensors debug prints unfortunately not can be enabled when running the Ethernet sketch (at least for the ENJ-model).

                      But nothing stops you rom creating your own debug print Serial.println("xxx") at strategic places in your sketch to see what is happening.

                      clippermiamiC 1 Reply Last reply
                      0
                      • hekH hek

                        @clippermiami

                        What does the Arduino IDE serial log say when you connect the gateway to a computer?

                        There is very limited program space on the Arduino which means that full MySensors debug prints unfortunately not can be enabled when running the Ethernet sketch (at least for the ENJ-model).

                        But nothing stops you rom creating your own debug print Serial.println("xxx") at strategic places in your sketch to see what is happening.

                        clippermiamiC Offline
                        clippermiamiC Offline
                        clippermiami
                        Hero Member
                        wrote on last edited by clippermiami
                        #11

                        @hek Regrettably I'm not far enough along in my understanding of Arduino as t yet to know how to do that. I readily admit to trying to get something working bootstrapping off someone else's work :-) Once I have this going I will have further incentive to dig deeper ... In the meantime I have to puzzle through it although I'm beginning to rethink that approach :-)

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

                          You got a Vera right?

                          Could you perhaps try the SerialGateway instead (where you can do some debugging)? And when you get it working switch to the Ethernet version?

                          Look here on how to enable debugging:
                          http://www.mysensors.org/build/debug

                          clippermiamiC 1 Reply Last reply
                          0
                          • hekH hek

                            You got a Vera right?

                            Could you perhaps try the SerialGateway instead (where you can do some debugging)? And when you get it working switch to the Ethernet version?

                            Look here on how to enable debugging:
                            http://www.mysensors.org/build/debug

                            clippermiamiC Offline
                            clippermiamiC Offline
                            clippermiami
                            Hero Member
                            wrote on last edited by
                            #13

                            @hek That's an idea worth exploring :-)

                            Thanks further link, I've got another Ethernet adapter arriving tomorrow so depending on when get time to fiddle again may try the new Ethernet fitter failing that revert the serial. Thanks for your patience

                            1 Reply Last reply
                            0
                            • SleepyhatS Offline
                              SleepyhatS Offline
                              Sleepyhat
                              wrote on last edited by
                              #14

                              Just FYI - I am using one of the ethernet shields like this one: ENC28J60(one of the "HAN RUN" cheap cards - my serial number on the part is the same, the "date code" looking number is different, though). What I found through trial and error was that when I was using the radio AND the ethernet shield, my 3.3V pin could not power both, so the ethernet card would not properly initialize. I finally figured this out by using an "arp -a" on my linux system and noticed that the DE:AD:BE:EF:FE:ED mac address always showed up with an IP of 0.0.0.0 even though it was hardcoded into the sketch.

                              The solution? This card ls 5V tolerant. I put my radio on the 3.3V pin, the ethernet on the 5V pin and my problem was solved - the card initializes properly every time. My radio on the gateway has also been a lot more stable (still using a 4.7uf cap, though).

                              To be clear - I am NOT saying just plug any card into 5V and expect it to work. Do check out the specs on your card, see if it is 5V tolerant and if you are willing to accept the risk and try it, it may be something to look into. I also recommend you turn on debug like Hek recommended. That helped me a good bit as well see where things were getting hung up on other sensor issues after I got past the ethernet issue...

                              Good Luck!

                              clippermiamiC 1 Reply Last reply
                              0
                              • SleepyhatS Sleepyhat

                                Just FYI - I am using one of the ethernet shields like this one: ENC28J60(one of the "HAN RUN" cheap cards - my serial number on the part is the same, the "date code" looking number is different, though). What I found through trial and error was that when I was using the radio AND the ethernet shield, my 3.3V pin could not power both, so the ethernet card would not properly initialize. I finally figured this out by using an "arp -a" on my linux system and noticed that the DE:AD:BE:EF:FE:ED mac address always showed up with an IP of 0.0.0.0 even though it was hardcoded into the sketch.

                                The solution? This card ls 5V tolerant. I put my radio on the 3.3V pin, the ethernet on the 5V pin and my problem was solved - the card initializes properly every time. My radio on the gateway has also been a lot more stable (still using a 4.7uf cap, though).

                                To be clear - I am NOT saying just plug any card into 5V and expect it to work. Do check out the specs on your card, see if it is 5V tolerant and if you are willing to accept the risk and try it, it may be something to look into. I also recommend you turn on debug like Hek recommended. That helped me a good bit as well see where things were getting hung up on other sensor issues after I got past the ethernet issue...

                                Good Luck!

                                clippermiamiC Offline
                                clippermiamiC Offline
                                clippermiami
                                Hero Member
                                wrote on last edited by
                                #15

                                @Sleepyhat Thanks, I'll have to look at that and see if helps. I have another Ethernet on the way tomorrow too

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

                                  Well, my "new" Ethernet shield arrived and there is no change.

                                  The Vera logs reflect what would be expected, no response from the Arduino Gateway

                                  root@MiOS_30010119:/tmp/log/cmh# tail -f LuaUPnP.log | grep "192.168.15.118"
                                  4547 root 1672 S ping -c 1 192.168.15.118
                                  4545 root 1676 S /bin/sh -c ping -c 1 192.168.15.118
                                  4547 root 1672 S ping -c 1 192.168.15.118
                                  4575 root 1672 S grep 192.168.15.118
                                  4545 root 1676 S /bin/sh -c ping -c 1 192.168.15.118
                                  4547 root 1672 S ping -c 1 192.168.15.118
                                  4575 root 1672 S grep 192.168.15.118
                                  50 04/28/14 14:48:11.941 luup_log:292: Arduino: Using network connection: IP address is 192.168.15.118:5001 <0x2b92f680>
                                  01 04/28/14 14:48:14.956 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:21.966 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:28.976 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:35.986 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:42.996 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:50.006 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:48:57.026 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:04.036 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:11.046 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:18.056 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:25.066 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:32.076 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:39.086 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:45.156 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:52.166 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  01 04/28/14 14:49:59.176 IOPort::Connect connect -1 192.168.15.118:5001 <0x35640680>
                                  ^C
                                  root@MiOS_30010119:/tmp/log/cmh#

                                  So I guess the enext step is to fall back to the Serial Gateway as @hek has suggested and try to go forward from there.

                                  1 Reply Last reply
                                  0
                                  • clippermiamiC Offline
                                    clippermiamiC Offline
                                    clippermiami
                                    Hero Member
                                    wrote on last edited by clippermiami
                                    #17

                                    As @hek suggested I went to the SerialGateway route and it it appears to have worked, at least Vera can apparently talk to it I no longer get Lua startup failures. The "Lib version" is 1.2+ and clicking "Start" inclusion results in "0 devices found" --- there are no sensors built yet so that makes sense.

                                    I'd still like to get the Ethernet version working, I want to place the gateway elsewhere. But at this point i know my Arduino works and it does compile and upload, Vera can talk to it.

                                    1 Reply Last reply
                                    0
                                    • clippermiamiC Offline
                                      clippermiamiC Offline
                                      clippermiami
                                      Hero Member
                                      wrote on last edited by
                                      #18

                                      I've built and installed the serial Gateway (Arduino Nano ATMEGA328) and I've wired up a Light Sensor (Arduino Pro Mini 5v ATMEGA328).

                                      Apparently Vera recognizes the Gateway, the Vera USB LED flashes continuously several times per second I get nothing attempting to include a device from the Vera Plugin.

                                      I've brought both the Gateway and Sensor up on a PC on separate USB ports and started the Serial Port Monitor for each, the Gateway on COM6 and the Sensor on COM11. When I power up the devices I get "0;0;4;11;Arduino startup complete." on each and that's it. I tried manually sending a message in each direction but I do not get anything on the other end and there is no confirmation that it was sent or received.

                                      The "Arduino startup complete" tells me that both Arduinos are OK and that the programs are running on each.

                                      1 Reply Last reply
                                      0
                                      • clippermiamiC Offline
                                        clippermiamiC Offline
                                        clippermiami
                                        Hero Member
                                        wrote on last edited by
                                        #19

                                        On a guess I changed the radio modules on the Gateway and the Sensor to no avail.

                                        If I accidentally touch the Gateway Nano I get a few dozen outputs like this:
                                        0;0;4;11;Message available on pipe 7
                                        0;0;4;11;Message available on pipe 7
                                        0;0;4;11;Message available on pipe 7

                                        But nothing else.

                                        I'm composing messages on each end as follows:
                                        0;0;4;11;Test Message "x"

                                        There is no indication that these messages are processed on either end let alone transmitted.

                                        hekH 1 Reply Last reply
                                        0
                                        • clippermiamiC clippermiami

                                          On a guess I changed the radio modules on the Gateway and the Sensor to no avail.

                                          If I accidentally touch the Gateway Nano I get a few dozen outputs like this:
                                          0;0;4;11;Message available on pipe 7
                                          0;0;4;11;Message available on pipe 7
                                          0;0;4;11;Message available on pipe 7

                                          But nothing else.

                                          I'm composing messages on each end as follows:
                                          0;0;4;11;Test Message "x"

                                          There is no indication that these messages are processed on either end let alone transmitted.

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

                                          @clippermiami

                                          What example sketch are you running on the sensor node?

                                          What do you mean by "0;0;4;11;Test Message "x""? Where are you composing this message? Are you using the MySensors API to send a message?

                                          Just stay calm .. we will fix this :smile:

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


                                          10

                                          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