About this project

An important feature of Lego Mindstorms is the ability to send and receive data over an infrared link. It is mainly used to download programs to the RCX, but is not limited to this. Robots can communicate to operate in teams, a robot and the host computer can exchange commands or debug information to support the development process. All programming languages for the RCX have built-in support for the transceiver, the PC does not. User programs need to address the tower device directly if they want to communicate with a robot. This is where lnphost comes in, it is an interface between user programs and the hardware that makes life easier. Several features make lnphost an alternative for the outdated lnpd:

  • written in C, runs on all posix compliant platforms
  • USB tower is supported on Linux and Windows/Cygwin
  • runs at both 2400 and 4800 baud
  • compatibility mode for older versions of legOS that don't use the parity bit
  • sends and receives packets in all popular protocols (lego, brickOS integrity and addressing layer) as well as raw data
  • heuristic algorithm locates valid packets in the input data stream
  • callback functions can be bound to any host:port address
  • multiple towers can be used in a single program
  • no client/server architecture, tower is addressed directly

Existing programs can easily be migrated from lnpd to lnphost as long as the main differences are kept in mind.

  • network functionality is not available, the tower must be connected to local host
  • collisions during transmission cannot be detected or avoided
  • every transmitted packet might be reflected by the walls and received again by the serial tower, the USB tower suppresses the echo itself

The Lego Network Protocol Daemon (lnpd) uses several algorithms to detect broken packages, avoid collisions and suppress echoed data from its own transmissions, but they depend on real-time data transfers with predictable delays. They will fail as soon as data is buffered somewhere along the way, for example in the FIFOs of the serial ports. This makes it impossible to use lnpd on other platforms than linux, where massive data loss is one of the consequences. It is better for portable software not to use these algorithms at all. The application has a better knowledge of the communication structure and can do collision avoidance and echo removal at a higher communication level. Using this approach makes lnphost a portable replacement for lnpd.

News and announcements

 2006-03-06  Now that my diploma thesis is completed, lnphost finally finds its home at SourceForge.
 2005-03-21  Creation of this homepage and translation of the API has started.
 2005-03-02  Pre-release version of lnphost is tested at Altair robotic laboratory, University of Verona
 2005-01-11  Registration of the project at SourceForge by Stephan Höhrmann succeeded on the first try.