Controlling DirecTV Set Top Box (STB) via USB or Serial

From MythTV Official Wiki
Revision as of 16:23, 12 January 2007 by JeffSimpson (talk | contribs) (Overview)

Jump to: navigation, search


The DirecTV D11/H20 Satellite set top box contains a USB port that can be used as a serial port to change channels and perform other tasks on the box. To do this, you need the following cables:

  1. USB->Serial Adapter (usb male to 9 male).
    • Only IOGEAR GUC232A, ATEN UC-232A, BAFO BF-810, Sabrent SBT-USC1M are known supported. Other cables are assumed NOT to work
  2. 9-pin Null-Modem Adapter (9 female to 9 female)
  3. 9 pin serial cable. (9 female to 9 male)

The end result of this is a null modem serial connection between computers. I assume that using two USB->Serial adapters would also work, given that the Null Modem adapter was still used.

I used the BAFO BF-810 adapter (found for $9 online) and a pair of 9pin DSub to RJ45 adapters wired as a crossover serial cable, along with a straight-through ethernet cable.

I started with the script used to control the D10 box. I had to change the speed to 115200 from 9600 (contrary to the installers guide which says 9600 or 155200, which must be a typo). I also had to enable hardware flow control in order to get reliable operation.


In order to configure MythTV to call the script, you must add the command with desired options to the tuner section of mythtv-setup( User Manual:Detailed configuration Backend ).

  1. Run mythtv-setup
  2. Select Input connections
  3. Choose the connection you would like to control
  4. Add the script to the External channel change command parameter

For example, I set mine to...


The help text for this parameter says, "If specified, this command will be run to change the channel for inputs which have an external tuner device such as a cable box. The first argument will be the channel number." I interpreted this to mean that the channel will be added to whatever is specified here. This would mean that parameters could be added such as [hide, retries_number n,...]. It appears that once a command is sent like "hide" it is persistent. So you could specify it in a command window at any time.

Cable Pinout

This is a standard Null-modem cable, but here is the pinout for the sake of being complete:

TD (Transmit Data) 3 -> 2 RD
RD (Receive Data) 2 -> 3 TD
RTS (Request To Send) 7 -> 8 CTS
CTS (Clear To Send) 8 -> 7 RTS
SG (Signal Ground) 5 -> 5 SG

Hardware Compatibility

  • DirecTV D11-500: Channel changing works (by key). On/Off, OSD On/Off, Remote Input On/Off all work. Other features not working yet.
  • DirecTV D11-300: Channel changing not yet confirmed, some problems reported
  • DirecTV D11-100: Same results as D11-500.
  • DirecTV H20: Same results as D11-500

Controlling D11 from Windows

I know this isn't myth-related at all, but here is how to control the D11 from windows!

  1. Install Perl (I recommend [ActivePerl])
  2. Start Perl Package Manager (PPM)
  3. Add the BdP Repository: repository add BdP
  4. Install Win32::SerialPort: install Win32-SerialPort
  5. Install Win32::API: install Win32-API
  6. Install Time::HiRes: install Time-HiRes
  7. Download the Windows version of the DirecTV Serial Control Script (see links below). Save it to C:\perl\
  • Example Execution:

perl.exe c:\perl\ port com1 baudrate 115200 flow none box_type D11 25

External Links

  • PortMon Windows software to monitor traffic on a com port
  • Com Port Toolkit Windows software to send specific commands to the serial port.

For More Information