Introduction
From time to time I searched an embedded HTTP server which could be used.
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.
Therefore I create a Proof of Concept to test if MicroHTTP, TinyCTS/AL and Nut/Net
or lwIP can be used together.
MicroHTTP is part of the Ethernut project based on Nut/OS for the real time operating
system and Nut/Net for the TCP/IP stack. But here the Nut/OS scheduler was replaced
by TinyCTS/AL. Examples was now created with Nut/Net and lwIP for the TCP/IP stack.
In the moment there exist no separate MicroHTTP packages. The MicroHTTP software is an
extract from the Ethernut project.
This is still a Proof of Concept and under development.
An other version with ChibiOS and lwIP can be found
here in the archive.
Hardware
For this example the following boards was used:
Software
The software use the following key components:
For the compiler, CrossWorks for ARM
was used. The project with my source can be found under the download section.
Performance
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 bandwith performance
JPerf (IPerf) was used:
lwIP
|
1 |
2 |
3 |
4 |
Mbits/s |
11.2 |
15.1 |
15.1 |
14.9 |
CPU load (%) |
76 |
100 |
100 |
100 |
Nut/Net
|
1 |
2 |
3 |
4 |
Mbits/s |
17.7 |
30.7 |
34.0 |
33.9 |
CPU load (%) |
59 |
93 |
100 |
100 |
Here the QSB4088com board with 1, 2, 3, and 4 connection with a maximum segment size (TSS_MSS) of 536 was used.
Summary
It look that in a comparison of the performance only, Nut/Net is the better choice here. But I think it is the wrong
way to run Nut/Net with TinyCTS/AL like I have done this. It worked on some tests, but I got problems when I wanted
to use mbedTLS with a BeagleBone Black for example. This could also be due to my socket emulation for Nut/Net or other
reasons. Btw, this example here was only a part of a bigger one.
MicroHTTP always worked without any problems during the tests.
My conclusion here is that you should use the Ethernut project with
the original Nut/OS if you want to use Nut/Net too.
Even with the drop in performance I will continue to follow up the combination of TinyCTS/AL, lwIP and MicroHTTP.
Download lwIP examples
bf4088-tctsal-lwip_20181223 (2.38 MB)
b3-tctsal-lwip_20181223 (2.12 MB)
Download Nut/Net examples
bf4088-tctsal-nutnet_20181223 (1.43 MB)
|