Suggestions on solutions to develop an embedded web server over Ethernet interface

I will develop a device that must be monitored and controlled by remote through an IP connection over Ethernet interface. I'm not an expert of embedded TCP/IP and HTTP server, so I would prefer to separate the main MCU (Cortex-Mx that I already know) from the "remote MCU" (it is a block box at the moment). This separation could be useful if someone will decide to give the remote connection as an option.

The big question is how to design an embedded HTTP server, starting from the hw to the sw. The device is low-cost and the web pages will be simple.

I understood there's Microchip with its ready-to-use solutions (mainly

16- and 32-bits PICs), including a free (even for commercial) open-source TCP/IP stack. I think it has a simple HTTP server too.

Many others (Atmel, NXP, ST), with their Cortex-Mx MCUs with integrated Ethernet controller (with external PHY), use lwip free open-source TCP/IP stack. Simple HTTP server implementation is included.

Is there a low-size low-cost embedded Linux solution? Maybe a cheap System On Module (with processor and some volatile and non-volatile memories)?

The link between the "remote CPU" and the "main MCU" could be a simple asyncronous serial link.

Reply to
pozz
Loading thread data ...

You say simple, but I think the complexity is going to rise:

By 'IP' do you mean 'internet' or is this strictly local? Will it have login credentials? Will it be monitoring/controlling anything where it would be bad if an attacker got hold of it?

If yes to the above, it's likely to need TLS. Some would argue that any answer to #1 requires TLS - any organisation's network starts looking like the internet when it gets large enough. That means you need a webserver capable of TLS, and then a way to manage certificates.

While there are things like mbedTLS, the amount of software work means it's heading towards a Linux solution. The danger with Linux solutions is too many are sold as 'fit and forget', when really you need something that keeps up with security updates. Many are terrible at that, and vendors often give up on a particular SoC after a time that can be measured in months.

You could have a look at the Raspberry Pi Compute Modules. The I/O is a bit limited (GPIO is good, but ethernet is hung off USB) but they have a good software update story and the community documentation is very good. I don't recall the supply lifetime guarantees for the SoMs but I think they do exist.

Should be doable.

Theo

Reply to
Theo Markettos

I agree with the other post and suggest a Raspberry Pi. That is probably the quickest solution.

Another possibility is FreeRTOS. There are ports to many different MCUs and various dev boards. There is a lwip port and examples of web servers, flash file systems and more. I have used FreeRTOS on a NXP M3 and micro ip (uip) tcp/ip stack. I have not used lwip but there is active support and discussion groups.

--
Chisolm 
Republic of Texas
Reply to
Joe Chisolm

I seem to have missed the step where you jumped from "IP" to "TCP/IP & HTTPd".

Reply to
Don Y

Have you web-searched?

I haven't done this myself, but I've seen web servers working on some impressively small microprocessors. AFAIK, once you have a TCP/IP stack going, the web server itself can be fairly small -- all that a really basic web server does is blarfing out HTML in response to requests.

--
Tim Wescott 
Wescott Design Services 
 Click to see the full signature
Reply to
Tim Wescott

This board provides a Wi-Fi solution, not Ethernet so may be way off but the ESP8266 with its numerous variants may work for you:

formatting link

HTH Philip

Reply to
aquaverde

Il 10/02/2017 19:28, Theo Markettos ha scritto: >> Is there a low-size low-cost embedded Linux solution? Maybe a cheap >> System On Module (with processor and some volatile and non-volatile >> memories)? > > You could have a look at the Raspberry Pi Compute Modules. The I/O is a bit > limited (GPIO is good, but ethernet is hung off USB) but they have a good > software update story and the community documentation is very good. I don't > recall the supply lifetime guarantees for the SoMs but I think they do > exist.

Recently Raspberry company released a new version of Compute Module, named CM3 (Compute Module 3). I already used the original CM1 version in an old project. I think Raspberry solutions are very good if the project provides an HDMI interface, otherwise I think there are better solutions at a similar price.

In my current project, where I need an Ethernet interface, CM SOMs aren't good because, as you wrote, Ethernet is not CPU native.

The cheapest embedded Linux SOM I know is A13-SOM-256 from Olimex[1]. It is sold for 18EUR (12.60EUR@1000pcs). It is cheaper than CM1 and CM3 from Raspberry. However A13-SOM-256 (and is big brother A13-SOM-512) doesn't provide Ethernet connectivity (I think because A13 CPU from Allwinner hasn't this feature natively).

