---
name: "autopilot"
section: "1"
platform: "linux"
package: "autopilot"
version: "1.21-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/autopilot"
---

# autopilot(1)

Activates a given command when the pilot enters the cradle.

## NAME

autopilot - Activates a given command when the pilot enters the cradle.

## SYNOPSIS

autopilot \[-n seconds \] -c \<command\> \[-h\] \[-p port\]

## DESCRIPTION

**AutoPilot** Monitors the DTR or RTS line of a serial port, by default, /dev/palm, waiting for it to go from LOW to HIGH, this is used to activate a command automaticaly to make sync'ing easier.

The option **command** parameter is the full path/file name of the application that should be run when .Bautopilot notices a palm in the cradle.

Example: autopilot -c 'pilot-mail -p /dev/palm'

## COMMAND-LINE OPTIONS

- **-n**

  Normally **autopilot** will loop continuously, checking the status every 2 seconds by default, passing a -n 5 will check the port every 5 seconds for example.

- **-h**

  Normally **autopilot** check the DTR line, this is set when the palm is inserted into the cradle, passing -h will check the RTS line, which is set when the hotsync button is pressed.

- **-p port**

  Specifies the port to check.

## BUGS/LIMITATIONS

**autopilot** only works with devices that support the TIOCMGET ioctl.

You need permission to read the device file.

The device file may be locked if other applications are using it.

Always make sure the application you have assigned with -c has finished running before inserting the palm pilot again, otherwise the -c application could lock on itself and not work correctly.

Not all applications will work correctly with -h.

## ENVIRONMENT

If the  **PILOTRATE** environment is set, the value of this will overwritte the default device name.

## AUTHOR

**AutoPilot** was written by Leigh Morresi (leigh@signal-x.com), with a little help from the statserial-1.1 source code This is released under the conditions of the GNU General Public License.   See the file COPYING and notes in the source code for details.

## SEE ALSO

[statserial(1)](/statserial/1.md) [setserial(8)](/setserial/8.md) [stty(1)](/stty/1.md)\
 /usr/src/linux/drivers/char/serial.c /usr/include/linux/termios.h
