Writing Command Line Interfaces for Embedded Devices

Several times while developing applications for embedded devices I have had the need to test part or all of their functionality in an efficient and very quick way. A GUI is tedious and slow, but a Command Line Interface (CLI) can be perfectly suited for this task.

I had these situations when I developed software for a modem/router, a management system for an optical network and more recently for a HD digital receiver. In the latest case for example, I needed a fast way for scanning channels and zapping. Doing these operations using the GUI is slow because each time I had to go all along the menus and select the right parameters (in the case of a manual scanning) or moving along the channels list to a specific channel (in the zapping case).
Even more, sometimes these applications need a Command Line Interface (CLI) available for the final user. This was the case of the management application for the optical network. It needed a Cisco-like shell in which only specific commands can be given to it and no access to the real shell (like bash or busybox) is allowed.

I wrote some while ago a prototype project that tries to address these kind of situations. I noticed that a lot of time was spent in parsing and validating the input from the CLI and this only distracted me from the real purpose of the application. Thus, I decided that this software handled automatically all the parsing and validation, allowing me to concentrate in the real functionality of the system.

I ended having a software in which I only had to specify in a configuration file the modes (eg. user or privileged), commands (eg. scan or zap) and arguments/parameters (eg. channel frequency in the case of the zap command), and the source files in which I only get the input already parsed and validated and execute the desired function like scanning manually a given satellite.

This article describes, hopefully, with a clear and in-depth approach, the design and implementation I followed for writing this project.

The project is called Tarasca Project, it’s a bit out dated, but I will make a new release soon with some bug fixes and new tested platforms!

TdT releases the source code of enigma2 for the sh4 arch

It’s very nice to end the year in this way: Team DuckTales, the guys that port enigma2 to the sh4-based Kathrein UFS-910, released their sources of enigma2.

You can find them here:
http://upload.dvhk.pl/content.php?id=123078

The code is quite clean with #if defined(__sh__), so changes with respect to the vanilla version are easy to find.
The release.notes explain the status of the project and what you need for giving it a try.

Enjoy and thanks to Team DuckTales!

Video of enigma2 running in the sh4 arch

Finally you can watch a video that shows some of the work that has been done for running enigma2 in the sh4 arch. The box is based on a STb7109 cut 3.0.
The quality of the video is not very good, but it gives a good idea of the current functionality.

Enjoy it.