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

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

formatting link

Reply to
Sink0
Loading thread data ...

or

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.

Reply to
larwe

is

=

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

formatting link

Reply to
Sink0

ck

e
m

ll

d

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 that=92s 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.

Reply to
robertwessel2

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

formatting link

Reply to
Sink0

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.

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, that=92s at least a bit embarrassing). A proper newsreader would be better, but it's not one of my life's priorities.

Reply to
robertwessel2

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)

Reply to
D Yuniskis

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

formatting link

Reply to
Sink0

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.

Reply to
Nobody

to

ROFLMAO! Famous last words!

On the Ethernet, EVERY HOST IS HOSTILE.

Reply to
larwe

Your question cannot be answered without you providing more information as you say very little as to which processor you are using, how much RAM you have, how much ROM you have, what features you require, or what throughput you require. I have commented below all the same.

is

k

The answer to develop your own stack would almost certainly be "no".

Why do you have those as the only two options? There are lots of commercial stacks too.

I have used uIP a lot. It is very good for what it is, and comes with a web server implementation that permits a form of CGI scripting - but it is designed for use on systems with *very* limited RAM and is therefore itself very limited.

The main limitation of uIP is the fact that it only allows one packet to be outstanding on the network at a time. This means, if you are communicating with a standard TCP/IP stack (a desktop machine for example) then communication will be very slow due to the delayed ACK algorithms. I have done some work with uIP to get around this problem, and some of the new web server examples in the FreeRTOS download achieve quite good throughput - but its never going to approach what a full/large TCP/IP stack could achieve.

uIP does not have a standard interface, so your application code will not by default be portable across different stacks. I'm sure you could write some form of interface layer though to make it more standard, but that would seem like a lot of effort when you could just take a stack with a standard interface in the first place.

but probably will be a 32 bits uCU as ARM. Just to explain the

Regards, Richard.

  • formatting link
    Designed for Microcontrollers. More than 7000 downloads per month.

  • formatting link
    Certified by T=DCV as meeting the requirements for safety related systems= =2E

Reply to
FreeRTOS info

d

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.

or

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.

  • formatting link
    Designed for Microcontrollers. More than 7000 downloads per month.
  • formatting link
    Certified by T=DCV as meeting the requirements for safety related systems= =2E
Reply to
FreeRTOS info

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

formatting link

Reply to
Sink0

as

OS.

d

even

or

nce

e
n

uIP

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.

  • formatting link
    Designed for Microcontrollers. More than 7000 downloads per month.

  • formatting link
    Certified by T=DCV as meeting the requirements for safety related systems= =2E

Reply to
FreeRTOS info

El 04/10/2010 16:24, Sink0 escribió:

I have successfully used GoAhead (

formatting link
) with a product running VxWorks, which provides its own TCP/IP stack (based on BSD.)

It's free and small, and has been ported to several OSs, both commercial and open source. I would never write my own TCP/IP stack or web server these days.

Reply to
Ignacio G. T.

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

Reply to
Sink0

Sink0 wrote: ally off-topic, Richard wrote that he would like to know which

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.

Reply to
Mel

are

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

Thank you!

Reply to
Sink0

s

bare

ble

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.

  • formatting link
    Designed for Microcontrollers. More than 7000 downloads per month.

  • formatting link
    Certified by T=DCV as meeting the requirements for safety related systems= =2E

Reply to
FreeRTOS info

s

n bare

ble

.

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

Reply to
Sink0

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.