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. Bug Reports
  3. Radio fails to init on W5100

Radio fails to init on W5100

Scheduled Pinned Locked Moved Bug Reports
19 Posts 7 Posters 5.5k Views 5 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #2

    You're aware that the 5100 gateway sketch enabled SoftSPI (which requires another radio wiring).?

    1 Reply Last reply
    0
    • ximinezX Offline
      ximinezX Offline
      ximinez
      wrote on last edited by
      #3

      Yes. When I say that I haven't changed the pins, I mean that I haven't changed the physical pins (or the CE/CSN numbers in my sketch) compared to when the same setup worked with the previous RF24 driver.

      I love the difference in available space the new driver gives, but I'd love it even more if the radio continued to work :-P

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

        Guess we have to call in @tekka here. Wonder if he switched/altered some config when using SoftSPI perhaps.

        1 Reply Last reply
        0
        • ximinezX ximinez

          Yes. When I say that I haven't changed the pins, I mean that I haven't changed the physical pins (or the CE/CSN numbers in my sketch) compared to when the same setup worked with the previous RF24 driver.

          I love the difference in available space the new driver gives, but I'd love it even more if the radio continued to work :-P

          tekkaT Offline
          tekkaT Offline
          tekka
          Admin
          wrote on last edited by
          #5

          @ximinez can you describe your exact settings, wiring and hardware, I'll see if I can reproduce the same behaviour here.

          1 Reply Last reply
          1
          • ximinezX Offline
            ximinezX Offline
            ximinez
            wrote on last edited by ximinez
            #6

            #define MY_DEBUG
            #define MY_RADIO_NRF24
            #define MY_DEBUG_VERBOSE_RF24
            #define MY_GATEWAY_W5100
            #define MY_SIGNING_SOFT
            #define MY_SIGNING_REQUEST_SIGNATURES
            #define MY_RF24_CE_PIN 5
            #define MY_RF24_CS_PIN 6

            Using an UNO with an ethernet shield, wired up like this: https://www.mysensors.org/build/ethernet_gateway
            A2 MISO
            A1 MOSI
            A0 SCK
            6 CSN
            5 CE

            tekkaT 1 Reply Last reply
            0
            • ximinezX ximinez

              #define MY_DEBUG
              #define MY_RADIO_NRF24
              #define MY_DEBUG_VERBOSE_RF24
              #define MY_GATEWAY_W5100
              #define MY_SIGNING_SOFT
              #define MY_SIGNING_REQUEST_SIGNATURES
              #define MY_RF24_CE_PIN 5
              #define MY_RF24_CS_PIN 6

              Using an UNO with an ethernet shield, wired up like this: https://www.mysensors.org/build/ethernet_gateway
              A2 MISO
              A1 MOSI
              A0 SCK
              6 CSN
              5 CE

              tekkaT Offline
              tekkaT Offline
              tekka
              Admin
              wrote on last edited by
              #7

              @ximinez Just tested your setup/settings using an Arduino UNO + W5100 shield and I can confirm, that SOFTSPI (A2=MISO, A1=MOSI, A0=SCK, D6=CSN, D5=CE) and HWSPI (D12=MISO, D11=MOSI, D13=SCK, D6=CSN, D5=CE + #define MY_W5100_SPI_EN 4) work with the refactored RF24 driver.

              Please double check you are using the most recent MySensors 2.0.0-beta lib and GatewayW5100 sketch.

              ximinezX 1 Reply Last reply
              1
              • tekkaT tekka

                @ximinez Just tested your setup/settings using an Arduino UNO + W5100 shield and I can confirm, that SOFTSPI (A2=MISO, A1=MOSI, A0=SCK, D6=CSN, D5=CE) and HWSPI (D12=MISO, D11=MOSI, D13=SCK, D6=CSN, D5=CE + #define MY_W5100_SPI_EN 4) work with the refactored RF24 driver.

                Please double check you are using the most recent MySensors 2.0.0-beta lib and GatewayW5100 sketch.

                ximinezX Offline
                ximinezX Offline
                ximinez
                wrote on last edited by
                #8

                @tekka said:

                @ximinez Just tested your setup/settings using an Arduino UNO + W5100 shield and I can confirm, that SOFTSPI (A2=MISO, A1=MOSI, A0=SCK, D6=CSN, D5=CE) and HWSPI (D12=MISO, D11=MOSI, D13=SCK, D6=CSN, D5=CE + #define MY_W5100_SPI_EN 4) work with the refactored RF24 driver.

                Please double check you are using the most recent MySensors 2.0.0-beta lib and GatewayW5100 sketch.

                I just did (for the second time), and lo and behold it works. Absolutely no clue why, but I'm sorry I've wasted your time.

                My gateway can finally have DHCP and signing at the same time :)

                tekkaT 1 Reply Last reply
                0
                • ximinezX ximinez

                  @tekka said:

                  @ximinez Just tested your setup/settings using an Arduino UNO + W5100 shield and I can confirm, that SOFTSPI (A2=MISO, A1=MOSI, A0=SCK, D6=CSN, D5=CE) and HWSPI (D12=MISO, D11=MOSI, D13=SCK, D6=CSN, D5=CE + #define MY_W5100_SPI_EN 4) work with the refactored RF24 driver.

                  Please double check you are using the most recent MySensors 2.0.0-beta lib and GatewayW5100 sketch.

                  I just did (for the second time), and lo and behold it works. Absolutely no clue why, but I'm sorry I've wasted your time.

                  My gateway can finally have DHCP and signing at the same time :)

                  tekkaT Offline
                  tekkaT Offline
                  tekka
                  Admin
                  wrote on last edited by tekka
                  #9

                  @ximinez excellent :+1: HWSPI uses even less space and saves some analog pins.
                  @hek, AFAIK the initial issues with shared SPI lines and W5100 seem gone - we can eventually update the ethernet gw build instructions...

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

                    @tekka

                    It depends on the module manufacturer. If they use the correct pin for CE, then it's possible. Otherwise the W5100 chip itself hold MISO line low, when the chip is not selected, effectively blocking the spi for other uses

                    So to keep things safe, I suggest that we keep the soft spi option.

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

                      @tekka

                      found this document http://www.i-vis.co.jp/pdf/wiznet/tcpip_chip/w3150a+/W5100_AN_SPI.pdf

                      Look at page 3 "Multiple SPI Slave Usage". It describes the problem with W5100.

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

                        Some W5100 boards also have a SPI-enable signal which can be used to turn off drivers from W5100 when the bus is used elsewhere. That is, enable it only when the W5100 is addressed. I used this in my sketch when I had a W5100-based ethernet gw but I don't think all modules offer this possibility.

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

                        tekkaT 1 Reply Last reply
                        0
                        • AnticimexA Anticimex

                          Some W5100 boards also have a SPI-enable signal which can be used to turn off drivers from W5100 when the bus is used elsewhere. That is, enable it only when the W5100 is addressed. I used this in my sketch when I had a W5100-based ethernet gw but I don't think all modules offer this possibility.

                          tekkaT Offline
                          tekkaT Offline
                          tekka
                          Admin
                          wrote on last edited by
                          #13

                          Yeah, I think it's mainly applicable for the "dual" W5100 shield with SD card adapter.

                          1 Reply Last reply
                          0
                          • ximinezX Offline
                            ximinezX Offline
                            ximinez
                            wrote on last edited by
                            #14

                            Both soft and hard SPI work on my cheap W5100 clone shield (with SD).

                            YveauxY 1 Reply Last reply
                            0
                            • bisschopsrB Offline
                              bisschopsrB Offline
                              bisschopsr
                              wrote on last edited by
                              #15

                              All,

                              Is the content of this topic still valid? All my wiring is according to the intructions (and this topic). I get the following errors:

                              0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
                              0;255;3;0;9;TSM:INIT
                              0;255;3;0;9;RF24:write register, reg=0, value=14
                              0;255;3;0;9;RF24:write register, reg=3, value=3
                              0;255;3;0;9;RF24:write register, reg=4, value=95
                              0;255;3;0;9;RF24:write register, reg=5, value=76
                              0;255;3;0;9;RF24:write register, reg=6, value=39
                              0;255;3;0;9;RF24:read register, reg=6, value=255
                              0;255;3;0;9;RF24:read register, reg=5, value=255
                              0;255;3;0;9;RF24:Sanity check failed: configuration mismatch! Check wiring, replace module or non-P version
                              0;255;3;0;9;!TSM:RADIO:FAIL
                              0;255;3;0;9;!TSM:FAILURE
                              0;255;3;0;9;TSM:PDT
                              0;255;3;0;9;RF24:write register, reg=0, value=12
                              0;255;3;0;9;RF24:power down

                              Note: I did fiddle around with the radio channel settings in myconfig.h, reinstalled the original myconfig.h though.

                              Thx

                              Ralph

                              Domoticz, P1 meter interface, MySensors and more to come!

                              tekkaT 1 Reply Last reply
                              0
                              • bisschopsrB bisschopsr

                                All,

                                Is the content of this topic still valid? All my wiring is according to the intructions (and this topic). I get the following errors:

                                0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
                                0;255;3;0;9;TSM:INIT
                                0;255;3;0;9;RF24:write register, reg=0, value=14
                                0;255;3;0;9;RF24:write register, reg=3, value=3
                                0;255;3;0;9;RF24:write register, reg=4, value=95
                                0;255;3;0;9;RF24:write register, reg=5, value=76
                                0;255;3;0;9;RF24:write register, reg=6, value=39
                                0;255;3;0;9;RF24:read register, reg=6, value=255
                                0;255;3;0;9;RF24:read register, reg=5, value=255
                                0;255;3;0;9;RF24:Sanity check failed: configuration mismatch! Check wiring, replace module or non-P version
                                0;255;3;0;9;!TSM:RADIO:FAIL
                                0;255;3;0;9;!TSM:FAILURE
                                0;255;3;0;9;TSM:PDT
                                0;255;3;0;9;RF24:write register, reg=0, value=12
                                0;255;3;0;9;RF24:power down

                                Note: I did fiddle around with the radio channel settings in myconfig.h, reinstalled the original myconfig.h though.

                                Thx

                                Ralph

                                tekkaT Offline
                                tekkaT Offline
                                tekka
                                Admin
                                wrote on last edited by tekka
                                #16

                                @bisschopsr looks like a SPI issue (return value 255 hints to that).

                                edit: Is this referring to the same issue: https://forum.mysensors.org/topic/4662/ethernet-gateway-with-w5100-radio-error-solved/3 ?

                                bisschopsrB 2 Replies Last reply
                                0
                                • ximinezX ximinez

                                  Both soft and hard SPI work on my cheap W5100 clone shield (with SD).

                                  YveauxY Offline
                                  YveauxY Offline
                                  Yveaux
                                  Mod
                                  wrote on last edited by
                                  #17

                                  @ximinez I also use a w5100 shield with SD card and I need to initialize the cs line of the SD card to high in the before() method, so before mysensors start (when using hardware spi) .
                                  Otherwise the SD card will also be selected on the spi bus during startup and radio init will fail.

                                  http://yveaux.blogspot.nl

                                  1 Reply Last reply
                                  0
                                  • tekkaT tekka

                                    @bisschopsr looks like a SPI issue (return value 255 hints to that).

                                    edit: Is this referring to the same issue: https://forum.mysensors.org/topic/4662/ethernet-gateway-with-w5100-radio-error-solved/3 ?

                                    bisschopsrB Offline
                                    bisschopsrB Offline
                                    bisschopsr
                                    wrote on last edited by
                                    #18

                                    @tekka: More or less. I wanted to know if the beta that was used in this thread still sticks with the content (does this make sense). It is supportive to my other question with the refered link.

                                    Thx

                                    Ralph

                                    Domoticz, P1 meter interface, MySensors and more to come!

                                    1 Reply Last reply
                                    0
                                    • tekkaT tekka

                                      @bisschopsr looks like a SPI issue (return value 255 hints to that).

                                      edit: Is this referring to the same issue: https://forum.mysensors.org/topic/4662/ethernet-gateway-with-w5100-radio-error-solved/3 ?

                                      bisschopsrB Offline
                                      bisschopsrB Offline
                                      bisschopsr
                                      wrote on last edited by
                                      #19

                                      @tekka: In addition: the setup is working now, but not flawless. No radio connection between the node and the GW. But of course this is a different topic.

                                      Domoticz, P1 meter interface, MySensors and more to come!

                                      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.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