Go Down

Topic: Problems sendind udp comands (Read 215 times) previous topic - next topic


Im trying to send an udp comant control to my laptop , from shield…
Im sending at the same time same content to the serial conexión

Just to check this sendings im using Hércules software to know if something is coming to te laptop i.p
the problem ihat im recieving by the serial one but cant see anything from udp hercules viewer

i ve chacked that the laptop ip is the correct one … it can be the port? does the laptop have an specific port to send or recieve udp cpmands?

here is my code

Please let me know how to do.

Another thing is.. how i can get the ethernetudp.h library?

thanks a lot


#include <SPI.h>
#include <Ethernet.h>

EthernetUDP Udp;
byte mac[] = {0x90, 0xA2, 0xDA, 0x0D, 0x5C, 0x18};
IPAddress ip(192,168,1,15);
unsigned int localport = 8888;

IPAddress remoteIP(192,168,1,122);
unsigned int remotePort = 8888;
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);

void setup(){
 Serial.println("Puerto Serial OK");

 Serial.print("IP : ");

void loop(){
 Udp.beginPacket(remoteIP, remotePort);
 Serial.println("Mensaje UDP");


Another thing is.. how i can get the ethernetudp.h library?
If you mean EthernetUdp.h, it's part of the Ethernet library you're already using. If you really meant ethernetudp.h, then I have no idea. In the Arduino IDE, filename case does matter, even on Windows where it normally doesn't.

Go Up