These are chat archives for esp8266/Arduino

May 2016
May 21 2016 08:50
hello guys, who know how to config the UDP to broadcasting? and I read the sketch I found the _ip[3] will be set to 255 when broadcasting ....and what the meaning of _ip[3]=255 , ip=255,255,255,255 or ip=xxx,xxx,xxx,255
Gus Grubba
May 21 2016 12:30

The broadcast address for an IPv4 host can be obtained by performing a bitwise OR operation between the bit complement of the subnet mask and the host's IP address. In other words, take the host's IP address, and set to '1' any bit positions which hold a '0' in the subnet mask.

Example: For broadcasting a packet to an entire IPv4 subnet using the private IP address space, which has the subnet mask, the broadcast address is | =

A special definition exists for the IP broadcast address It is the broadcast address of the zero network or, which in Internet Protocol standards stands for this network, i.e. the local network. Transmission to this address is limited by definition, in that it is never forwarded by the routers connecting the local network to other networks.

Michael Miller
May 21 2016 18:50
@liangzelang Make sure you are clear on the difference between broadcast and multicast, most protocols will use multicast instead.
Gus Grubba
May 21 2016 18:52
He cross posted this in a few places. The context was broadcasting.
He was looking at my code here: