====== IR Blaster CFLink Protocol ======
The following documentation is for the IR Blaster device CFLink protocol messages.
===== Transmission Messages =====
==== SND - Send IR ====
The ''SND'' (Send) command is used to send an IR command via one or more IR ports on the IR Blaster.
=== Data ===
> [F2][F3]TIRBSND[F4]::[F5][F5]
* **** = The IR port to send the IR data from. 3 chars, uppercase ''P'' followed by the port number (2 digits)
*''P01'' = On-board Blaster output
*''P02'' = Secondary emitter output
*''PZZ'' = Send IR out both ports consecutively.
* **** = The format of the to send:
*''DBA'' - Send an IR command from the internal database.
*''MEM'' - Send a learned IR code that is stored on the device memory.
*''RAW'' - Send an IR code in raw hex format, eg. CCF codes.
*''STR'' - Send an IR code in CommandFusion's proprietary format.
* **** = The data of the IR code to send. The format depends on the chosen:
*''DBA'' - :: - See the [IR Database Documentation](irdatabase.html) for more details.
* **** = The number corresponding to the type of device. (2 digits)
* **** = The code set number from the Database table.
* **** = The key code from the Database table.
* ''MEM'' - :
* **** = The name of the device, as stored in the IR file.
* **** = The name of the IR function to send, within the device IR file.
*''RAW'' - - The raw hex code (Often called CCF) to send. Only 'learned' IR codes (starting with 0000) are allowed.
*''STR'' - - generated by [[hardware:quick-start:ir-learner|IR Learner software]]
Note that a single ''SND'' command can contain multiple ports to send to, using the [[hardware:cflink:cflink-introduction#port-separator|standard port separators]]
=== Reply ===
// The reply does not echo the data sent in an effort to reduce bus traffic
< [F2][F3]RIRBSND[F4][F5][F5]
If sending multiple IR commands via a single CFLink message, the reply will only happen after all IR commands have been sent.
=== Example ===
// Send a CCF hex code via the Blaster output. Send a database IR code to the secondary emitter output.
// From IR Blaster on CFLink ID [06].
> [F2][06][F3]TIRBSND[F4]P01:RAW:0000 0067 0000 0015 0060 0018 0030 0018 0018 0018 0030 0018 0018 0018 0030 0018 0018 0018 0018 0018 0018 0018 0030 0018 0018 0018 0030 0018 0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0216|P02:DBA:06:1033:01[F5][F5]
// Reply
< [F2][06][F3]RIRBSND[F4][F5][F5]
=== Error ===
* 003 = Invalid Port Number
* 450 = Invalid IR Format Type
* 451 = Invalid IR Database Parameters
* 452 = Invalid IR Memory Parameters
* 453 = Invalid IR Raw Hex Code
* 454 = Invalid CF IR format
===== Notifications =====
==== RCV - Receive IR Data ====
The ''RCV'' (Receive) notification is generated when either the on-board IR receiver, or the external IR receiver detects an IR signal.
=== Data ===
< [F2][F3]RIRBRCV[F4]:[F5][F5]
* **** = The IR port that the IR data was received via. 3 chars, uppercase 'P' followed by the port number (2 digits)
* ''P01'' = On-board Blaster output
* ''P02'' = Secondary emitter output
* **** = The IR data generated by the [[hardware:quick-start:ir-learner|IR Learner software]]
=== Example ===
// IR Data is received via the on-board IR receiver, IR Blaster on CFLink ID [06]
< [F2][06][F3]RIRBRCV[F4]P01:0066016100160119001601320016011A0016011900160132001601310016011A0016[F5][F5]