How to use lnpd

This is just an informal clarification on how to use lnpd. This page can be edited by students, so if you would like to try to improve it, it would be very much appreciated.

The General Idea

The general idea is as follows. lnpd is a daemon, which listens to the serial port, and makes the received packets available to the applications built with lnpd. You need to first start the daemon, for instance with:

../lnpd/lnpd --nolock --tty /dev/ttyS0 

(the path assumes that you are in the rap/applications directory). Then, you can launch applications that use the lnpd daemon, such as rapdump, rawdump, etc.

How to load programs on the lego while using lnpd

While using lnpd, the daemon takes control of the serial port. As a result, to transfer programs to the lego, you need to:

  1. Stop lndp (kill -9 pid, where pid is the process id of lnpd).

  2. Transfer the program to the lego using dll.

  3. Restart lnpd.

lnp_integrity_write() problems

lnp_integrity_write() can only be called from the main() function. Do not call it from another thread.

RAP: Robos Ad-Hoc Protocol/HowTo (last edited 2006-05-16 18:14:38 by TonyHutter)