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. Ethernet Gateway On Arduino Mega 2056 Issues

Ethernet Gateway On Arduino Mega 2056 Issues

Scheduled Pinned Locked Moved Troubleshooting
15 Posts 5 Posters 4.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.
  • sundberg84S sundberg84

    @wergeld - Maybe this can give you some hints? https://forum.mysensors.org/topic/1245/building-an-ethernet-gateway-on-an-arduino-mega/3

    W Offline
    W Offline
    wergeld
    wrote on last edited by
    #5

    @sundberg84
    I had read that. But, to be honest I could not make heads or tails about what the posters said did or did not work. There was no definitive answer on that thread. Some said try pins x/y/z and other said to try a/b/c. Yet, no one said "hey, this actually works". Closest was the comment by spugna85. But, looking at the v2 libraries it was already done (hence me using A0-2 pins).

    sundberg84S 1 Reply Last reply
    0
    • W wergeld

      @sundberg84
      I had read that. But, to be honest I could not make heads or tails about what the posters said did or did not work. There was no definitive answer on that thread. Some said try pins x/y/z and other said to try a/b/c. Yet, no one said "hey, this actually works". Closest was the comment by spugna85. But, looking at the v2 libraries it was already done (hence me using A0-2 pins).

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by sundberg84
      #6

      @wergeld - ok, to bad :( give google search a go, it might help you find other threads.
      I cant help you more, not a mega user myself. By the way, ethernet gw works great on Uno or Nano as well.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      W 1 Reply Last reply
      0
      • sundberg84S sundberg84

        @wergeld - ok, to bad :( give google search a go, it might help you find other threads.
        I cant help you more, not a mega user myself. By the way, ethernet gw works great on Uno or Nano as well.

        W Offline
        W Offline
        wergeld
        wrote on last edited by
        #7

        @sundberg84
        Yea, by my UNO is used for templating projects for my slimNode. I am only making the ethernet gateway because the direct-connection of the nrf to the RPi is not yet supporting v2 library. Just seems silly to include extra hardware (uno/mega and ethernet shield) when the RPi has GPIO and the nrf can be connected to it. I am using domoticz on the RPi using serial gateway but only with v1.4.

        1 Reply Last reply
        1
        • FotoFieberF Offline
          FotoFieberF Offline
          FotoFieber
          Hardware Contributor
          wrote on last edited by FotoFieber
          #8

          Try with following defines and wire accordingly:

          #define MY_RF24_CE_PIN 40
          #define MY_RF24_CS_PIN 53
          
          W 1 Reply Last reply
          0
          • FotoFieberF FotoFieber

            Try with following defines and wire accordingly:

            #define MY_RF24_CE_PIN 40
            #define MY_RF24_CS_PIN 53
            
            W Offline
            W Offline
            wergeld
            wrote on last edited by
            #9

            @FotoFieber
            Builds and still I get the error:

            0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
            0;255;3;0;9;TSM:INIT
            0;255;3;0;9;!TSM:RADIO:FAIL
            0;255;3;0;9;!TSM:FAILURE
            0;255;3;0;9;TSM:PDT
            
            FotoFieberF 1 Reply Last reply
            0
            • tlpeterT Offline
              tlpeterT Offline
              tlpeter
              wrote on last edited by
              #10

              I have this error also with a ENC28J60 module.
              I have used the 1.6.8/9 and 11 ide but that doesn't matter.
              This was on an Nano by the way.

              1 Reply Last reply
              0
              • W wergeld

                @FotoFieber
                Builds and still I get the error:

                0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
                0;255;3;0;9;TSM:INIT
                0;255;3;0;9;!TSM:RADIO:FAIL
                0;255;3;0;9;!TSM:FAILURE
                0;255;3;0;9;TSM:PDT
                
                FotoFieberF Offline
                FotoFieberF Offline
                FotoFieber
                Hardware Contributor
                wrote on last edited by
                #11

                @wergeld
                My gateway is based on a mega 2560 with following wiring:

                40 CE
                51 MOSI
                50 MISO
                52 SCK
                53 CSN

                and the defines from above:

                #define MY_RF24_CE_PIN 40
                #define MY_RF24_CS_PIN 53
                

                Do you have this wiring?

                W 1 Reply Last reply
                0
                • FotoFieberF FotoFieber

                  @wergeld
                  My gateway is based on a mega 2560 with following wiring:

                  40 CE
                  51 MOSI
                  50 MISO
                  52 SCK
                  53 CSN

                  and the defines from above:

                  #define MY_RF24_CE_PIN 40
                  #define MY_RF24_CS_PIN 53
                  

                  Do you have this wiring?

                  W Offline
                  W Offline
                  wergeld
                  wrote on last edited by
                  #12

                  @FotoFieber, no. As I stated above this is my wiring:

                  A2 --> MISO
                  A1 --> MOSI
                  A0 --> SCK
                  6 --> CSN
                  5 --> CE
                  

                  When I changed CSN/CE to the 2 pins you mentioned above it was and I was still getting this error:

                  A2 --> MISO
                  A1 --> MOSI
                  A0 --> SCK
                  53 --> CSN
                  40 --> CE
                  

                  To use your wiring I would need to modify the rest of the pin definitions in the code, yes?

                  korttomaK 1 Reply Last reply
                  0
                  • W wergeld

                    @FotoFieber, no. As I stated above this is my wiring:

                    A2 --> MISO
                    A1 --> MOSI
                    A0 --> SCK
                    6 --> CSN
                    5 --> CE
                    

                    When I changed CSN/CE to the 2 pins you mentioned above it was and I was still getting this error:

                    A2 --> MISO
                    A1 --> MOSI
                    A0 --> SCK
                    53 --> CSN
                    40 --> CE
                    

                    To use your wiring I would need to modify the rest of the pin definitions in the code, yes?

                    korttomaK Offline
                    korttomaK Offline
                    korttoma
                    Hero Member
                    wrote on last edited by
                    #13

                    Wiring like this does not apply for the Mega 2056

                    A2 --> MISO
                    A1 --> MOSI
                    A0 --> SCK

                    If you see from here -> https://arduino-info.wikispaces.com/file/view/Mega2-900.jpg/421499040/Mega2-900.jpg

                    Pinout for Mega 2056:
                    51 MOSI
                    50 MISO
                    52 SCK

                    You need to change your wiring.

                    • Tomas
                    W 1 Reply Last reply
                    1
                    • korttomaK korttoma

                      Wiring like this does not apply for the Mega 2056

                      A2 --> MISO
                      A1 --> MOSI
                      A0 --> SCK

                      If you see from here -> https://arduino-info.wikispaces.com/file/view/Mega2-900.jpg/421499040/Mega2-900.jpg

                      Pinout for Mega 2056:
                      51 MOSI
                      50 MISO
                      52 SCK

                      You need to change your wiring.

                      W Offline
                      W Offline
                      wergeld
                      wrote on last edited by
                      #14

                      @korttoma, excellent! I will try this out when I get home from work.

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        wergeld
                        wrote on last edited by
                        #15

                        @korttoma
                        Success! Got this ethernet gateway up and running! Thank you very much.

                        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