sendnto

Send an OS image to a target over a serial or parallel port (QNX4)

Syntax:

sendnto -d device [-b baud] [-l speed] [-eqv] filename

Runs on:

QNX Neutrino, Linux, Microsoft Windows

Options:

-b baud
Set the serial port transfer speed to baud.
-d device
Send the image over this device. You must specify this option. The form of the device name depends on the host OS:
-e
Request an echo from the target for every data record (off by default). An echo may be needed for serial downloads at very high baud rates (>57600 baud) to very slow machines.
-l speed
(“el”) Output is to a parallel port with a LAPLINK cable. The speed may be 1...3, with 1 being the fastest.
-q
Be quiet; don't print an ongoing percentage of image downloaded.
-v
Be verbose; print an ongoing percentage of download complete.

Description:

The sendnto utility takes an OS image built with mkifs and sends it to a target device using a fast binary protocol. The target computer needs a loader built into its startup code in ROM or FLASH that understands this protocol. The protocol is very simple and is designed to be implemented with minimal code in the target.

The Board Support Packages generally contain IPL source for serial targets.

The sendnto utility assumes the target has been reset and is in a state where it is waiting for data. It sends the following sequence of records:

START
DATA DATA ...
GO

Each record has a sequence number and checksum to ensure data integrity. The GO record transfers control to the downloaded image. The details of this protocol may be determined by examining the source to sendnto, which is also made available for porting to other development environments.

Downloads over a parallel port are automatically flow-controlled. Downloads over a serial port assume that the target is fast enough to process the data. For most targets this is true for baud rates up to 57600 baud.

On slower targets with a baud rate of 115200, you may need to specify the -e option to flow control sendnto with the target. This causes sendnto to insert an ECHO record after each data record. It then pauses and waits for the target to echo of a + before sending the next record. If the target fails to send a + within 1/10 second, sendnto times out and sends the next record anyway. If you don't specify the -e option, the link need only operate in one direction (write without read from the host's point of view).

When used over a serial link, sendnto uses the existing baud rate and hardware flow control set by the stty command. It programs the link to operate in raw mode. Note that hardware flow control isn't required on the link.

The -v option makes sendnto print a continuously updated percentage as the image is downloaded. This provides feedback during large image downloads over slow links.

Examples:

Send the file image to the target machine through the first serial port on host machine:

sendnto -d /dev/ser1 image

Send the file image to the target machine through the second serial port on the node named server:

sendnto -d /net/server/dev/ser2 image

Send the file image to the target machine through the parallel port on the host machine using a regular parallel cable:

sendnto -d /dev/par image

Send the file image to the target machine through the parallel port using a LAP-LINK cable. This cable arrangement may also be used by the wd source-level debugger for parallel-port debugging:

sendnto -d /dev/bipar image

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

mkifs