cancel
Showing results for 
Search instead for 
Did you mean: 

lwip UDP disable CRC

ariel2
Associate II
Posted on May 31, 2015 at 01:33

Hello!

I am looking for an overhead free solution for UDP data streaming.

Today I am able to stream UDP data from SPI->DMA->MEM->ETH, using pbuf by Ref:

    TaskUdpStreamErr = netbuf_ref(buf, dataPointer, TASK_UDP_STREAM_PACKET_SIZE);

    // dataPointer is filled by the DMA and shared with the with other tasks

    

The issue is

that I want to add a one byte header to the UDP packet, but I want to avoid copying from one memory to another AND I want to avoid packet fragmentation.

so I tried this hack:

    TaskUdpStreamErr = netbuf_ref(buf, dataPointer, TASK_UDP_STREAM_PACKET_SIZE + 1);

    buf->p->flags = 0x80 | (i << 5) | ci;

    

    -- And in the low_level_output():

    if (q->flags & 0x80)

    {

        *((uint8_t*)buffer + bufferoffset) = q->flags;

        bufferoffset += 1;

        byteslefttocopy -= 1;

    }

Problem is that it will fail on the CRC...

    

1. Is there a way to disable the CRC? is it a valid solution?

2. What other solution do you suggest?
0 REPLIES 0