DMP1 Web Server

From Omnifi Wiki

Jump to: navigation, search
Quick Links
Linux-Inside.jpg
Related topics
  • Find Something
    • To Put Here

edit

Contents

What?!! A Mobile WebServer?

Well, I have got one from you. I viewed a webpage from our sister ZipIt! Wireless forum who is running a home webserver on their broken Zipit. Very zippy and rather functional.

Where's the proof?

Firefox Screenshot!

On my network, my DMP1 is 192.168.1.15. Here is a screenshot that illustrate a very, very simple stock webpage that came with mini_httpd:

Sample rlogin session

And here is a quick rlogin session showing that mini_httpd is indeed running.

Of course, I killed off Openfi and Omnifi just for show.

Where Can I Get A Webserver That Runs On The DMP1?

Well, Stephanie (the owner of the ZipIt Webserver) was nice enough to provide a link to the mini_httpd project. Go there and download the sourcefiles.

If you haven't already, you'll need an ARM CrossCompiler to build this project. You can build it natively to run on your Linux or Cygwin, but why?

You must edit the Makefile to change the CC flag to point to your crosscompiler and the CFLAGS to include the "-Os -Wall --static" flags. Then just run "make" and see below.

When compiled using BuildRoot (uClibc), the mini_httpd came out to:

-rwxr-xr-x  1 root root 119876 2005-11-04 00:14 mini_httpd*
-rwxr-xr-x  1 root root  51136 2005-11-04 00:14 htpasswd*

Well, you can see just how small...

Getting It To Work

The files sit in their own folder on the HDD.

# cd /storage/disc1/httpd/
# ls
FILES       htpasswd.c  mime_encodings.h    mini_httpd.c    tdate_parse.h
Makefile    htpasswd.o  mime_encodings.txt  mini_httpd.cnf  tdate_parse.o
README      index.html  mime_types.h        mini_httpd.o    version.h
contrib/    match.c     mime_types.txt      port.h
htpasswd*   match.h     mini_httpd*         scripts/
htpasswd.1  match.o     mini_httpd.8        tdate_parse.c
# _

To get it to run, you'll have to create an account called nobody. Then you simply invoke it--the config file (mini_httpd.cnf) is sufficient to get the DMP1 to start serving up webpages, wirelessly!

To modify the content, edit the index.html to your liking and add graphics and stuff.

It Does More!

Here is an excerpt from the README:

                   mini_httpd - small HTTP server
                     version 1.19 of 19dec2003

mini_httpd is a small HTTP server.  Its performance is not great, but for
low or medium traffic sites it's quite adequate. It implements all the
basic features of an HTTP server, including:

 * GET, HEAD, and POST methods.
 * CGI.
 * Basic authentication.
 * Security against ".." filename snooping.
 * The common MIME types.
 * Trailing-slash redirection.
 * index.html, index.htm, index.cgi
 * Directory listings.
 * Multihoming / virtual hosting.
 * Standard logging.
 * Custom error pages.

It can also be configured to do SSL/HTTPS.

Well! Ain't that sweet? Go forth and WebServe!

Gallery


So What Use is It? How About a Mobile Music Streaming Server?

Imagine rolling up to Starbucks with your DMP1 wireless running in Ad Hoc mode. You walk in and sip your latte while streaming tunes from your car in the parking lot onto your wireless Pocket PC.

DMP1 Streaming Server Screenshot!

Here's a web browser browsing the DMP1 with mini_httpd serving up a web page with links to songs on the DMP1. In the foreground are Winamp and WMP streaming simultaneously.
To do this, just launch mini_httpd as follows:

mini_httpd -d /storage/disc1/Music_Collection &

where /storage/disc1/Music_Collection is the root directory for your music (substitute the appropriate directory if you have it somewhere else).

To have it launch automatically whenever you boot your DMP1, you must have link Openfi installed. Add the command above to your openfi_start script.

Related Links

External Links

Lumkichi 19:17, 4 Nov 2005 (CST)

Personal tools