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.
On Sun, Jul 12, 2015 at 2:50 AM, <[email protected]> wrote: > 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. > 3. System > > <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system> > .out.println("Waiting for packet from SYSCU..."); > 4. > 5. > 6. BUFFER = new byte[3]; > 7. > 8. // Receive request > 9. PACKET = new DatagramPacket > > <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+datagrampacket> > (BUFFER, BUFFER.length); > 10. SOCK.receive(PACKET); > 11. > 12. // Print out received message > 13. String > > <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string> > msg = new String > > <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string> > (BUFFER, 0, PACKET.getLength()); > 14. System > > <http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system> > .out.println("Message received from SYSCU: " + msg); > > > > > And the Arduino code > Code (C): > > 1. void setup() { > 2. > 3. Ethernet.begin(mac,ip); > 4. Udp.begin(localPort); > 5. > 6. Serial.begin(9600); > 7. > 8. > 9. while(1){ > 10. > 11. > 12. char str[3]; > 13. str[0] = 'a'; > 14. str[1] = 'c'; > 15. str[2] = 'k'; > 16. > 17. > 18. // Send a new packet > 19. Udp.beginPacket(remoteIP, remotePort); // localPort > 20. Udp.write(str); > 21. Udp.endPacket(); > 22. > 23. Serial.println("Packet sent, waiting 1000ms "); > 24. > 25. delay(1000); > 26. > 27. } > 28. > 29. > 30. Thanks in advance. > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
