Fw: [En-Nut-Discussion] UDP BroadCast

Harald Kipp harald.kipp at egnite.de
Wed Oct 2 12:46:33 CEST 2002


Avex,

No problem and sorry if I may have sound impolite.
I often receive two or more copies of the same email.
In a mailing list the efforts for reading multiplies
by the number of members.

As far as I understood, your application works
except this

NutUdpSendTo(sock_udp, inet_addr("255.255.255.255"), 1234, buff, nRead);

The problem was, that Nut/OS added a wrong checksum
to this UDP telegram. I could verify this. After changing
NutIPChkSumPartial by replacing the inline asm by the C
version, the error disappeared.

I'd recommend to install Ethereal. This will help
you to verify

1. If the packet is sent by Ethernut.
2. If the packet contains the correct checksum.

Regarding the 512 byte array: It is generally a bad idea
to use large arrays as auto variables with Ethernut. Larger
memory areas should be allocated using NutHeapAlloc().

Harald




More information about the En-Nut-Discussion mailing list