ethernet receive buffer size

30 Jan 2011

i have a question about the size of the ethernet receive buffer. is it possible to increase the size of it ? i am trying to implement an artnet decoder for ethernet to dmx512 to run from a media server i need 4 universes which is a lot of udp packets 1 universe = 530 bytes * 24 packets per second 4 universes = 96 packets per second currently i can get 2 universes running but anymore than that and i think the ethernet buffer is being ovewritten before i can get the data out of it so can the ethernet receive buffer be made bigger ?

many thanks

Chris

30 Jan 2011

what's a Universe?

96 UDP packets per second is quite a few for a humble microprocessor to handle; there's no flow control with UDP. But you should be reading a UDP packet, not a group of packets.

30 Jan 2011

Hi Steve

A Universe is an array of 512 bytes of data commonly referred to as a DMX Universe which is 512 control channels sent via rs485 at 250k. Artnet is the generic term of the format to send data using UDP packets and working in either broadcast or unicast mode to allow interoperability between devices.As Media servers and moving lights got bigger the number of control channels they required increased which is when artnet came into play and with more computerised consoles with ethernet capability you can get a lot of control channels down a piece of cat5 theoretically 512 chans * 255 universes.

I am only trying to read 1 packet at a time and using the UDP example and measuring 4 universe being sent out having scoped the MBED

read time of packet 13.6us,time between packet 1 & 2 = 56us now the mediaserver sits quietly for approx 32ms before it sends the packets again so after the packets have arrived i have time to work on them this wont receive packets 3 & 4 at 100 mhz so this is where the rx buffer issue could be ?.

But if i switch to 10mhz output on mmedia server I can see all 4 packets coming in with approx 460 us between packet and after packet 4 it sits quietly for 32 ms and does it all again this is a clip of the test code so nothing exotic going on

 case UDPSOCKET_READABLE: //The only event for now
    Host host;
    rxrec = 1;// toggle pin to monitor with scope 13.6us read duration
    while( int len = udp.recvfrom( buf, 768, &host ) )
    {
     if( len <= 0 )
     break;
     rxrec = 0;

main just has netpoll in it

I hope this makes some sense and hopefully someone may have a suggestion how i can get it run at 100mhz happily

many thanks

Chris

19 Aug 2011

Hi Chris,

I'm developing an ArtNet decoder and I come across exactly the same problem as you. With the greatest effort I can barely read 2 universes at 100Mb/s, and 4 if I set the server to 10Mb/s.

Don't really know whether setting the mbed to 10Mb/s would help.

I also think that the problem could be solved with a larger buffer, but I have no idea where to set it.

Have you made ​​any progress with this?

Regards,

Pablo.

19 Aug 2011

Hi Pablo

I am using mbednet by Benoit Locher and it works like a dream.

He wrote it mainly for use with udp packets i think he may be doing an interupt driven code at some point but the current one works.

I have got 4 universes from a media server in unicast mode at 25fps with no issues at all have alook at this and i think it will solve your problems.

I have also tried sending 30universes in limited broadcast mode without any interference

All the best

Chris

19 Aug 2011

Thank you very much Chris, that was very helpful!

Best regards,

Pablo.