From: salimbaba on
hey! i am using spartan 3E board to transmit UDP packets to my pc. I have
implemented most of it, i have interfaced the PHY but there seems to be one
problem, the data leaves the FPGA bt the packet is dropped at the pc's end,
how i know it is that i can see the light blink bt nothing gets through to
ethereal.
I am assuming that my crc32 is not correct as i have double checked my
other headers, the way i am sending them i.e. lower nibble first followed
by higher nibble of each byte starting from Preamble -> SFD and so on. IP
checksum is also correct as i have implemented it in the same manner as was
said on different forums i.e. add all 16bit ip headers and then take their
one's complement. This final value is our checksum.

i need to know that how should i send data to crc32 generator? i took the
code from [outputlogic.com]. I am sending one byte at a time to the
generator and i am calculating crc32 on the fly. I read it on some forums
that you have to invert or reverse or do what to the bits and then invert
or complement the final result again before transmitting . And also can you
tell me how to transmit the final crc32 value i.e. lowest nibble first or
what.

Thanks!

---------------------------------------
Posted through http://www.EmbeddedRelated.com
From: steve_schefter on
On Apr 1, 10:07 am, "salimbaba" <ark_lightz(a)n_o_s_p_a_m.yahoo.com>
wrote:
> hey! i am using spartan 3E board to transmit UDP packets to my pc. I have
> implemented most of it, i have interfaced the PHY but there seems to be one
> problem, the data leaves the FPGA bt the packet is dropped at the pc's end,
> how i know it is that i can see the light blink bt nothing gets through to
> ethereal.

Ethereal should be able to show you that you have a packet even if it
has an invalid CRC.

First, put ethereal in promiscuous mode. Second, make sure that you
use a simple ethernet card -- one with no onboard calculation of
CRCs.

Ethereal will tell you if the PC is doing CRC calculations or if the
card is doing them by indicating that it sees them as valid. They
won't be valid if they are not completed at the time Ethereal gets
them, that is by the PC's stack. If other traffic has a valid CRC and
Ethereal tells you that the ones from your board don't, you'll have
confirmed that the problem is indeed CRC related. If not, ethereal
should indicate another problem.

Steve
From: salimbaba on

>First, put ethereal in promiscuous mode. Second, make sure that you
>use a simple ethernet card -- one with no onboard calculation of
>CRCs.
>
>Ethereal will tell you if the PC is doing CRC calculations or if the
>card is doing them by indicating that it sees them as valid. They
>won't be valid if they are not completed at the time Ethereal gets
>them, that is by the PC's stack. If other traffic has a valid CRC and
>Ethereal tells you that the ones from your board don't, you'll have
>confirmed that the problem is indeed CRC related. If not, ethereal
>should indicate another problem.
>
> Steve
>

My ethernet card has an on board crc calculator. And one more thing, i am
broadcasting the packets just to make sure they are received at the other
end.

And i read it somewhere that ethereal drops the packets with invalid crc.
And if a packet is received , dont you think that the network light of
incoming traffic should blink? ,it isnt blinking either.

---------------------------------------
Posted through http://www.EmbeddedRelated.com
From: steve_schefter on

> My ethernet card has an on board crc calculator.

That will stop packets with bad CRCs from getting through then. You
are likely correct that it is a CRC problem, but if you want to be
sure, you'll have to get another card or test against another PC.

> And i read it somewhere that ethereal drops the packets with invalid crc.

I don't have a specific reference to indicate the contrary, but
intuitively that doesn't seem correct. Why would ethereal indicate
for each packet that the CRC was valid if it only captured packets
with valid CRCs? At least the newer Wireshark does that, and ISTR
that ethereal does too.

> And if a packet is received , dont you think that the network light of
> incoming traffic should blink? ,it isnt blinking either.  

I'm not following that. In your original post you indicated, "i can
see the light blink bt nothing gets through to ethereal." But to
answer your question, it would depend on who causes the LED to blink
-- the card's interrupt routine or packet processor.

Steve
From: salimbaba on

>That will stop packets with bad CRCs from getting through then. You
>are likely correct that it is a CRC problem, but if you want to be
>sure, you'll have to get another card or test against another PC.
>
hmmm, well i'll see if i can get my hands on another card for testing
purposes.


>I don't have a specific reference to indicate the contrary, but
>intuitively that doesn't seem correct. Why would ethereal indicate
>for each packet that the CRC was valid if it only captured packets
>with valid CRCs? At least the newer Wireshark does that, and ISTR
>that ethereal does too.

you do have a point there. I didnt think of it that way actually :p


>I'm not following that. In your original post you indicated, "i can
>see the light blink bt nothing gets through to ethereal." But to
>answer your question, it would depend on who causes the LED to blink
>-- the card's interrupt routine or packet processor.

And yeah it sounds confusing as i read it now. To make it clear, let me
elaborate it a little bit. When i transmit a packet from FPGA, the light at
the back of cpu i.e. network card's LED blinks indicating that it has
received some data. But the blinking is not displayed in system tray,
network connectivity's icon. i think it's clear now :)

Do you have any idea how should i feed the bytes to the CRC32 generator ?


---------------------------------------
Posted through http://www.EmbeddedRelated.com