BeagleBone black with Arduino Eth. shield UDP issues.

I’m having some issues getting my BeagleBoneBlack (BBB) to talk with my Arduino ethernet shield.
The BBB is running Java and I’m using standard sockets to write/read a message on the UDP port.
The following setups work:

Java (BBB) → Packet Sender (on windows PC) : Packets are successfully sent and received
Java (on Windows PC) → Arduino Ethernet shield : Packets are successfully sent and received
Arduino Ethernet shield → Packet Sender (on windows PC) : Packets are successfully sent and received
Java (BBB) → Arduino Ethernet shield : !!! FAIL !!! Cannot get the two to talk to each other.

Anyone have any idea as to why I can get my pc running java to talk with the Ethernet shield but the BBB running the SAME program
refuses to talk (A connection is established though as far I understand. It throws and error when there is no physical connection).

Details:
I’m deploying the BBB remotely from my PC through Netbeans through USB and the BBB is connected to the ethernet shield through classical ethernet cable.

Running Angstrom on the BBB element 14 rev C

The snippet running on JAVA:

  1. try {

  2. System.out.println(“Waiting for packet from SYSCU…”);

  3. BUFFER = new byte[3];

  4. // Receive request

  5. PACKET = new DatagramPacket(BUFFER, BUFFER.length);

  6. SOCK.receive(PACKET);

  7. // Print out received message

  8. String msg = new String(BUFFER, 0, PACKET.getLength());

  9. System.out.println("Message received from SYSCU: " + msg);

And the Arduino code

Code ©:

  1. void setup() {

  2. Ethernet.begin(mac,ip);

  3. Udp.begin(localPort);

  4. Serial.begin(9600);

  5. while(1){

  6. char str[3];

  7. str[0] = ‘a’;

  8. str[1] = ‘c’;

  9. str[2] = ‘k’;

  10. // Send a new packet

  11. Udp.beginPacket(remoteIP, remotePort); // localPort

  12. Udp.write(str);

  13. Udp.endPacket();

  14. Serial.println("Packet sent, waiting 1000ms ");

  15. delay(1000);

  16. }

  17. Thanks in advance.

Are you using an Ethernet switch or crossover cable?

Some devices are not sensitive to the cable style and will automatically switch TX/RX - possibly your PC. Without this function you’d need to use either an Ethernet switch or a crossover cable.