Copyright © 2008, 2009, 2010 Marc Balmer. All rights reserved.
Most toolkits for graphical user interfaces organize the elements of the user interface, typically called "widgets", in a hierarchy: Starting with some container like a dialog or window at the top, the elements like push buttons, labels, or layout managers are added. To add new elements a set of C functions is provided which are called with a handle to the parent widget, the class (or type) of widget that is to be added plus any further arguments like e.g. a label string in the case of a push button.
While it is relatively easy to expose the widget creation and managing functions to Lua, the resulting Lua program will still closely resemble the same functionality coded in C. So the aim is to use Lua's table constructors to define a GUI instead of calling the widget creation routines.
About one year ago, I wrote about how we used OpenBSD at the point of sale at the Basel Zoo. Well, the good news first: We replaced OpenBSD by NetBSD for our POS applications, both in development, but also for deployment.
I reworked the GPIO framework in OpenBSD last fall. Now I have taken my work to NetBSD and updated their GPIO implementation. While there, I corrected some mistakes made in the OpenBSD implementation and took it a step further. More development will take place in NetBSD, and there is quite a few interesting upcoming things to watch out for...
If you are interested in the latest userland accessible GPIO stuff, and the most up-to-date GPIO implementation, then keep an eye on NetBSD -current. This is where I am working on new stuff.
See http://blog.netbsd.org/tnf/entry/gpio_revisited for details. And stay tuned.
The other day, I got an email from Edd, an OpenBSD user, claiming that Samba would crash when serving files off an MS-DOS filesystem. This was Samba built from sources and not the one from ports. Since I use myself Samba a lot and for a quite large user base, I got interested in the issue and started investigating it.
What I found out in the end is a surprise and was not expected: A bug that has been there in all BSDs for almost all the time, since the 4.2BSD times or for roughly 25 years...
Line disciplines have been in Unix since a long time. While they are not device drivers, they interact with tty devices in a very peculiar manner: They attach to a tty device and can then look at, or manipulate, the data as it flows through the tty device. Line disciplines are thus the natural choice when serial data is used in the kernel, e.g. to exchange TCP/IP packets over a serial link using the SLIP protocol or decoding date and time information and provide a timedelta sensor.
A while ago, Maurice Janssen (maurice@z74.net) sent me a modification of the nmea(4) line discipline to support the Meinberg Standard Time String format. With only a few changes, nmea(4) was turned into the msts(4) line discipline to support Meinberg's serial data format that can be emitted by all their radio clocks. I modified the code a bit, added a manual page, and added the bits needed to attach msts(4) to a tty to the ldattach(8) command. The result is that OpenBSD now has support for virtually any Meinberg radio-clock ever built.
I am currently writing a control and monitoring software system that makes use of GPIO pins. Since I was at the CCC congress in Berlin I did only have my laptop and no real GPIO hardware...
With only a laptop it's a bit hard to write GPIO software, since laptops usually don't have any GPIO pins. So what I needed to test my new software was either a real device (out of reach) or... writing a simulator.
Marc Balmer
Copyright (C) 2006 Marc Balmer
Every computer is equipped with at least a clock chip or a general purpose device to provide a timer function. While these timers are certainly precise enough for measuring relatively short periods of time, they are not well suited for keeping the correct time and date over a longer period, since almost every chip drifts by a few seconds per day. Even so called real-time clocks only approximately meet the real time.
Time signal stations can be a solution to this problem as they emit very precise time information using specifically modulated radio frequencies. Time signal stations are available in many countries; while the coding schemes vary from time signal station to time signal station, the decoding principles are similar.
Copyright © 2003-2008 by Marc Balmer. All rights reserved.
OpenBSD some time ago changed the mode of operation for the Apache webserver from the normal non-chrooted operation to chrooted operation. This enhances the security of the server on which Apache is run but it imposes a few challenges to the system administrator.
In this article I will discuss selected aspects of running a chrooted HTTP daemon and present strategies on how to set up a chrooted environment for more complex applications like database access or using CGI-scripts.
(First published on April 6, 2003, revised on March 20, 2004, converted to HTML for online publishing on December 21, 2007.)
Copyright © 1996 by Marc Balmer, CH-4055 Basel, Switzerland.
This paper discusses strategies and methods to use Java as a programming language for CGI (Common Gateway Interface) applications.