Question

I have a SBC (Small Board Computer) (to be precise it is TS-7500 running Debian linux 2.6.24) and a couple of C programs running inside it. Now I have to provide a web interface to this board, in order to, let's say change some parameters etc (so that SBC serves as a blackbox). I guess this is what every router does - provide a couple of configuration parameters to user !

Now do suggest what is an easy way to achieve this, provided,

  1. I just have a handful of parameters to be configured (less than 10)
  2. Each parameter could be modeled as a drop-down menu to avoid input errors
  3. RAM on SBC is quite limited - so anything simpler is preferred.

I have come across a couple of topics, which suggest using Servlets, JSP, CGI etc to achieve the same. Please suggest a better and simpler option (assuming I'm not familiar with any of these concepts). Any links for same is also appreciated.

Thanks in advance !

Was it helpful?

Solution

You'll first need a webserver. Since you're running linux, the first and most obvious answer is Apache httpd. Another good choice here may be Lighttpd.

Now you need a way to serve dynamic content. My personal go-to here is PHP. Often times you can install Apache+PHP with just a couple packages. It looks like Lighttpd supports PHP, too.

This link will explain CGI, Perl, etc. What is CGI?

Finally, you need a way for the web application you develop to affect the rest of your black box. SQLite makes for a nice lightweight way to store data in an organized fashion. Your PHP web app could use the same database that the C programs read their parameters from! Another option would be just simply reading and writing to flat text files.

OTHER TIPS

NOTE : Updating the status, after successful completion of work.

I have chosen Apache + PHP, as that seemed to be the most simplest and straight forward solution for the above mentioned problem. For Installation I have followed this link and installed LAMP server which provided Apache, PHP and SQL (for storing password). And a couple of online tutorials on PHP were enough to get the desired program up and running.

I had to deploy the php script (say settings.php) in /var/www/ directory on TS-7500. So when I access it from another system (on same LAN) with ip_address/settings.php (IP address of TS-7500) from a browser, the desired html pages pops up !

Thanks a ton for ur suggestions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top