Closed olebrun closed 12 years ago
It seems it can be calculate in EtherCard::udpPrepare with myip and mymask and compare the result with dip, am I right ?
For clarity, in fact sending to 255.255.255.255 work but the daemon who listen to the packets on the network is waiting packets for the network broadcast ip, not for for 255.255.255.255.
I have found how to force the dameon to listen to 255.255.255.255 broadcast message, so It's not an issue, perhaps a evolution ? ... sorry for the mess you can close this post :/
Hi,
I use ethercard for an implemetation of the xPL protocol on arduino.
I have a problem sending broadcast UDP packets. On a network 192.168.1.0 sending packet to 255.255.255.255 don't work, I need to specify the real broadcast address of the network ( 192.168.1.255 ) and to modify the tcpip.cpp file, line 317
From : if ((dip[0] & 0xF0) == 0xE0) // multicast address To : if ((dip[0] & 0xF0) == 0xE0 || dip[3] == 0xff) // multicast/broadcast address
This is ugly since a broadcast address don't necessary finish by 255 ... but I don't know how to simply detect if the destination Ip address is the broadcast address of the network ? or Am I missing something ?
Thanks for reading me, sorry for my english.