Ethernet Gateway On Arduino Mega 2056 Issues
-
I have the SEEEDstudio ethernet shield W5200 and am using the ethernet gateway code found here. This works fine with SOFTSPI enabled under Mysensors v2 library on my UNO. However, when I build the code out for my Mega 2056 i get this error on the serial monitor:
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:PDTWhat am I missing here?
-
The SPI Pins are different on the MEGA2560 than on a 328-Arduino.
How is your wiring of the NRF24L01+?
-
@wergeld - Maybe this can give you some hints? https://forum.mysensors.org/topic/1245/building-an-ethernet-gateway-on-an-arduino-mega/3
-
@wergeld - Maybe this can give you some hints? https://forum.mysensors.org/topic/1245/building-an-ethernet-gateway-on-an-arduino-mega/3
@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). -
@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).@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. -
@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.@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. -
Try with following defines and wire accordingly:
#define MY_RF24_CE_PIN 40 #define MY_RF24_CS_PIN 53 -
Try with following defines and wire accordingly:
#define MY_RF24_CE_PIN 40 #define MY_RF24_CS_PIN 53@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 -
@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@wergeld
My gateway is based on a mega 2560 with following wiring:40 CE
51 MOSI
50 MISO
52 SCK
53 CSNand the defines from above:
#define MY_RF24_CE_PIN 40 #define MY_RF24_CS_PIN 53Do you have this wiring?
-
@wergeld
My gateway is based on a mega 2560 with following wiring:40 CE
51 MOSI
50 MISO
52 SCK
53 CSNand the defines from above:
#define MY_RF24_CE_PIN 40 #define MY_RF24_CS_PIN 53Do you have this wiring?
@FotoFieber, no. As I stated above this is my wiring:
A2 --> MISO A1 --> MOSI A0 --> SCK 6 --> CSN 5 --> CEWhen 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 --> CETo use your wiring I would need to modify the rest of the pin definitions in the code, yes?
-
@FotoFieber, no. As I stated above this is my wiring:
A2 --> MISO A1 --> MOSI A0 --> SCK 6 --> CSN 5 --> CEWhen 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 --> CETo use your wiring I would need to modify the rest of the pin definitions in the code, yes?
Wiring like this does not apply for the Mega 2056
A2 --> MISO
A1 --> MOSI
A0 --> SCKIf 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 SCKYou need to change your wiring.
-
Wiring like this does not apply for the Mega 2056
A2 --> MISO
A1 --> MOSI
A0 --> SCKIf 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 SCKYou need to change your wiring.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login