Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #25814 > unrolled thread

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

Started bypozz <pozzugno@gmail.com>
First post2017-02-10 18:27 +0100
Last post2017-02-13 01:02 -0800
Articles 11 — 8 participants

Back to article view | Back to comp.arch.embedded


Contents

  Suggestions on solutions to develop an embedded web server over Ethernet interface pozz <pozzugno@gmail.com> - 2017-02-10 18:27 +0100
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Theo Markettos <theom+news@chiark.greenend.org.uk> - 2017-02-10 18:28 +0000
      Re: Suggestions on solutions to develop an embedded web server over Ethernet interface pozz <pozzugno@gmail.com> - 2017-02-13 00:36 +0100
      Re: Suggestions on solutions to develop an embedded web server over Ethernet interface pozz <pozzugno@gmail.com> - 2017-02-13 00:36 +0100
        Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Theo Markettos <theom+news@chiark.greenend.org.uk> - 2017-02-13 08:04 +0000
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Joe Chisolm <jchisolm6@earthlink.net> - 2017-02-10 13:52 -0600
      Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Uwe Bonnes <bon@hertz.ikp.physik.tu-darmstadt.de> - 2017-02-13 11:43 +0000
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Don Y <blockedofcourse@foo.invalid> - 2017-02-10 12:59 -0700
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Tim Wescott <seemywebsite@myfooter.really> - 2017-02-10 14:13 -0600
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface aquaverde <svaquaverde@yahoo.com> - 2017-02-10 17:09 -0800
    Re: Suggestions on solutions to develop an embedded web server over Ethernet interface Paul Rubin <no.email@nospam.invalid> - 2017-02-13 01:02 -0800

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

Frompozz <pozzugno@gmail.com>
Date2017-02-10 18:27 +0100
SubjectSuggestions on solutions to develop an embedded web server over Ethernet interface
Message-ID<o7kt2p$36s$1@dont-email.me>
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.

[toc] | [next] | [standalone]


#25815

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2017-02-10 18:28 +0000
Message-ID<BEl*xg4jw@news.chiark.greenend.org.uk>
In reply to#25814
pozz <pozzugno@gmail.com> wrote:
> 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.

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.

> 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.

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

Should be doable.

Theo

[toc] | [prev] | [next] | [standalone]


#25826

Frompozz <pozzugno@gmail.com>
Date2017-02-13 00:36 +0100
Message-ID<6a3b51bd-1e08-f248-086d-5fcf0769a26c@gmail.com>
In reply to#25815
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] https://www.olimex.com/Products/SOM/A13/A13-SOM-256/
[2] http://www.armdevs.com/Product/CORE9X35.html

[toc] | [prev] | [next] | [standalone]


#25827

Frompozz <pozzugno@gmail.com>
Date2017-02-13 00:36 +0100
Message-ID<o7qrdq$fea$1@dont-email.me>
In reply to#25815
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] https://www.olimex.com/Products/SOM/A13/A13-SOM-256/
[2] http://www.armdevs.com/Product/CORE9X35.html

[toc] | [prev] | [next] | [standalone]


#25828

FromTheo Markettos <theom+news@chiark.greenend.org.uk>
Date2017-02-13 08:04 +0000
Message-ID<yEl*KOfkw@news.chiark.greenend.org.uk>
In reply to#25827
pozz <pozzugno@gmail.com> wrote:
> 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.

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:
http://linux-sunxi.org/Linux_mainlining_effort

[toc] | [prev] | [next] | [standalone]


#25816

FromJoe Chisolm <jchisolm6@earthlink.net>
Date2017-02-10 13:52 -0600
Message-ID<9fKdnR5o25RphAPFnZ2dnUU7-Y2dnZ2d@earthlink.com>
In reply to#25814
On Fri, 10 Feb 2017 18:27:38 +0100, pozz wrote:

> 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.

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

[toc] | [prev] | [next] | [standalone]


#25830

FromUwe Bonnes <bon@hertz.ikp.physik.tu-darmstadt.de>
Date2017-02-13 11:43 +0000
Message-ID<o7s65p$7pt$1@lnx107.hrz.tu-darmstadt.de>
In reply to#25816
Joe Chisolm <jchisolm6@earthlink.net> wrote:

> 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.

Ethernut (www.ethernut.de) is also an option.
-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 1623569 ------- Fax. 06151 1623305 ---------

[toc] | [prev] | [next] | [standalone]


#25817

FromDon Y <blockedofcourse@foo.invalid>
Date2017-02-10 12:59 -0700
Message-ID<o7l5v0$6n9$1@dont-email.me>
In reply to#25814
On 2/10/2017 10:27 AM, pozz wrote:
> 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

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

> 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.

[toc] | [prev] | [next] | [standalone]


#25818

FromTim Wescott <seemywebsite@myfooter.really>
Date2017-02-10 14:13 -0600
Message-ID<NaGdnQIraK5qgwPFnZ2dnUU7-XOdnZ2d@giganews.com>
In reply to#25814
On Fri, 10 Feb 2017 18:27:38 +0100, pozz wrote:

> 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.

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
http://www.wescottdesign.com

I'm looking for work -- see my website!

[toc] | [prev] | [next] | [standalone]


#25822

Fromaquaverde <svaquaverde@yahoo.com>
Date2017-02-10 17:09 -0800
Message-ID<o7lo8a$1h08$1@gioia.aioe.org>
In reply to#25814
On 2/10/2017 9:27 AM, pozz wrote:
> 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.

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:
 
http://www.ebay.com/itm/NodeMCU-ESP-12E-ESP8266-WiFi-LUA-IoT-CH340G-V3-New-Version-Arduino-Compatibile-/322389923742?hash=item4b0fefd79e:g:hagAAOSwvg9XUjnP

HTH
Philip

[toc] | [prev] | [next] | [standalone]


#25829

FromPaul Rubin <no.email@nospam.invalid>
Date2017-02-13 01:02 -0800
Message-ID<8737fipinw.fsf@nightsong.com>
In reply to#25814
pozz <pozzugno@gmail.com> writes:
> 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)?

This might be of interest:

https://www.seeedstudio.com/AI7688H-p-2739.html
Also: https://www.seeedstudio.com/LinkIt-Smart-7688-Duo-p-2574.html

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:

https://www.seeedstudio.com/E-p-2497.html

Or even smaller and cheaper ESP8266 boards:

http://www.wemos.cc/
https://www.aliexpress.com/item//32630518881.html

[toc] | [prev] | [standalone]


Back to top | Article view | comp.arch.embedded


csiph-web