已解决! 转到解答。
Solved!
Recompile your Libs with the RTCSCFG_IP_DISABLE_DIRECTED_BROADCAST defined to 0 at user_config.h
#define RTCSCFG_IP_DISABLE_DIRECTED_BROADCAST 0
Additional debugging info:
The datagram sent to 192.168.0.255 is being dropped in the function IP_route_local(). It discards the packet and increments the rx discarded count and the rx addr errors count.
You have gotten farther than me. I can't recieve a broadcast (255,255,255,255) datagram.
I am currently using a stream socket and wanted to add a datagram socket to recieve broadcast datagrams.
What settings allow the reception of UDP broadcasts ?
The code fragment above will do the trick. Nothing more is needed on the receive side.
Typically the problem to send a broadcast datagram is on the sending end. Make sure that you've done a setsockopt(SO_BROADCAST) on the sending socket.
Have you sniffed the wire and observed that the packet is being sent on the wire?