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
    #45

    My soft spi version is up and running. Didn't work at first (Vera lua errora) till I read that you moved gw.begin in setup() to be done after the delay(1000). After doing that I was up and running. Will keep my fingers crossed for long term reliability.

    1 Reply Last reply
    0
    • AnticimexA Anticimex

      Hm. But I ordered my W5100 modile from the "store" and it has the SPI_EN signal. But I do not think it has POE on the other hand. I think it since then has been replaced with a different module on the store though.
      This is the one I got.

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

      @Anticimex Was wondering how you knew/diagnosed that it was necessary to move the gw begin to after the delay to get the soft spi to work

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

        @Anticimex Was wondering how you knew/diagnosed that it was necessary to move the gw begin to after the delay to get the soft spi to work

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

        @Dan-S. I actually stumbled upon that when I was experimenting with the SPI_EN signal and temporarily disabled ethernet or rf24 to see which interfered with what. I never went into why this had to be done because after I went back to HW SPI and rebased my library to get the latest updates, I got it to work without switching the order as well.

        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
          #48

          Well if it wasn't for that stumble, my softSpi Ethernet gateway wouldn't be humming along like it is right now. If the softSpi is a solution for all Ethernet shield users, regardless of the version and SPI_EN hookup, would recommend a more formal documentation of the procedure. Maybe a whole separate softspi version of the library only for creation of the ethernet shield gateway that can then be discarded and replaced with the normal library for all the sensors. Those doing breadboarding or with known compatible shields can opt for the hard wire version.

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

            I suspect the re-ordering is only necessary for soft-SPI variants, possibly due to some unclear dependency in the init of the IO. I agree that a soft-SPI alternative RF solution could be a useful complement to the library.

            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
              #50

              After 24 hours of continuous operation with the softSPI version of my ethernet shield based gateway with no hiccups, I'm ready to declare victory and move on!! A special thanks to Anitcimex, without whose help it would not have been possible.

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

                Great news Dan :)
                I have also verified my gw on breadboard and am now working on the final product. I'll publish both HW and SW design on the forum. It will feature a new twist on the gateway I don't think anyone have done before ;)

                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
                  #52

                  Hate to keep this thread going but although I focused mostly on the SPI end of the problem here, I found out I also had a radio problem--in fact all of my problems may have been related to the radio. I thought I was doing good in powering the antenna version of the radio using the AMS117 to supply 3.3 v rather than the board supplied 3.3V. Found out that when I did this the radio would quit working after a while. When connected directly to my UNO 3.3v supply (and the uno has enough power for the radio) it works flawlessly. If anyone has any insights on this would appreciate a response.

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

                    Hate to keep this thread going but although I focused mostly on the SPI end of the problem here, I found out I also had a radio problem--in fact all of my problems may have been related to the radio. I thought I was doing good in powering the antenna version of the radio using the AMS117 to supply 3.3 v rather than the board supplied 3.3V. Found out that when I did this the radio would quit working after a while. When connected directly to my UNO 3.3v supply (and the uno has enough power for the radio) it works flawlessly. If anyone has any insights on this would appreciate a response.

                    RJ_MakeR Offline
                    RJ_MakeR Offline
                    RJ_Make
                    Hero Member
                    wrote on last edited by
                    #53

                    @Dan-S.

                    Noise? Ripple? Overheating? What kind of circuit did you build around it.?

                    Looking at the datasheet; pages 4 and 5 may be of some help.

                    ds1117.pdf

                    RJ_Make

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

                      Using the AMS117 module shown in mysensor store. Vin connected directly to the same power line powering the Uno, ground to uno ground and Vout to the radio whose ground is also to Uno (common ground for uno, AM117 module and radio). Power supplied by 5volt, 2amp wall wart.

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

                        Using the AMS117 module shown in mysensor store. Vin connected directly to the same power line powering the Uno, ground to uno ground and Vout to the radio whose ground is also to Uno (common ground for uno, AM117 module and radio). Power supplied by 5volt, 2amp wall wart.

                        RJ_MakeR Offline
                        RJ_MakeR Offline
                        RJ_Make
                        Hero Member
                        wrote on last edited by
                        #55

                        @Dan-S.
                        Capacitor across vcc and gnd on the radio?

                        RJ_Make

                        1 Reply Last reply
                        0
                        • RJ_MakeR RJ_Make

                          @Dan-S.

                          Noise? Ripple? Overheating? What kind of circuit did you build around it.?

                          Looking at the datasheet; pages 4 and 5 may be of some help.

                          ds1117.pdf

                          M Offline
                          M Offline
                          meanpenugin
                          Hardware Contributor
                          wrote on last edited by
                          #56

                          @ServiceXp
                          I believe the part that is at the store already has the supporting circuitry on the board as described in those pages. I don't think there is any external components necessary.
                          Edward

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

                            I do have a cap on the radio in addition to whatever is onboard the part. Also the UNO power is connected to through the USB connector if that affects anything.

                            RJ_MakeR 1 Reply Last reply
                            0
                            • M meanpenugin

                              @ServiceXp
                              I believe the part that is at the store already has the supporting circuitry on the board as described in those pages. I don't think there is any external components necessary.
                              Edward

                              RJ_MakeR Offline
                              RJ_MakeR Offline
                              RJ_Make
                              Hero Member
                              wrote on last edited by
                              #58

                              @meanpenugin
                              Yep, I thought he was using the chip. :-)

                              RJ_Make

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

                                I do have a cap on the radio in addition to whatever is onboard the part. Also the UNO power is connected to through the USB connector if that affects anything.

                                RJ_MakeR Offline
                                RJ_MakeR Offline
                                RJ_Make
                                Hero Member
                                wrote on last edited by
                                #59

                                @Dan-S.
                                What size cap? In testing I found I needed a pretty big cap (47uF) to get mine working with MySensor version 1.4.

                                RJ_Make

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

                                  Thought about this some more. I supplied power to both the radio and the Uno from the same wall wart 5v power source. But when the Uno is supplied 5v from its USB connector, the power from that connection is not regulated by the UNO. Since the radio has significant fluctuations in power output (and demand) it may cause significant ripples in its power source line--the same one which sources the UNO. Because the UNO is not regulating this power, it may have caused problems with the UNO (not the radio). Perhaps I should have capped the UNO power source also or at least should have had 2 separate power supplies, one for the UNO and one for the radio. Thought I was being clever in using one. At any rate the gateway continues to run with no problems with the radio getting power directly from the UNO's 3.3V output pin. The UNO provides enough power from this pin to power the radio with no issues.

                                  1 Reply Last reply
                                  0
                                  • greglG Offline
                                    greglG Offline
                                    gregl
                                    Hero Member
                                    wrote on last edited by
                                    #61

                                    Thanks everyone esp. @Anticimex for your troubleshooting on this.
                                    I didnt realise i had an issue with my 1.4 Ethernet GW ( using the iBoard hardware) as i wasn't using it in "production" and since it was just running from my PC's USB port it was restarted each time i woke my PC.

                                    Anyway - to bring stability to the Iboard , i just added to the original sketch the line:

                                    SPI.setClockDivider(SPI_CLOCK_DIV2); //to assist with gateway stability.
                                    

                                    eg:

                                    void setup()  
                                    { 
                                     SPI.setClockDivider(SPI_CLOCK_DIV2); //to assist with gateway stability.
                                      // Initialize gateway at maximum PA level, channel 70 and callback for write operations 
                                      gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
                                     
                                      Ethernet.begin(mac, myIp);
                                    
                                      // give the Ethernet interface a second to initialize
                                        delay(1000);
                                      
                                        // start listening for clients
                                        server.begin();
                                      }
                                    

                                    Thanks again!

                                    AnticimexA 1 Reply Last reply
                                    0
                                    • greglG gregl

                                      Thanks everyone esp. @Anticimex for your troubleshooting on this.
                                      I didnt realise i had an issue with my 1.4 Ethernet GW ( using the iBoard hardware) as i wasn't using it in "production" and since it was just running from my PC's USB port it was restarted each time i woke my PC.

                                      Anyway - to bring stability to the Iboard , i just added to the original sketch the line:

                                      SPI.setClockDivider(SPI_CLOCK_DIV2); //to assist with gateway stability.
                                      

                                      eg:

                                      void setup()  
                                      { 
                                       SPI.setClockDivider(SPI_CLOCK_DIV2); //to assist with gateway stability.
                                        // Initialize gateway at maximum PA level, channel 70 and callback for write operations 
                                        gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
                                       
                                        Ethernet.begin(mac, myIp);
                                      
                                        // give the Ethernet interface a second to initialize
                                          delay(1000);
                                        
                                          // start listening for clients
                                          server.begin();
                                        }
                                      

                                      Thanks again!

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

                                      @gregl You're welcome :)
                                      Actually, I read somewhere that SPI.setClockDivider(SPI_CLOCK_DIV2) is a default setting in the device, but maybe various AVRs differ.
                                      In any case, I found that when breadboarding, it might actually be needed to lower it to DIV4 as well.
                                      Eventually, SPI.setClockDivider(SPI_CLOCK_DIV2) will be executed when SPI is configured in the library, but possibly some SPI calls are made without this call since you notice a difference when adding the call yourself before calling any library function.

                                      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
                                        #63

                                        Still having an issue with my ethernet gateway (Uno plus shield). Works flawlessly for up to 24 hours, then shuts down. When working, responds without fail to every message from my test light sensor, but then fails to respond to any message. If I take the gateway offline, then restart everything it goes through the same process--working for some length of time, then shutting down. Have tried soft spi, separate power for the radio etc., and each time I think I have found the solution till it shuts down again. Any suggestions. Thinking that it is a hardware issue given that it operates fine for hours before stopping.

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

                                          Hm. Perhaps dodgy USB circuitry? (for powering the Arduino that is) assuming you do that. Have you tried alternative power supply for the Arduino as well?

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

                                          Dan S.D 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          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