We need the A20-SOM to have Ethernet connectivity, but the price rises to 40EUR (30.10EUR@1000pcs). Maybe adding a USB/Ethernet bride (such as LAN9512 from Microchip) to A13-SOM-256 is cheaper than A20-SOM (but I don't know what the performance will be).

Another nice SOM is CORE9X35[2] from CoreWind. It is a SMD SOM running Linux and provides and Ethernet interface with integrated PHY. The price of the model with 256MB is only 36USD (32.4USD@1000pcs)

[1]
formatting link
[2]
formatting link
Reply to
pozz

Il 10/02/2017 19:28, Theo Markettos ha scritto: >> Is there a low-size low-cost embedded Linux solution? Maybe a cheap >> System On Module (with processor and some volatile and non-volatile >> memories)? > > You could have a look at the Raspberry Pi Compute Modules. The I/O is a bit > limited (GPIO is good, but ethernet is hung off USB) but they have a good > software update story and the community documentation is very good. I don't > recall the supply lifetime guarantees for the SoMs but I think they do > exist.

Recently Raspberry company released a new version of Compute Module, named CM3 (Compute Module 3). I already used the original CM1 version in an old project. I think Raspberry solutions are very good if the project provides an HDMI interface, otherwise I think there are better solutions at a similar price.

In my current project, where I need an Ethernet interface, CM SOMs aren't good because, as you wrote, Ethernet is not CPU native.

The cheapest embedded Linux SOM I know is A13-SOM-256 from Olimex[1]. It is sold for 18EUR (12.60EUR@1000pcs). It is cheaper than CM1 and CM3 from Raspberry. However A13-SOM-256 (and is big brother A13-SOM-512) doesn't provide Ethernet connectivity (I think because A13 CPU from Allwinner hasn't this feature natively).

We need the A20-SOM to have Ethernet connectivity, but the price rises to 40EUR (30.10EUR@1000pcs). Maybe adding a USB/Ethernet bride (such as LAN9512 from Microchip) to A13-SOM-256 is cheaper than A20-SOM (but I don't know what the performance will be).

Another nice SOM is CORE9X35[2] from CoreWind. It is a SMD SOM running Linux and provides and Ethernet interface with integrated PHY. The price of the model with 256MB is only 36USD (32.4USD@1000pcs)

[1]
formatting link
[2]
formatting link
Reply to
pozz

I didn't realise also the Ethernet chip is not on the Compute Module - ie you need to add the LAN9512 (or another USB ethernet chip) plus magnetics on your board. That makes for slightly more pain.

I would caution about picking random modules based on price alone. There's a lot of race-to-the-bottom stuff out of China (eg the Pi knockoffs like Orange Pi, Banana Pi etc). The problem is that the software story is not very good - you end up running old kernels, updates don't happen, nobody is supporting the Linux distro, there are binary blobs in the tree so you can't just build a recent kernel. I'm think of Allwinner particularly, though I understand some parts are better supported than others[1].

Maybe you can make it work for you - if you sell enough volume you can pay someone to keep on top of it. But things like binary blobs can't be fixed no matter how much manpower you throw at it. Unfortunately what seems to happen is products are thrown out the door and nobody keeps up: I bought a product recently with a 2009 Linux kernel. When I asked for the GPL source they sent me source for 2.6.15 from 2006 (and there were binary blobs too).

Maybe you can navigate all those things (eg binary graphics drivers don't matter for your application), but something to be aware of rather than buying on price.

Perhaps a suggestion for good support would be: don't buy anything that isn't in the mainline Linux tree. But I think that very much limits your options.

Theo

[1] Allwinner seems to be getting there:
formatting link
Reply to
Theo Markettos

This might be of interest:

formatting link
Also:
formatting link

Both supposedly have ethernet pins.

Linux is almost certainly easier to program, but there are also Cortex-M solutions.

Do you absolutely need ethernet? There's tons of cheap wifi stuff:

formatting link

Or even smaller and cheaper ESP8266 boards:

formatting link
formatting link

Reply to
Paul Rubin

Ethernut

formatting link
is also an option.

--
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de 

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt 
 Click to see the full signature
Reply to
Uwe Bonnes

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.