CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


Sidebar

hardware:cflink:cflink-introduction

This is an old revision of the document!


CFLink Protocol Introduction

This document is an overall view of the CFLink Protocol, used by CommandFusion hardware.
CFLink is a RS485 5-wire bus, used to interconnect various CommandFusion devices. For more details on the physical bus characteristics, please see the CFLink Bus documentation.

Basic Structure

Hex Data

Throughout the CFLink Protocol documentation, hex bytes will be displayed in square brackets, with uppercase hex characters inside.
For example, a carriage return is represented as [0D].

Message Format

The basic structure of all messages on the CFLink bus is as follows:

// Basic message format
> [F2]<ID>[F3]<COMMAND>[F4]<DATA>[F5][F5] 

All messages start with [F2] followed by a single ID byte representing the target (or source in the case of replies) device on the bus.
Then an [F3] byte, followed by 7 bytes representing the Command.
Then an [F4] byte, followed by optional Data associated with the command. The Data can be empty if the command does not require any associated data.
Finally, all messages are terminated with two [F5] bytes.

NOTE: THROUGHOUT THIS DOCUMENTATION, ALL CFLINK EXAMPLES WILL START WITH > OR < - THIS IS NOT PART OF THE COMMAND, BUT JUST USED TO SIGNIFY THE START OF A NEW SENT OR RECEIVED PACKET.

Every device on the CFLink bus must have a unique ID. The valid ID range is [02] to [EF] (238 total per CFLink bus).
When sending a command, you must specify the ID of the device to send the command to.

Broadcast ID

In some circumstances, you may want to send a broadcast to all devices on the network. This can be done by using the Broadcast ID: [FF].

NOTE: BROADCAST MESSAGES CANNOT BE GUARANTEED TO BE DELIVERED TO ALL DEVICES ON LARGE NETWORKS. BROADCASTING IS ONLY RECOMMENDED FOR NON-CRITICAL MESSAGES.

Commands and Replies

The <COMMAND> part of each message is always 7 characters, always upper case, and formatted as follows: <TYPE><DEVICE><COMMAND_NAME>

  • <TYPE> = 1 char, types are documented below.
  • <DEVICE> = 3 chars representing the model name of the device or type of port we are targeting (or the device/port type that the reply came from).
  • The <DEVICE> name CFX can be used to target any device. It is useful for when you are sending a command that any device should respond to, WHO for example.
  • <COMMAND_NAME> = 3 chars representing the name of the actual command being performed.
hardware/cflink/cflink-introduction.1344568006.txt.gz · Last modified: 2012/08/10 03:06 by aaron