receive udp packet in device
in
Contributed Library Questions
•
1 year ago
I'm trying to receive udp packet in device , I check everything , the packet is send from another computer and I tested with wireshark to make sure that the packet is send but the device couldn't get it . I start by sending simply two numbers.
here is the code :
import hypermedia.net.*;
int PORT_RX=3000; //port
String HOST_IP="192.168.0.20"; // servers IP address
UDP udp;
void setup(){
udp= new UDP(this,PORT_RX,HOST_IP);
udp.log(true);
udp.listen(true);
noLoop();
}
void draw(){
}
void recieve(byte[] data,String HOST_IP, int PORT_RX){
String value = new String(data);
println(value);
}
but I receive this error :
opening socket failed!
> address:192.168.0.20, port:3000 [group:null]
> Permission denied
could you help me ?
1