Table of Contents

On-Board RS232 Port Protocol

This document defines the CFLink protocol for working with the on-board serial port found on the following CommandFusion hardware models:

Anywhere that MOD, LAN, MIN or SOL are used in outgoing commands, you can safely interchange with CFX.
This goes for all commands sent to any CFLink device.
However, all replies/notifications will be sent with the correct 3 character device identifier for the device sending the data (CFX is never used in replies except from bootloader notifications).

Queries

SPC - Query Serial Port Configuration

The SPC query requests the current on-board RS232 port settings of a device.

Data

The SPC query does not have any associated data.

Reply

< [F2]<ID>[F3]RCFXSPC[F4]<PORT>:<MODE>:<BAUD>:<DATABITS>:<PARITY>:<STOP>:<FLOWCTRL>[F5][F5]

See the ''SPC'' command for details on each returned data parameter.

Example

// Query the Serial Port configuration of a LAN Bridge on ID [02]
> [F2][02][F3]QLANSPC[F4][F5][F5]
// Reply with the configuration data, Serial Port is in Program mode
< [F2][02][F3]RLANSPC[F4]PGM:115200:8:N:1:0[F5][F5]

// Query the Serial Port configuration of a Solo on ID [03]
> [F2][03][F3]QSOLSPC[F4][F5][F5]
// Reply with the configuration data for both on-board serial ports
< [F2][03][F3]RSOLSPC[F4]P01:232:115200:8:N:1:0|P02:232:115200:8:N:1:0[F5][F5]

Configuration Messages

SPC - Serial Port Configuration

The SPC (Serial Port Configuration) command is used to configure the properties of the serial port such as port mode, baud rate, flow control, etc.

Data

> [F2]<ID>[F3]CCFXSPC[F4]<PORT>:<MODE>:<BAUD>:<DATABITS>:<PARITY>:<STOPBITS>:<FLOWCTRL>[F5][F5]

Reply

< [F2]<ID>[F3]RCFXSPC[F4]<PORT>:<MODE>:<BAUD>:<DATABITS>:<PARITY>:<STOP>:<FLOWCTRL>[F5][F5]

Example

// Configure the on-board serial port for a LAN Bridge on ID [02] to be in RS232 mode, 9600 baud, 8:None:1.
> [F2][02][F3]CLANSPC[F4]232:9600:8:N:1:0[F5][F5]
// Reply
< [F2][02][F3]RLANSPC[F4]232:9600:8:N:1:0[F5][F5]

// Configure the on-board serial port for a Solo on ID [03] to enable Port 1 in RS232 mode, 9600 baud, 8:None:1. No changes made to Port 2.
> [F2][03][F3]CSOLSPC[F4]P01:232:9600:8:N:1:0[F5][F5]
// Reply
< [F2][03][F3]RSOLSPC[F4]P01:232:9600:8:N:1:0|P02:232:115200:8:N:1:0[F5][F5]

Error

TGT - Configure Notifications Targets

The TGT command configures which CFLink ID's on the CFLink network will receive incoming messages when data is received on the serial port whilst in RS232 mode 232.
If the serial port is in Programming Mode PGM, then this configuration is ignored, no data is sent to the target devices. Instead all incoming data is handled by the device with the Serial Port, and must be a valid CFLink message or it will be ignored.

Data

> [F2]<ID>[F3]CCFXTGT[F4]<ID1>:<ID2>:<ID3>:<ID4>:<ID5>[F5][F5]
<ID1-5> = The target CFLink ID to forward incoming serial port data to. Use the No Change Option XX to leave a specific ID unchanged. The ID's should be in plain text format, 2 chars (A-F, 0-9).

Reply

< [F2]<ID>[F3]RCFXTGT[F4]<ID1>:<ID2>:<ID3>:<ID4>:<ID5>[F5][F5]

Example

// Forward incoming data from the Serial Port on LAN Bridge ID [02] to devices on CFLink ID's [03], [04] and [05]
> [F2][02][F3]CLANTGT[F4]03:04:05:XX:XX[F5][F5]
// Reply (CFLink ID's [07] and [09] were already being targeted from an earlier configuration)
< [F2][02][F3]RLANTGT[F4]03:04:05:07:09[F5][F5]

Error

Transmission Messages

SPW - Serial Port Write

The SPW (Serial Port Write) command is used to write data to a device connected to the on-board serial port. This command is ignored in PGM mode.

Data

> [F2]<ID>[F3]TCFXSPW[F4]<PORT>:<DATA>[F5][F5]

<PORT> = The port number to send the data to. Only used for devices that have more than one on-board RS232 port, such as the Solo. <DATA> = The data to be written out the on-board serial port. Hex bytes must be entered in \xFF format. eg. A carriage return is written as \x0D

Reply

// In an effort to reduce network traffic, the reply does not contain the data sent.
< [F2]<ID>[F3]RCFXSPW[F4][F5][F5]

Example

// Send a command out the on-board serial port of a CFMini on CFLink ID [03]
> [F2][03][F3]TMINSPW[F4]Hello World!\x0D[F5][F5]
// Reply
< [F2][03][F3]RMINSPW[F4][F5][F5]

// Send a command out the second on-board serial port of a Solo on CFLink ID [03]
> [F2][03][F3]TSOLSPW[F4]P02:Hello World!\x0D[F5][F5]
// Reply
< [F2][03][F3]RSOLSPW[F4][F5][F5]

Error

Notifications

SPR - Serial Port Read

The SPR notification contains incoming serial data, received from the on-board RS232 port when in RS232 Mode 232.
The reply is only sent to the CFLink ID's configured via the TGT command. This reply is never generated when serial port is in Program Mode PGM.

Data

< [F2]<ID>[F3]R<DEVICE>SPR[F4]<PORT>:<DATA>[F5][F5]

Example

// An incoming message "Hello World!" followed by a carriage return is received on the on-board serial port of a CFMini on CFLink ID [03].
// The CFMini is configured to send incoming RS232 data to CFLink ID's [02], [04] and [07]
< [F2][02][F3]RMINSPR[F4]Hello World!\x0D[F5][F5]
< [F2][04][F3]RMINSPR[F4]Hello World!\x0D[F5][F5]
< [F2][07][F3]RMINSPR[F4]Hello World!\x0D[F5][F5]

// An incoming message "Hello World!" followed by a carriage return is received on the first on-board serial port of a Solo on CFLink ID [03].
// The Solo is configured to send incoming RS232 data to all CFLink ID's.
< [F2][FF][F3]RSOLSPR[F4]P01:Hello World!\x0D[F5][F5]