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 tbowmo

    @alexsh1

    Could you check the soldering of the samd?

    SD card fails, if you haven't inserted a card, when running the self test.

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

    @tbowmo

    I do not have the SD card so that's fine

    The samd looks fine - no bridges etc
    I can try to re-solder it with a hot fan
    Do you think samd may be at fault even though the serial GW is working?

    Unfortunately, I do not have another Ethernet w5100 to try it. Probably have to order a new one

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

      @alexsh1

      I know that @Anticimex had problems with one of the pre-production samples that we got from China, with various problems, that was solved with "reflowing" the samd with a hot air gun.. So it was just a thought, that it could be a bad solder joint..

      The W5100 is using it's own dedicated SPI port, so even though that the radio works, doesn't mean that there couldn't be any solder problems around the samd pins for W5100.

      We have 3 different SPI ports in use on the gateway, one for the MysX connector, one for radio / sdcard, and one for W5100..

      alexsh1A 1 Reply Last reply
      0
      • tbowmoT tbowmo

        @alexsh1

        I know that @Anticimex had problems with one of the pre-production samples that we got from China, with various problems, that was solved with "reflowing" the samd with a hot air gun.. So it was just a thought, that it could be a bad solder joint..

        The W5100 is using it's own dedicated SPI port, so even though that the radio works, doesn't mean that there couldn't be any solder problems around the samd pins for W5100.

        We have 3 different SPI ports in use on the gateway, one for the MysX connector, one for radio / sdcard, and one for W5100..

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

        @tbowmo I do not have the oven to reflow the whole board, but can mount / unmount or re-work certain components 0805 or 0603. Below this it is a pain in the a***

        Another observation - The GW behaves like this with or without W5100 mounted.
        Seems like an SPI problem to me. How can I wire W5100 to MYSX please and what shall I can in the sketch please? Thank for your help - very much appreciate it

        AnticimexA 1 Reply Last reply
        0
        • alexsh1A alexsh1

          @tbowmo I do not have the oven to reflow the whole board, but can mount / unmount or re-work certain components 0805 or 0603. Below this it is a pain in the a***

          Another observation - The GW behaves like this with or without W5100 mounted.
          Seems like an SPI problem to me. How can I wire W5100 to MYSX please and what shall I can in the sketch please? Thank for your help - very much appreciate it

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

          @alexsh1 The ATSHA is not connected to the SPI and is totally unrelated, so I am also inclined to suspect that perhaps one side of the SAMD is not entirely in contact with the pads. I had to hot-airgun mine to get USB working well but it was an early prototype like @tbowmo said.

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

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

            @tbowmo OK, I manage to find the answer here -

            MYSX
            D11 - MOSI
            D12 - MISO
            D13 - SCK
            D14 -CS

            #define MY_SOFTSPI
            #define MY_SOFT_SPI_SCK_PIN 13
            #define MY_SOFT_SPI_MISO_PIN 12
            #define MY_SOFT_SPI_MOSI_PIN 11
            MY_RF24_CS_PIN 14
            RF24_CE_PIN ???

            Am I correct?

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

              My current config for nrf24l01+ and w5100 is as follows:

              #define MY_GATEWAY_W5100
              
              #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
              #endif
              
              #define MY_RF24_CE_PIN 5
              #define MY_RF24_CS_PIN 6
              

              Why CE / CS pins are 5 and 6?
              Should that be 27 and 3?

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

                @tbowmo I have just re-worked SAMD and all the connectors (nrf24l01+ and NET_SPI), but still have the same issue sadly.

                EDIT: If I change to rfm69, the same behavior is observed. It seems that Net_SPI is just not working.

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

                  @alexsh1

                  Configuration of the pins are handled by the hardware configuration file, https://github.com/mysensors/ArduinoHwSAMD/blob/master/variants/mysensors_gw/variant.h#L227

                  If you look in the gatewayW5100 sketch, the settings for CE / CS pins are enclosed in ifdefs, so they are only used if they are not defined previously.

                  If you want to connect the W5100 to the mysx connector, you can change line 174 in the hardware definition file, use SPI2 instead of SPI1 for SPI_ETH

                  It could also be a defective W5100 shield? Can you verify that it works on other hardware?

                  alexsh1A 1 Reply Last reply
                  0
                  • tbowmoT tbowmo

                    @alexsh1

                    Configuration of the pins are handled by the hardware configuration file, https://github.com/mysensors/ArduinoHwSAMD/blob/master/variants/mysensors_gw/variant.h#L227

                    If you look in the gatewayW5100 sketch, the settings for CE / CS pins are enclosed in ifdefs, so they are only used if they are not defined previously.

                    If you want to connect the W5100 to the mysx connector, you can change line 174 in the hardware definition file, use SPI2 instead of SPI1 for SPI_ETH

                    It could also be a defective W5100 shield? Can you verify that it works on other hardware?

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

                    @tbowmo Swapping SPIs did not resolve the problem. I am now getting another W5100 to test further.

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

                      Unfortunately, a new W5100 shield did not work - it seems like a production issue with this sensebender gatewsay as the SPI2 did not work either with W5100.
                      Will get a new one ordered.

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

                        Is it possible for you to check the spi wires with a scope? Just to make sure if mosi/miso/ce/Ss lines are toggling as expected?

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

                          Another thing, are you using static ip? If yes, can you ping it? If no, does your DHCP server hand out an ip address?

                          Have you tried the basic ethernet examples for the W5100?

                          alexsh1A 1 Reply Last reply
                          0
                          • tbowmoT tbowmo

                            Another thing, are you using static ip? If yes, can you ping it? If no, does your DHCP server hand out an ip address?

                            Have you tried the basic ethernet examples for the W5100?

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

                            @tbowmo I am using the static IP and I can ping it, but the "Gateway Ready" message never comes up. Also I can only see the neg24l01+ log (incoming messages only)

                            tbowmoT 1 Reply Last reply
                            0
                            • alexsh1A alexsh1

                              @tbowmo I am using the static IP and I can ping it, but the "Gateway Ready" message never comes up. Also I can only see the neg24l01+ log (incoming messages only)

                              tbowmoT Offline
                              tbowmoT Offline
                              tbowmo
                              Admin
                              wrote on last edited by
                              #241

                              @alexsh1

                              If you can ping it, then the W5100 is configured. Something else is wrong..

                              One thing that comes to mind, if you compile it as an ethernet GW, then it does not wait for serial console to be active, before initializing the radio. If you compile it as serial GW, then it waits with initialization, until serial is active.

                              This means that you probably is missing the GW ready message on the serial port, as it is "sent" before you have an active serial connection.

                              Look in MyHwSamd.cpp in the HwInit routine, remove the #ifdef around the while() loop, and try again.

                              alexsh1A 1 Reply Last reply
                              0
                              • tbowmoT tbowmo

                                @alexsh1

                                If you can ping it, then the W5100 is configured. Something else is wrong..

                                One thing that comes to mind, if you compile it as an ethernet GW, then it does not wait for serial console to be active, before initializing the radio. If you compile it as serial GW, then it waits with initialization, until serial is active.

                                This means that you probably is missing the GW ready message on the serial port, as it is "sent" before you have an active serial connection.

                                Look in MyHwSamd.cpp in the HwInit routine, remove the #ifdef around the while() loop, and try again.

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

                                @tbowmo Well, if I try the MEGA 2560 with W5100, I get the following:

                                0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
                                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: 10.1.1.120
                                0;255;3;0;9;MCO:BGN:STP
                                0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                                

                                I never get this message with Sensebender GW. I only get

                                0;255;3;0;9;TSF:MSG:READ,11-11-0,s=2,c=1,t=37,pt=7,l=5,sg=0:2019.12
                                0;255;3;0;9;TSF:MSG:READ,11-11-0,s=0,c=1,t=37,pt=7,l=5,sg=0:6275.51
                                0;255;3;0;9;TSF:MSG:READ,11-11-0,s=3,c=1,t=37,pt=7,l=5,sg=0:18.77
                                

                                or similar messages from nodes.

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

                                  @alexsh1

                                  on atmega2560 you are resetting the device, when you connect a serial terminal to the usb device, so you get all the debug messages on the serial port..

                                  On SAMD it uses a native USB port, and the chip is not reset when connecting a serial terminal. When using serialGw it will wait until a serial terminal is connected. before initializing radio transport (this is because it does not make sense to have a serial gateway that spits out data to a none existing port).

                                  When using it as a ethernet gateway, we skip this, as we do not want to wait for a serial terminal, in case you are just using the USB as a power source. So in this mode, it skips the waiting, and just initializes radio gateway etc.

                                  as stated in my previous message you could look at the MyHwSAMD.cpp file line 73. Remove the #ifdef recompile, upload, and check your serial terminal again.

                                  Also the log shows that you actually are receiving data from your nodes, so the radio transport is clearly active.. And you can ping your gateways static IP, which means that the W5100 is initialized with the correct IP address.

                                  1 Reply Last reply
                                  0
                                  • alexsh1A alexsh1

                                    @tbowmo Well, if I try the MEGA 2560 with W5100, I get the following:

                                    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1
                                    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: 10.1.1.120
                                    0;255;3;0;9;MCO:BGN:STP
                                    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
                                    

                                    I never get this message with Sensebender GW. I only get

                                    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=2,c=1,t=37,pt=7,l=5,sg=0:2019.12
                                    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=0,c=1,t=37,pt=7,l=5,sg=0:6275.51
                                    0;255;3;0;9;TSF:MSG:READ,11-11-0,s=3,c=1,t=37,pt=7,l=5,sg=0:18.77
                                    

                                    or similar messages from nodes.

                                    tbowmoT Offline
                                    tbowmoT Offline
                                    tbowmo
                                    Admin
                                    wrote on last edited by
                                    #244

                                    @alexsh1

                                    Did you try my suggestion about hacking the core? Or did you give up on the beast? :)

                                    I'm curious to hear if it is solved..

                                    alexsh1A 2 Replies Last reply
                                    0
                                    • tbowmoT tbowmo

                                      @alexsh1

                                      Did you try my suggestion about hacking the core? Or did you give up on the beast? :)

                                      I'm curious to hear if it is solved..

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

                                      @tbowmo I will try it tomorrow. However, given the amount of time I spent already, I am about to give up...

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        micropet
                                        wrote on last edited by
                                        #246

                                        Hello everybody.

                                        I got my Sensebender gateway yesterday. Have the W5100 Ethernet board mounted and loaded a sketch with the WizNET (W5100) Ethernet module and MQTT.

                                        The gateway immediately ran as desired.
                                        Unfortunately only for about 2 hours, then it freezes.
                                        After a restart it runs again 3 hours and freezes again.
                                        And so on.

                                        I wanted to replace an RPI Gatway, which has worked flawlessly for many weeks.

                                        If the Sensebender gateway works only a few hours it is quite useless.

                                        tbowmoT 1 Reply Last reply
                                        0
                                        • M micropet

                                          Hello everybody.

                                          I got my Sensebender gateway yesterday. Have the W5100 Ethernet board mounted and loaded a sketch with the WizNET (W5100) Ethernet module and MQTT.

                                          The gateway immediately ran as desired.
                                          Unfortunately only for about 2 hours, then it freezes.
                                          After a restart it runs again 3 hours and freezes again.
                                          And so on.

                                          I wanted to replace an RPI Gatway, which has worked flawlessly for many weeks.

                                          If the Sensebender gateway works only a few hours it is quite useless.

                                          tbowmoT Offline
                                          tbowmoT Offline
                                          tbowmo
                                          Admin
                                          wrote on last edited by
                                          #247

                                          @micropet

                                          It must be a software issue. Are you using it with nrf24? Do you have a github account? If you have, would you mind filling an issue report on the mysensors library? As we need to dig further into this. Please also make a note of how many nodes you have running in your system.

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


                                          23

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