Embedded Web Server ... Question about most common pactices...

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi i need to implement an embedded webserver and i was wondering, what is
the most common practice on this field. To develop your own TCP/IP stack or
use a generic and open one as uIP? Any one knows if uIP is reliable? We
don't have a defined hardware, so i need to create it as portable as
possible but probably will be a 32 bits uCU as ARM. Just to explain the
application, is to create a basic interface to our product for initial
configuration purposes.


Thank you      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

The most common practice is to see if your operating system already
provides such a stack. What operating system do you intend to run? If
you want to make your code "portable" and you cannot yet make a
decision as to which OS will be used, write your code with BSD socket
calls and it should be buildable(ish) on most platforms.

Most people in this day and age would not write their own IP stack,
nor would they write their own web server.

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it
is

Quoted text here. Click to load it
=

Quoted text here. Click to load it

Probably with no OS, just from bios. But there may be a chance to run from
an OS as some kind of embedded linux. But i will assume for now that i will
run from bios.


What do you mean that they would not write their own web server? How would
they have a customized web server without wiriting it?      

                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it


Just as there are many embedded (and other) OS's, free and otherwise,
and many of those include (sometimes optionally) IIP stacks (and IP
stacks are available separately as well), so it goes with web
servers:  Many OS's have one or more web servers available already,
and many reasonably portable web servers are out there - heck you can
port Apache to your new platform if you like (although that92%s not at
all trivial., but you end up with one heck of a lot of function).

Or are you confusing the web server with the web *site(s)* that it
hosts?  The latter you would usually write, the former, only rarely
(as usually, doing it well is a lot of work, and most of us don't get
paid for pointlessly reinventing the wheel).  Although a basic web
server with very limited functionality is not that hard to write, and
may be an option if you need something very lightweight.

Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it

Yea that makes sense... just question. Any idea if uIP and lwIP are good
and reliable stacks? Do you have any sugestion of a open webserver for
running from bios?



Second question and totaly OFFtopic, do you post from embedded related or
from another website? I cant see the same signature on your post....


Thank you      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it


No idea - I've never used either.  OTOH, they appear to have a number
of successful ports, which is usually a good sign.  And they're open
source, which means that you can fix any problems you encounter - and
that will almost always be less work than developing the entire stack
from scratch, assuming you don't have some special requirements.  And
being OSS, just given one of them a try - at the very least you'll get
into the innards of a working stack, which will be invaluable
experience if you do decide to roll your own.


Quoted text here. Click to load it


This is a Usenet group, and is not related to any web site.  For
reasons mostly involving laziness, I used Google Groups to post this
(and yes, that92%s at least a bit embarrassing).  A proper newsreader
would be better, but it's not one of my life's priorities.

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

I replied to your original post regarding that, although I am curious as
to which board you are planning on using that has an ARM7 and a BIOS.


Quoted text here. Click to load it

EmbeddedRelated.com has nothing to do with this news group, but is a web
site that harvests publicly available information and conversations from
different places on the web, then presents all the information in one
place and provides an interface for you to contribute - presumably this
is done purely to provide a platform on which Google adverts can be serve=
d.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.  More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TDC%V as meeting the requirements for safety related systems=
2E%




Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it


Well i used the unappropriated word. I am just running the uCU with no OS.
Any way, that was a piece of good information about uIP. About the
processor, probably a 32 bits uCU with 256KB of flash and 32KB of RAM
minimum. For sure not less than that. But maybe and most probably more.
Actually to use a low end 32 bit uCU is not fixed. We may use a high end
ARM as a TI OMAP too. I am not defining the processor and requirements
because i am creating a standard solution for all our products. I cant even
say that is a product because is not intended for commercial purposes for
now but that kind of information is irrelevant. Do you have any experience
with lwIP. According to the author, it got a bigger throughput. For sure
the fact that the stack would be that slow is for sure not good as the
system would be controlled using the Ethernet connection. Any suggestion
about non-expensive commercial stack or free reliable stack better than uIP
(or lwIP)?


Thank you
      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

I think lwIP is a good stack for its intended purpose and the FreeRTOS
code does include some lwIP examples too - although they are rather old
now.

Positives are the way it minimises its memory usage by chaining memory
buffers together, and its free liberal licensing.

Negatives are the way it minimises its memory usage by chaining memory
buffers together - because of the extra processing time required.  Like
all engineering - the design decisions involve trade offs.

It is also quite complex to use and configure the first time you
approach it - there are three API's for a start so the first decision is
which to use.  Once you have invested the time it works well, but you do
need to invest the time to become a competent users.

lwIP is a bit of a moving target because it is constantly being
developed and updated (which is not necessarily a negative thing).
Also, I'm not sure if there are any complete web servers available for
free that will just slot into with it.  The web server that comes with
lwIP is not much more than what some professional TCP/IP stack vendors
call an "HTTP listener".

Some microcontroller vendors have free versions of NicheLite you could
utilise, and then, given enough RAM, you could obtain a free or low cost
web server from several different companies or open source projects.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.  More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TDC%V as meeting the requirements for safety related systems=
2E%




Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it

