Make/Model  Device Version Connection Type
DirecTV/Various N/A Serial

Description:

This driver supports the family of DirecTV set top boxes. Many models of set top box have a control port which allows for serial control of the box via computer. The control protocol is simple, but provides the most important functionality of power on/off and channel changing, querying channels, and so forth.

There are variations across manufacturers as to exactly which of the possible commands are supported, so this driver asks you which model you have. Currently the choices are "Generic Old Style", "Generic New Style" which should work with most boxes (see the Quirks section below), and Sony HD-300, which works with the Sony HD-300 and the equivalent Hughes model. These latter two have a non-standard version of the protocol. If it becomes necessary, other models can be added explicitly to this list and special case code added to the driver to deal with them.

These models have been explicitly tested so far, though most others should work as well. If you verify that another model works, please let us know.

Model Port Type Protocol Type
RCA DRD303RA DB-15 Old
Sony HD300 DB-9 New

It will not work with the Sony HD200, which has a control port but used an unusual implementation of the protocol. If you need this support, let us know.

This driver's server side component is CML based. The driver classes for this device are in the MEng.System.CQC.Drivers.DirecTV scope.

Quirks and Limitations:

There are two main flavors of protocol supported by these devices. There is an old and new style protocol, with the new style mainly having differences designed to accommodate the new needs of high definition set top boxes, which don't just have a single number channel, but instead can have a channel and from 1 to 5 sub-channels. You must know which version of the protocol your box supports, because the driver install wizard will ask you which one and if you get it wrong, the driver won't work.

Some devices don't support all of the commands supported by the protocol, so you have to be aware that some commands might not work on your device. This driver tends towards supporting just the core features, but any particular box may not work. If so, let us know and we can try to deal with this by adding special case code to work with your box.

If you set the channel and/or sub-channel to something not actually available, and there's no signal lock, the channel/sub-channel fields will be set to zero and in some cases the box will not respond to any subsequent attempts to set the channel. This has been observed with the Sony HD-300 at least. All you can do is send a power off command, wait a couple seconds, and send a power on. It will generally come back on set to the DirecTV preview channel.

Connection Details

DirecTV set top boxes use a serial connection. The port parameters and cable type vary according to the protocol style and the connection type. Some boxes have a modular style phone connector, and some have a DA-15, and some have a DB-9 (DE-9) connector. But they all are used for the same protocol.

Modular (4P4C)

Set Top Box     Computer 
1 (Ground)      (Ground)
2 (Transmit)    (Receive) 
4 (Receive)     (Transmit) 

DB-9 (DE-9)

It can use a standard 9 or 3 wire straight through cable.

DB-15 (DA-15)

Set Top Box   	Computer
13 (Ground)     (Ground) 
14 (Transmit)   (Receive) 
6 (Receive)     (Transmit) 

The connection parameters are 9600, 8 data bits, 1 stop bit, no parity, and no flow control. The speed is low, but the amount of data is pretty trivial, so it's not a big issue.

If you have the modular jack, this is a 'Home Control' variant, and it has a configurable mode. You should use the set top box menus to configure it for 'Low Speed Data' mode, not 'Home Control' mode.

Driver Fields

This section lists the fields that the driver makes available, their types, minimum and maximum values, etc...

Name Type R/W Description/Limits
Channel Card R/(W) Indicates the current channel selected. In old style protocol boxes, this field is writeable and you can set the channel by writing to it. In new style protocol boxes, it is read only and SetChannel is used to set the channel. If the device doesn't have a lock on a channel, this will be set to zero.
ChannelAdj Boolean W If not a Sony HD-300 (or equivalent), this field is available to adjust the channel up or down. Write True to adjust up and False to adjust down. Even if not one of these models, the command might not work if the command is not implemented by your particular box.
ChannelLocked Boolean R Indicates whether there is current a good channel signal coming in. If you set a channel that is not present or not strong enough to lock, this will be false (see the Quirks section above.)
Format String W For the Sony HD-300/Hughes boxes, this allows you to select the output format you want. This is an enumerated field with the values: 1080, 720, 480p, Native.
Navigate String W Allows you to access basic cursor movement and menu access functions. This is an enumerated field with the values: Down Cursor, Enter/Info, Left Cursor, Menu, Right Cursor, Up Cursor.
Power Boolean W Power the device on or off. Unfortunately, the power state cannot be queried, so this is a write-only field. This controls the 'soft' power state, i.e. standby.
SetChannel String W If a new protocol type box, this field will exist and you can use it to set channels, because the Channel field will be read only. This is because you must set a channel and sub-channel at the same time. So it is a string in the form "cc.ss", i.e. a channel number and a sub-channel number, divided by a period. If the target channel has no sub-channel, set the sub-channel to zero.
SubChannel Card R Indicates the currently selected sub-channel. If the currently selected channel has no sub-channel, or the box does not currently have a lock on a signal, this will be zero. When a good lock is had on a channel which has a sub-channel, this will be from 1 to 5.

Note that there is a specialized user interface widget available to display channel logos. If you create a Logo Image widget and associate it with the Channel field of this driver, it will use the current channel number to display the appropriate logo if one is available.