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. OpenHardware.io
  3. 💬 Sensebender Gateway

💬 Sensebender Gateway

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsgatewaysamd
382 Posts 59 Posters 151.3k Views 53 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.
  • tbowmoT Offline
    tbowmoT Offline
    tbowmo
    Admin
    wrote on last edited by
    #253

    have you tried the ethernet webserver example sketch (default arduino sketch)?

    Just to rule out mysensors..

    Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.

    alexsh1A 3 Replies Last reply
    0
    • tbowmoT tbowmo

      have you tried the ethernet webserver example sketch (default arduino sketch)?

      Just to rule out mysensors..

      Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.

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

      @tbowmo ethernet wedserver sketch is giving me this:

      server is at 0.0.0.0
      

      EDIT: I can ping the IP and yes it is static.

      1 Reply Last reply
      0
      • tbowmoT tbowmo

        have you tried the ethernet webserver example sketch (default arduino sketch)?

        Just to rule out mysensors..

        Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.

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

        @tbowmo Do you think softSPI is at fault? What pins shall I use? I tried these

        #define MY_SOFTSPI
        #define MY_SOFT_SPI_SCK_PIN 24 //13 //23  //14
        #define MY_SOFT_SPI_MISO_PIN 22 //14 //22 //16
        #define MY_SOFT_SPI_MOSI_PIN 23 //12 //21 //15
        
        1 Reply Last reply
        0
        • alexsh1A Offline
          alexsh1A Offline
          alexsh1
          wrote on last edited by
          #256

          @tbowmo I cannot ping it though if I load MySensors GW sketch -
          Destination host unreachable.

          1 Reply Last reply
          0
          • tbowmoT tbowmo

            have you tried the ethernet webserver example sketch (default arduino sketch)?

            Just to rule out mysensors..

            Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.

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

            @tbowmo I have just discovered that the second Ethernet module I have is not W5100 but ENC28J60. Not sure if it is supported by sensebender GW (probably using native Arduino ethernet library?).
            So this module is now being returned and just to figure out any hardware issue I need to order a new W5100

            1 Reply Last reply
            0
            • tbowmoT Offline
              tbowmoT Offline
              tbowmo
              Admin
              wrote on last edited by
              #258

              You should not use soft spi, as there is separate hardware spi ports for radio and W5100.

              If you load the default GatewayW5100 example sketch, then it should work out if the box. Perhaps you need to enable rfm69 instead of nrf24 at the top of the file, but that should be all that is needed.. To get a gateway up and running with W5100

              alexsh1A 1 Reply Last reply
              0
              • tbowmoT Offline
                tbowmoT Offline
                tbowmo
                Admin
                wrote on last edited by
                #259

                @alexsh1

                OK, just to recap here, you have a gateway, and a W5100. If you use that combo, and the http server example, you can ping the gateway, and Load the html files in a browser, right?

                If you load stock GatewayW5100 mysensors example sketch, then does that work? (no need to redefine pins for hardware etc, that is handled by the target hardware profile, you choose in arduino)

                1 Reply Last reply
                0
                • tbowmoT tbowmo

                  You should not use soft spi, as there is separate hardware spi ports for radio and W5100.

                  If you load the default GatewayW5100 example sketch, then it should work out if the box. Perhaps you need to enable rfm69 instead of nrf24 at the top of the file, but that should be all that is needed.. To get a gateway up and running with W5100

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

                  @tbowmo I must admit I have not tried to load files in the browser when trying Ethernet sketch. Only pinging
                  Yes, you are correct - gateway, nrf24l01+ and w5100

                  1 Reply Last reply
                  0
                  • tbowmoT Offline
                    tbowmoT Offline
                    tbowmo
                    Admin
                    wrote on last edited by
                    #261

                    @alexsh1

                    So gateway with nrf and W5100 is working as it should as an ethernet gateway? Then the W5100 is working with the gateway.

                    What is the hardware configuration that you can't get to work? Rfm69 and W5100? Together with the samd GW?

                    (just trying to figure out what is going on :))

                    alexsh1A 1 Reply Last reply
                    0
                    • tbowmoT tbowmo

                      @alexsh1

                      So gateway with nrf and W5100 is working as it should as an ethernet gateway? Then the W5100 is working with the gateway.

                      What is the hardware configuration that you can't get to work? Rfm69 and W5100? Together with the samd GW?

                      (just trying to figure out what is going on :))

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

                      @tbowmo No, sensebender GW is working with nrf24l01+ as a serial GW, but not with W5100 as ethernet GW.

                      Interesting observation - I cannot ping the IP any more if I load the ethernet sketch. For your understanding the sensebender GW was never working with W5100 with either nrf or rfm69. Something going wrong around W5100.

                      I'll hook up W5100 shield to Arduino nano to test it - I have a suspicion about it. However, even without W5100 connected, sensebender GW is showing IP as 0.0.0.0 (I set IP 10.1.1.150). Why?

                      1 Reply Last reply
                      0
                      • tbowmoT Offline
                        tbowmoT Offline
                        tbowmo
                        Admin
                        wrote on last edited by
                        #263

                        If the ethernet library can't initialize the W5100, it will just write IP address as 0.0.0.0.

                        Can you please turn on verbose compile logging in arduino? (file -> Settings, set a checkmark at show verbose output during compilation, and choose "all" in Compiler warnings)

                        I just want to make sure that it is using the correct ethernet library.

                        alexsh1A 1 Reply Last reply
                        0
                        • tbowmoT tbowmo

                          If the ethernet library can't initialize the W5100, it will just write IP address as 0.0.0.0.

                          Can you please turn on verbose compile logging in arduino? (file -> Settings, set a checkmark at show verbose output during compilation, and choose "all" in Compiler warnings)

                          I just want to make sure that it is using the correct ethernet library.

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

                          @tbowmo I have verbose on already.
                          I think you hit the nail on the head:

                          Linking everything together...
                          "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-gcc"  "-LC:\Users\Alex\AppData\Local\Temp\arduino_build_753079" -Os -Wl,--gc-sections -save-temps  "-TC:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\variants\mysensors_gw/linker_scripts/gcc/flash_with_bootloader.ld" "-Wl,-Map,C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.map" --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.elf" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\sketch\GatewayW5100.ino.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\Dhcp.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\Dns.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\Ethernet.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\EthernetClient.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\EthernetServer.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\EthernetUdp.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\utility\socket.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Ethernet\utility\w5100.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\Wire\Wire.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\libraries\SPI\SPI.cpp.o" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079\core\variant.cpp.o" -Wl,--start-group "-LC:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Lib/GCC/" -larm_cortexM0l_math -lm "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/core\core.a" -Wl,--end-group
                          "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O binary  "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.elf" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.bin"
                          "C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom  "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.elf" "C:\Users\Alex\AppData\Local\Temp\arduino_build_753079/GatewayW5100.ino.hex"
                          Multiple libraries were found for "Ethernet.h"
                           Used: C:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\libraries\Ethernet
                           Not used: C:\Program Files (x86)\Arduino\libraries\Ethernet
                          Using library Ethernet at version 1.1.2 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\libraries\Ethernet 
                          Using library MySensors at version 2.2.0-beta in folder: C:\Users\Alex\Documents\Arduino\libraries\MySensors 
                          Using library Wire at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\Wire 
                          Using library SPI at version 1.0 in folder: C:\Users\Alex\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\libraries\SPI 
                          Sketch uses 45512 bytes (17%) of program storage space. Maximum is 262144 bytes.```
                          1 Reply Last reply
                          0
                          • tbowmoT Offline
                            tbowmoT Offline
                            tbowmo
                            Admin
                            wrote on last edited by
                            #265

                            It is using "our" ethernet driver, which it should be.. The default arduino ethernet driver is hardwired to SERCOM0 for SPI, while we have it on SERCOM1.

                            I'll try to bring up one of my own gateways with W5100 later today.

                            1 Reply Last reply
                            0
                            • tbowmoT Offline
                              tbowmoT Offline
                              tbowmo
                              Admin
                              wrote on last edited by
                              #266

                              @alexsh1

                              Below is the startup log from my Gateway with W5100 and RFM69 attached:

                              0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGS--,VER=2.2.0-beta
                              0;255;3;0;9;TSF:LRT:OK
                              0;255;3;0;9;TSM:INIT
                              0;255;3;0;9;TSF:WUR:MS=0
                              0;255;3;0;9;TSM:INIT:TSP OK
                              0;255;3;0;9;TSM:INIT:GW MODE
                              0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
                              0;255;3;0;9;MCO:REG:NOT NEEDED
                              IP: 192.168.1.66
                              0;255;3;0;9;MCO:BGN:STP
                              0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                              

                              As seen, the W5100 is initialized with ip address,

                              Telnet to the Gateway is also working:

                              thomas at thomas-ThinkPad-L450 in ~ 
                              >telnet 192.168.1.66 5003
                              Trying 192.168.1.66...
                              Connected to 192.168.1.66.
                              Escape character is '^]'.
                              200;255;4;0;0;FFFFFFFFFFFFFFFF0300
                              200;255;0;0;17;2.2.0-beta
                              200;255;3;0;6;0
                              200;255;3;0;11;Sensebender Micro
                              200;255;3;0;12;1.4
                              200;1;0;0;6;
                              200;2;0;0;7;
                              200;1;1;0;0;23.3
                              200;2;1;0;1;46
                              200;255;3;0;0;81
                              

                              The above is with the stock example sketch from mysensors (right now latest development branch though). The only things I changed, was to enable RFM69, instead of NRF24, and set a different IP address, to match my network settings.

                              Everything else is running as is, delivered from the mysensors examples..

                              alexsh1A 1 Reply Last reply
                              0
                              • tbowmoT tbowmo

                                @alexsh1

                                Below is the startup log from my Gateway with W5100 and RFM69 attached:

                                0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGS--,VER=2.2.0-beta
                                0;255;3;0;9;TSF:LRT:OK
                                0;255;3;0;9;TSM:INIT
                                0;255;3;0;9;TSF:WUR:MS=0
                                0;255;3;0;9;TSM:INIT:TSP OK
                                0;255;3;0;9;TSM:INIT:GW MODE
                                0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
                                0;255;3;0;9;MCO:REG:NOT NEEDED
                                IP: 192.168.1.66
                                0;255;3;0;9;MCO:BGN:STP
                                0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                                

                                As seen, the W5100 is initialized with ip address,

                                Telnet to the Gateway is also working:

                                thomas at thomas-ThinkPad-L450 in ~ 
                                >telnet 192.168.1.66 5003
                                Trying 192.168.1.66...
                                Connected to 192.168.1.66.
                                Escape character is '^]'.
                                200;255;4;0;0;FFFFFFFFFFFFFFFF0300
                                200;255;0;0;17;2.2.0-beta
                                200;255;3;0;6;0
                                200;255;3;0;11;Sensebender Micro
                                200;255;3;0;12;1.4
                                200;1;0;0;6;
                                200;2;0;0;7;
                                200;1;1;0;0;23.3
                                200;2;1;0;1;46
                                200;255;3;0;0;81
                                

                                The above is with the stock example sketch from mysensors (right now latest development branch though). The only things I changed, was to enable RFM69, instead of NRF24, and set a different IP address, to match my network settings.

                                Everything else is running as is, delivered from the mysensors examples..

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

                                @tbowmo if you take off the W5100 shield, does it still come up with IP please:

                                255;3;0;9;MCO:REG:NOT NEEDED
                                IP: 192.168.1.66
                                
                                1 Reply Last reply
                                0
                                • tbowmoT Offline
                                  tbowmoT Offline
                                  tbowmo
                                  Admin
                                  wrote on last edited by
                                  #268

                                  @alexsh1

                                  This log is without ethernet shield attached

                                  0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGS--,VER=2.2.0-beta
                                  0;255;3;0;9;TSF:LRT:OK
                                  0;255;3;0;9;TSM:INIT
                                  0;255;3;0;9;TSF:WUR:MS=0
                                  0;255;3;0;9;TSM:INIT:TSP OK
                                  0;255;3;0;9;TSM:INIT:GW MODE
                                  0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
                                  0;255;3;0;9;MCO:REG:NOT NEEDED
                                  IP: 0.0.0.0
                                  0;255;3;0;9;MCO:BGN:STP
                                  0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                                  
                                  alexsh1A 1 Reply Last reply
                                  0
                                  • tbowmoT tbowmo

                                    @alexsh1

                                    This log is without ethernet shield attached

                                    0;255;3;0;9;MCO:BGN:INIT GW,CP=RRNGS--,VER=2.2.0-beta
                                    0;255;3;0;9;TSF:LRT:OK
                                    0;255;3;0;9;TSM:INIT
                                    0;255;3;0;9;TSF:WUR:MS=0
                                    0;255;3;0;9;TSM:INIT:TSP OK
                                    0;255;3;0;9;TSM:INIT:GW MODE
                                    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
                                    0;255;3;0;9;MCO:REG:NOT NEEDED
                                    IP: 0.0.0.0
                                    0;255;3;0;9;MCO:BGN:STP
                                    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                                    
                                    alexsh1A Offline
                                    alexsh1A Offline
                                    alexsh1
                                    wrote on last edited by
                                    #269

                                    @tbowmo Thanks - I am assuming that I have a faulty W5100 shield in this case. Unfortunately, I have received a wrong replacement shield enc28j60 instead of W5100. Do you know if Sensebender GW would work with

                                    #define MY_GATEWAY_ENC28J60
                                    

                                    The one I have does not have AMS1117-3.3 on board and must be fed with 3.3V instead of 5v

                                    1 Reply Last reply
                                    0
                                    • alexsh1A Offline
                                      alexsh1A Offline
                                      alexsh1
                                      wrote on last edited by alexsh1
                                      #270

                                      @tbowmo The problem has been identified. I have used a hot fan to re-sit W5100 on the network shield.
                                      AND

                                      0;255;3;0;9;2430 MCO:BGN:INIT GW,CP=RNNGS---,VER=2.2.0-beta
                                      0;255;3;0;9;2477 TSF:LRT:OK
                                      0;255;3;0;9;2487 TSM:INIT
                                      0;255;3;0;9;2497 TSF:WUR:MS=0
                                      0;255;3;0;9;2512 TSM:INIT:TSP OK
                                      0;255;3;0;9;2522 TSM:INIT:GW MODE
                                      0;255;3;0;9;2532 TSM:READY:ID=0,PAR=0,DIS=0
                                      0;255;3;0;9;2542 MCO:REG:NOT NEEDED
                                      IP: 10.1.1.200
                                      0;255;3;0;9;3852 MCO:BGN:STP
                                      0;255;3;0;9;3862 MCO:BGN:INIT OK,TSP=1
                                      

                                      Still cannot ping it, which means there is still a problem with the shield.
                                      It is of a poor quality and does have multiple bridges around W5100 like this:
                                      0_1495292173685_HTB1VJAfNFXXXXaGXFXXq6xXFXXXF.jpg

                                      I found a similar problem here:
                                      https://electronics.stackexchange.com/questions/156147/are-solder-bridges-on-chips-always-bad

                                      At least I know where the problem is.
                                      Thanks @tbowmo

                                      1 Reply Last reply
                                      0
                                      • tbowmoT Offline
                                        tbowmoT Offline
                                        tbowmo
                                        Admin
                                        wrote on last edited by tbowmo
                                        #271

                                        @alexsh1

                                        Great, that we found the problem, and thanks for reporting back here on the forum :)

                                        I haven't tried with other ethernet controllers, than the W5100, And the socket for W5100 is supplied with 5V directly.

                                        Also, I do not know if they are pin compatible?

                                        alexsh1A 2 Replies Last reply
                                        0
                                        • tbowmoT tbowmo

                                          @alexsh1

                                          Great, that we found the problem, and thanks for reporting back here on the forum :)

                                          I haven't tried with other ethernet controllers, than the W5100, And the socket for W5100 is supplied with 5V directly.

                                          Also, I do not know if they are pin compatible?

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

                                          @tbowmo I think they are pin compatible but unfortunately take different voltage. On arduino board, somebody told me that enc28j60 can tolerate 5V. It seems to be the case, as mine survived w5100 socket

                                          EDIT: From the enc28j60 datasheet

                                          • Operating Voltage of 3.1V to 3.6V (3.3V typical)
                                          • 5V Tolerant Input
                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          2

                                          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