Thank you for all the information!! Very useful!! Any other ingestion
will be appreciated hehe.

Now totally off-topic, Richard wrote that he would like to know which
board have a ARM 7 and a BIOS. Just to make things clear for me. Whats
exactly does run a uCU from the BIOS means. Until today that would
mean that it is running with no OS (as it would happen on a DSP or a
low-end uCU). Isnt that the real meaning? If not, how would you call
that and whats the real meaning of running from BIOS?


Thank you very much!!

Re: Embedded Web Server ... Question about most common pactices...
ally off-topic, Richard wrote that he would like to know which
Quoted text here. Click to load it

Fair enough.  If you're defining terms, that's not an unreasonable
definition.  My preferred term would be some variation on "running on bare
silicon."

For me, BIOS is a firmware subroutine library that overlying software
invokes to access hardware.  A bare-silicon program will have these
functions, of course, but it won't have to organize them to be accessible
from outside.

    Mel.

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

Any one knows if lwIP need an OS? Or can i run it "on bare silicon"?
How aboute NicheLite?

Thank you!

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

lwIP can be used with no OS.  I know NicheLite can be used with simple
co-operative schedulers, but I'm not sure about with no OS at all -
although I would be very surprised if it couldn't.

Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.  More than 7000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TDC%V as meeting the requirements for safety related systems=
2E%




Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

Any other comment about a comparison between both (lwIP and
LiteNiche)?

The license of LiteNiche would probably be a problem, but to start we
could use a ColdFire with Freescale stack (with LiteNiche) and for
latter development get the full license.

But about performance and restrictions, any coment about both?

Another question is, how portable are the webservers usually? I mean
can i use the coldfire webserver  (implemented using LiteNiche) with
the lwIP, or use the uIP webserver with lwIP?

Any suggestion of free webserver that can be used with lwIP (if
possible with some sort of authentication as a password)

Thank you very much for all the responses!!

Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

The answer to these questions depends on the resources you
have available (both at development time and run time).

Also, the possible interaction of the "configuration service"
with the rest of your application should be considered.  I.e.,
does the application continue to provide *its* full complement
of services to the user while configuration is taking place?
Or, does configuration preempt normal operation?  Are changes
made during configuration immediately visible to the application
or are all changes deferred until "configuration complete"?
(note this often has significant ramifications regarding valid
combinations of configuration options).

Is the configuration information "sensitive"?  How do you handle
multiple requests to configure the device concurrently?  Are
there any other features that the served pages need to have
supported?  Are there any other run-time uses of the web server
that are essential to -- or could be beneficial to -- your product?
(or, is it *solely* used for configuration)  How vulnerable is
your product to hacking (i.e., honeypot)? etc.

Each of these issues reflects the degree of sophistication in
your network stack and web server.  The more "general" you want your
solution to be, the more capable your implementation must be.  If
you can constrain your needs, you can increase the option available
to you.  (e.g., I recall QNX had an OS+web server on a 1.4M floppy;
I have seen other implementations considerably smaller than that!)

You might also consider the means by which the user will be
interacting with your "configuration program".  E.g., if
he/she will typically be using a "PC" to perform this function,
how viable is it to move the configuration "tool" into the
PC (even if it is in the form of a text file that the user
edits *on* the PC) and then ship the resulting "snapshot" over
to your product (where it is parsed and accepted/rejected in toto)

Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it


The product is just aimed to be used on a local network so protection is
not a problem so far.. Other than the configuration, the server is aimed to
be used to monitor some sensors and control of the products output. The
product itself must be real-time when controlled by the automation process
but not when when controlled or monitored using web-server. Basically will
be an easy access to the system for configuration, debugging and to send
simple commands but it is not aimed to be used as its main interfaces.
Basically a window that display some values and you can control the system
on-line but the timing is not very strict as long it does respond on a
minimum time, lets say 200ms so that the human eye consider instantaneous.


      
                    
---------------------------------------        
Posted through http://www.EmbeddedRelated.com

Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it

For a web server, protection /is/ a problem even if you only allow
connections from the local network.

It's quite likely that every host on that network will be running a web
browser which acts as a bridge between the local network and the internet.

A modern web browser is a program which does more or less whatever the
internet tells it to do. Placing trust in HTTP connections originating
from local systems is unwise.


Re: Embedded Web Server ... Question about most common pactices...

Quoted text here. Click to load it

ROFLMAO! Famous last words!

On the Ethernet, EVERY HOST IS HOSTILE.


Re: Embedded Web Server ... Question about most common pactices...
Quoted text here. Click to load it

Tell that to siemens who's embedded industrial control platform has been
hit by that industrial worm recently!

Re: Embedded Web Server ... Question about most common pactices...
I just found another good option at Freescale forums. A guy recomended
me FNET. Any one got any experience with that stack? What would be the
main difference comapared to LiteNiche?

For now i am probably focusing on lwIP but if for some reason i find
out that FNET is a much better option, changing for it would not be a
big problem at all.

Thank you!

Site Timeline