Index of /arm-linux-mcu/extensions/LED

      Name                     Last modified       Size  

[DIR] Parent Directory 08-Sep-2017 05:26 - [   ] Makefile 17-Jul-2017 12:06 11k [TXT] README.txt 20-Jul-2017 12:55 8k [DIR] SmallBasic/ 20-Jul-2017 12:55 - [DIR] android/ 04-Jan-2017 08:29 - [TXT] cgi.h 15-Mar-2016 09:51 4k [TXT] cgi_example_client.c 04-Jan-2017 08:29 3k [TXT] cgi_example_server.c 04-Jan-2017 08:29 6k [DIR] csharp/ 29-Jul-2017 13:22 - [DIR] html/ 04-Jan-2017 08:29 - [DIR] java/ 05-Jun-2017 16:46 - [DIR] prebuilt/ 15-Mar-2016 09:51 - [DIR] python/ 04-Jan-2017 08:29 - [TXT] rpc_example.x 04-Jan-2017 08:29 1k [TXT] rpc_example_client.c 04-Jan-2017 08:29 3k [TXT] rpc_example_server.c 04-Jan-2017 08:29 4k [TXT] rpc_example_server.patch 15-Mar-2016 09:51 1k [DIR] shell/ 04-Jan-2017 08:29 - [   ] startup-linux 20-Jul-2017 12:55 3k [   ] startup-muntsos 17-Sep-2017 19:41 2k [DIR] tcl/ 04-Jan-2017 08:29 - [TXT] www.h 04-Jan-2017 08:29 7k [TXT] xmlrpc_example_client.c 04-Jan-2017 08:29 3k [TXT] xmlrpc_example_server.c 04-Jan-2017 08:29 4k

Embedded Linux LED Application Software Example

This directory contains source code for a simple application software suite for an embedded Linux microcomputer. The application merely turns on and off the user LED, but illustrates several methods of communication between a host computer and the embedded Linux microcomputer.


Build the self-extracting shell archive script LED_example_RaspberryPi with something like:

make BOARDNAME=RaspberryPi

Copy LED_example_RaspberryPi to some media such as an SD card, JFFS2 flash, or USB memory stick.

When the system boots, it will automatically search autoexec.d on each media for application initialization scripts and execute the shell archive to install and start up the LED example application.

You can also install client programs on the build host with something like:

tar xzf LED_example_clients.tgz --directory=/usr/local

It is also possible to build a server tarball for a regular Linux installation like Debian or Raspbian, by omitting the value for BOARDNAME with a command like:


Then add the following line to /etc/rc.local:



ONC/RPC, formerly known as Sun RPC, has been around for many years as the basis for NFS (Network File System). It is an efficient remote procedure call implementation, and has been ported to virtually all Unix derivatives as well as Windows, MacOS X, and Java.

The example Makefile here builds the ONC/RPC server program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host.

Web Server Common Gateway Interface

Most web servers, including that in the embedded Linux boot kernel, have a capability to run programs requested by the web client. The client can pass data to the CGI program via the POST operation or by simplying adding query variables to the URL.

A big disadvantage of the CGI scheme is that the web server must fork a process to exec the CGI program for each and every request from the web client. A big advantage is that clients are very easy to develop. Most programming languages have facilities or libraries for issuing HTTP requests. You can even use wget to write a shell script client.

Another big advantage is that the CGI scheme works from pretty much any web browser. The Java and Tcl clients described below won't work on closed platforms like the Apple iPhone/iPad, Android, Amazon Kindle, etc.

The example Makefile here builds the CGI program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host. There is also a simple shell script client using wget.

Web Server CGI XML-RPC

XML-RPC is another remote procedure protocol, using XML encoding and HTTP transport. XML-RPC has been widely implemented and libraries will be available for most programming languages. The C/C++ library XMLRPC-C includes a universal command line client program xmlrpc that may be used to issue XML-RPC requests from a shell script.

Although not nearly as efficient as ONC/RPC, XML-RPC has some advantages. Since the XML-RPC server is always implemented as a web server (either as a CGI program or as a standlone server program with a web server integrated), it is very easy to pass through corporate firewalls. Also the full panoply of SSL encryption and authentication is available for XML-RPC.

The example Makefile here builds the XML-RPC CGI server program for the embedded Linux target, and simple command line clients for the embedded Linux target and the build host. There is also a simple shell script client using xmlrpc.

Tcl/Tk Clients

Included in this directory are simple Tcl/Tk GUI clients for each of the three communications protocols (ONC/RPC, CGI, XML-RPC). Each of these Tcl/Tk programs is basically a GUI wrapper for the corresponding command line client program. (The Tcl/TK CGI example client issues the HTTP GET directly, without a command line client.)

This GUI wrapper around C program scheme allows for very quick and easy development of GUI applications for embedded systems.

Java Clients

There are also Java client programs for each of the communication protocols in this directory. The example Makefile here builds a .jar file for each protocol that includes the client application class plus any necessary libraries. The Java clients are runnable as applets, standalone applications, and Web Start applications.

Although not quite as efficient as C programs, the Java programs have the enormous advantage of being machine portable. The same .jar file should run on Linux, Windows, MacOS X, and other Unix variants such as FreeBSD, NetBSD, and OpenBSD.

Writing Java GUI applications can be tedious. The examples here all use the BreezySwing library to greatly simplify GUI application development.

Recent tightening of the Java security model may prevent running the applets and Web Start applications.

Small Basic Client

Microsoft Small Basic is a simplified software development intended for children and other beginners. It is reminiscent of the early versions of Turbo Pascal for DOS.

It is, perhaps, the easiest way to create a Windows GUI program. Small Basic doesn't include much I/O capability, but it does offer Network.GetWebPageContents(url), which can be used to issue commands to the CGI server program running on the target board.

C# .NET Clients

There are also C# clients for each of the communication protocols in this directory. The example Makefile here builds a .NET .exe program file for each protocol, plus any necessary libraries.

The C# clients use Gtk# and Glade# to render the GUI, and run on Windows or Linux (using mono).

Python Clients

There are also Python GUI clients using TkInter for HTTP GET and XML-RPC communications protocols. These clients will run on Windows or Linux.

There are also Python GUI clients for Android SL4A that will run on Android phones and tablets.

Android Clients

The Android client apps were developed using Xamarin for Android, which is a .NET for Android development environment. I prefer C# to Java.

The Android apps reuse, without modification, the libraries from the C# .NET clients for the web server CGI and ONC/RPC communication protocols. At time of writing, the standard XML-RPC for .NET doesn't work on Xamarin for Android.

You will need to enable "Unknown sources" in your Android device security settings to install the Android apps. They are not published to the store.

Questions or comments to Philip Munts

I am available for custom system development (hardware and software) of products based on embedded Linux microcomputers or other processors.