Name Last modified Size
Parent Directory 08-Sep-2017 05:26 - Makefile 31-Jul-2018 05:49 12k README.txt 20-Jul-2017 12:55 8k SmallBasic/ 19-Mar-2018 09:48 - android/ 11-Jan-2018 10:19 - cgi.h 15-Mar-2016 09:51 4k cgi_example_client.c 11-Jan-2018 10:19 3k cgi_example_server.c 11-Jan-2018 10:19 6k csharp/ 19-Mar-2018 09:48 - html/ 11-Jan-2018 10:19 - java/ 19-Mar-2018 09:48 - prebuilt/ 15-Mar-2016 09:51 - python/ 11-Jan-2018 10:19 - rpc_example.x 11-Jan-2018 10:19 1k rpc_example_client.c 11-Jan-2018 10:19 3k rpc_example_server.c 17-Apr-2018 11:02 4k rpc_example_server.patch 15-Mar-2016 09:51 1k shell/ 11-Jan-2018 10:19 - startup-linux 11-Jan-2018 10:19 3k startup-muntsos 11-Jan-2018 10:19 2k tcl/ 11-Jan-2018 10:19 - www.h 11-Jan-2018 10:19 7k xmlrpc_example_client.c 11-Jan-2018 10:19 3k xmlrpc_example_server.c 11-Jan-2018 10:19 4k
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:
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:
make ARCH=arm BOARDNAME=
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.
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.
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.
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.
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.
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.
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).
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.
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.
I am available for custom system development (hardware and software) of products based on embedded Linux microcomputers or other processors.