IPERF Server example
====================

Example description
-------------------
This example demonstrates the iperf server functionality using LWIP stack.
To use the example, connect an ethernet cable to the board. The board
will acquire an IP address via DHCP and you can ping the board at it's IP
address. 

From the host PC execute the iperf tool with following options: 
- iperf -i 5 -c < Target IP address > -m 
It will display the Interval, Transfer size, bandwidth, etc 

Special connection requirements
-------------------------------
Connect the USB cable between micro connector on the board (on the LPC4088 QSB
close to the reset button) and to a host.

Connect the LPC4088 QSB to a network using the ethernet port.

Build procedures
----------------
Visit the LPCOpen quickstart guides at link "http://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers/lpcopen-v200-quickstart-guides"
to get started building LPCOpen projects.

What to expect from the example
-------------------------------
Open the port in a terminal program with 115200, 8bit, no parity, 1 stop bit and
no flow control.

The program will attempt to get an IP address using DHCP. If that works the program
will output something like this:

Link connect status: 0
Link connect status: 1
IP_ADDR    : 192.168.5.89
NET_MASK   : 255.255.255.0
GATEWAY_IP : 192.168.5.1

NOTE: If you get a IP_ADDR/NET_MASK/GATEWAY_IP of 0.0.0.0 and a Link connect
      status of 1 then just disconnect and reconnect the ethernet cable. There
      seems to be a timing problem. 

If DHCP does not work then turn of DHCP in lwipopts.h by setting the LWIP_DHCP define to 0
and changing the IP address in main() to the preferred one.

When the link connect status is 1, run the iperf program like this:

iperf -i 5 -c 192.168.5.89 -m

Example of output:

------------------------------------------------------------
Client connecting to 192.168.5.89, TCP port 5001
TCP window size: 64.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.5.52 port 23352 connected with 192.168.5.89 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  2.75 MBytes  4.61 Mbits/sec
[  3]  5.0-10.0 sec  2.50 MBytes  4.19 Mbits/sec
[  3]  0.0-10.4 sec  5.38 MBytes  4.34 Mbits/sec
[  3] MSS and MTU size unknown (TCP_MAXSEG not supported by OS?)
