Blue wrote:
Hello to everybody,
For my final exam I have to realise a connection between a PC and a
camera via TCP/IP. On the camera the LwIP Stack (Version 1.1.1) is
embedded. It is the first time, that I work with LwIP.
At the moment I have realized the connection with the low-level “callback”
API, the higher-level “sequential” API can not be used on the camera.
I’m able to transmit pictures from the camera to the PC, but it is not
fast enough. I can transmit four frames in a second (compiles about 53
MBit/s). The camera and the PC have a 1000 Mbit/s Ethernet Port, so that
this is fast enough. When I send only text data as fast as possible the
maximal transfer rate is 86 Mbit/s and I need around 160 Mbit/s to get a
usable result.
Has anybody experiences with transfer rates and knows which transfer rates
are possible with the LwIP TCP Stack and which parameter is relevant to
get the transmission faster?
Assuming you've got enough memory, optimise your TCP MSS to what will fit
in the MTU. Increase the window size as large as you can. Enable lwIP's
statistics and see if it's running out of any resources. Do packet sniffing
to see if you can find any abnormal delays.
Does your ethernet driver copy packets? Maybe for your application you may
wish to try doing zero-copy packets (assuming your ethernet MAC can DMA).
Ultimately, some hardware (CPU, memory bus, ethernet MAC) simply isn't fast
enough to drive things over the wire fast enough. You may have already hit
the limit with your hardware.
Jifl