TinyCTS/AL - lwIP - µHTTP
Introduction
Hardware
Software
lwIP
MicroHTTP Library
Download
 

Introduction

From time to time I searched a HTTP server which could be used with lwIP. I found some examples, but these could only serve a simple http file. But now I found MicroHTTP which looks very promising to use it with lwIP. Therefore I create a Proof of Concept to test if TinyCTS/AL, lwIP and MicroHTTP can be used together. An older version with ChibiOS can be found here.

Hardware

For this example the following boards was used:

Software

The software use the following key components:

For the compiler, CrossWorks for ARM v3.6.5 was used. The project with my source can be found under the download section.

lwIP

Also, it seems a bit difficult to get the best performance from lwIP. There exists a lot of settings by the configuration file which influence the performance. For measuring the performance JPerf (IPerf) can be used:

(Click inside the picture to expand)

Here the STM3240G-EVAL board with 1 connection was used. A RX performance of 3.49 MBytes/sec was reached with the default value of 536 for the maximum segment size (TCP_MSS). The JPerf client task will accept up to 4 parallels streams, give it a try:

(Click inside the picture to expand)

With 4 parallel streams a transfer rate of 6.85 MBytes/sec was reached.

To measure the TX performance, wget was used:

C:\Temp>wget http://192.168.1.200/testimg.bin
--17:23:40-- http://192.168.1.200/testimg.bin
               => `testimg.bin'
Connecting to 192.168.1.200:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1,048,576 [text/plain]

100%[====================================>] 1,048,576 2.54M/s ETA 00:00

17:23:40 (2.54 MB/s) - `testimg.bin' saved [1048576/1048576]

Here a TX performance of 2.54 MByte/sec was reached. The performance could be increased by changing TCP_MSS, but at the same time more RAM is needed.

MicroHTTP Library

In the moment there exist no separate packages. The MicroHTTP software is an extract from the Ethernut project. More information about MicroHTTP can be find here. The features from MicroHTTP looks very promising.

Download

stm3240g-tctsal-lwip_20170209 (2.09 MB)

stm3220g-tctsal-lwip_20170209 (1.95 MB)

e407-tctsal-lwip_20170203 (2.08 MB)

ea1788-tctsal-lwip_20170204 (1.98 MB)