No sdcard, I'm also powering the board through FTDI.
Right now I'm running this code on the board
#include <SPI.h> // needed for Arduino versions later than 0018
#include <Ethernet.h>
#include <EthernetUdp.h> // UDP library from:
bjoern@cs.stanford.edu 12/30/2008
// Ent er a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 0, 177);
unsigned int localPort = 8888; // local port to listen on
// buffers for receiving and sending data
char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //buffer to hold incoming packet,
char ReplyBuffer[] = "acknowledged"; // a string to send back
// An EthernetUDP instance to let us send and receive packets over UDP
EthernetUDP Udp;
void setup() {
// start the Ethernet and UDP:
Ethernet.begin(mac,ip);
Udp.begin(localPort);
Serial.begin(9600);
}
void loop() {
// if there's data available, read a packet
int packetSize = Udp.parsePacket();
Serial.print("Local IP ");
Serial.println(Ethernet.localIP());
if(Udp.available())
{
Serial.print("Received packet of size ");
Serial.println(packetSize);
Serial.print("From ");
IPAddress remote = Udp.remoteIP();
for (int i =0; i < 4; i++)
{
Serial.print(remote[i], DEC);
if (i < 3)
{
Serial.print(".");
}
}
Serial.print(", port ");
Serial.println(Udp.remotePort());
// read the packet into packetBufffer
Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);
Serial.println("Contents:");
Serial.println(packetBuffer);
// send a reply, to the IP address and port that sent us the
packet we received
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
Udp.write(ReplyBuffer);
Udp.endPacket();
}
delay(10);
}
And the Rx led is constantly blinking.
I tried using this python code to send an UDP package to the board but still UDP.available() does not return true.
import socket
UDP_IP="192.168.0.177"
UDP_PORT=8888
MESSAGE="TEST"
sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
And it didn't work.
I fired up wireshark and saw that the board was not responding to ARP requests so I added a static entry in the ARP table
arp -s 192.168.0.177 DE:AD:BE:EF:FE:ED
then ran the pyhton script again and saw that the board received the message on the serial monitor.
But it doesn't send anything back.
Also the biggest issue right now seems to be that it can't establish a link, mii-tool shows no link or link successfully negotiated every time I run it.
I uploaded the code again and neither Rx or Tx are blinking and link negotiation fails.
Any pointers?