Hi Folks,
After my last little brain implosion, I've decided to go back to basics.
I've completely rebuilt my gatewayNode from the ground up, and included the current sketch below.
When I run the serial monitor on the bench, i get a slow "eth failed" message, which I expect (sadly I don't have Ethernet connection at my outdoor workspace) and when I plug it into the router (both USB to power the unit and eth) I get an "eth failed" message approx 4 times a second, but I can PING the address.
I can't add the gateway to MyController, it just times out.
I am powering the radio directly from the 3v pin on the mega, (no cap as I don't have any here) and there is nothing other than the LED indicators plugged into it.
I'm just trying to work out where I should START looking, before i go back to pulling my hair out!
Any advice greatly appreciated!
/**
* NRF24/Ethernet Gateway Node - v0.1
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Pin Confuguration for Arduino Mega
#define MY_RF24_CE_PIN 49
#define MY_RF24_CS_PIN 53
// Radio type
#define MY_RADIO_NRF24
// Ethernet module type
#define MY_GATEWAY_W5100
// MAC Address
#define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
#define MY_IP_ADDRESS 10,0,0,201
#define MY_IP_GATEWAY_ADDRESS 10,0,0,1
#define MY_IP_SUBNET_ADDRESS 255,255,255,0
// Listening Port
#define MY_PORT 5003
// MyController IP Address
#define MY_CONTROLLER_IP_ADDRESS 10,0,0,200
// Enable inclusion mode
#define MY_INCLUSION_MODE_FEATURE
// Enable Inclusion mode button on gateway
//#define MY_INCLUSION_BUTTON_FEATURE
// Set inclusion mode duration (in seconds)
#define MY_INCLUSION_MODE_DURATION 60
// Digital pin used for inclusion mode button
//#define MY_INCLUSION_MODE_BUTTON_PIN 3
// Set blinking period
#define MY_DEFAULT_LED_BLINK_PERIOD 300
// Flash leds on rx/tx/err
#define MY_DEFAULT_ERR_LED_PIN 22 // Error led pin
#define MY_DEFAULT_RX_LED_PIN 26 // Receive led pin
#define MY_DEFAULT_TX_LED_PIN 24 // Transmit led pin
#include <Ethernet.h>
#include <MySensors.h>
void setup()
{
// Setup locally attached sensors
}
void presentation()
{
// Present locally attached sensors here
}
void loop()
{
// Send locally attached sensors data here
}