I am trying to use the W5100 and W3100A in MAC raw mode. (Yes, the W3100A is very old, but I am trying to implement a software fix for a problem the Wiznet modules have with missing ARP requests, and I am trying to fix some old equipment my customers have in the field). Anyway, I have found that neither the W5100 nor the W3100A give me the correct length of the raw ethernet frames. The W5100 seems to pad out all ethernet frames to a minimum length of 60 bytes with extra bytes of zeros. The W3100A seems to pad out all ethernet frames to a minimum length of 64 bytes, and the extra padding bytes are not all zero. For example, a received ARP request frame is 42 bytes long (as confirmed by a Wireshark capture). The W5100 gives me a frame of 60 bytes (the proper 42 bytes plus an extra 18 bytes of zeros. The W3100A gives me a frame of 64 bytes (the proper 42 bytes plus an extra 22 bytes of padding, which are not all zero. I am trying to use the open source LWIP software stack to implement TCP protocol. It seems to be working with the W5100, but not with the W3100A. I think the extra non-zero padding bytes are causing problems.
So why doesn’t either chip give me the correct length for received ethernet frames that are short? I see no reason to pad them out to be longer. And it seems like the non-zero padding bytes are causing problems!
So how can I figure out the correct length of the received ethernet frames in MAC raw mode?