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

From MythTV Official Wiki
Jump to: navigation, search

H25 working mostly

my setup is directv h25-> IOGear232a usb2serial-> null modem cable -> cables to go 26886 usb2serial -> mythbox

bauderate 9600

box type H20

Every now and then a channel change for channel 250 will go to channel 2 instead. Changing to channel change type 0 may have helped

I just received an H25, and I can't do a darned thing with it. Every attempt to use directv.pl, with various baudrates and box_type H20, fails with "excessive retries" -- even if I'm just using "get channel". You seem to have a magic touch. Phiwum (talk) 00:17, 5 August 2014 (UTC)
I take it back. I reset the H25 box and it's all good. Phiwum (talk) 00:25, 5 August 2014 (UTC)

D11

I have been messing with the usb port for a few days, I finally found this site after hours of searching.

I made a null cable, yet I still had to many problems to contend with, I have played with all the systems out there for httpc and found a major problem with this reciver the D11. So I called Direct TV today and finally got to a sorta real tech. LOL!

She had to try to read about what I was asking for on the usb port but she did find the problem.

There having a huge problem that will not be resolved for a projected time of 2 months. The USB port is not working due to software issues. It is a problems the will be fixed with a upgrade in the soft ware and although its not confirmed she did seem to thing this is a usb Upnp device.

Until then I think Ill buy a D10.

I appreciated the artical and hope that this will clear some issues up.

Trying to get directv.pl (D11 version) working with MythTV

I'm able to successfully use the modified (to use D11) directv.pl perl script, through a null-modem cum IOGear serial/usb converter, to work from a shell prompt, but have had no luck getting it to work from within MythTV. In mythtv-setup, in the box where the external tuner command string goes, I'm using

   directv.pl box_type D11 on last_param delay .2 key exit

as specified by the directv.pl script's usage verbiage. MythTV is supposed to place the desired channel number at the end of this string and then run the command. (And, yes, I've made sure it's in a directory where mythtv will find it. I've also tried using the explicit path. No joy.) It seems to have some effect in that the picture pauses for a moment, without sound, and then goes right on displaying the same channel I was watching before. No change.

Any ideas?

Ok, any GOOD ideas?

No luck with D11-100

I'm assuming the 100 extension is the manufacturer. I have 3 new boxes, all delivered end of May 2006. They are all D11-100, with firmware 0x1005. I've verified my cabling should work and checked everything on the Myth box, but I never receive any response from the STB. Very frustrated.

Turns out to be a bad BAFO USB serial adapter. An identical model replacement works. The bad one had a small bulge inside the molded plastic.

D11-100 works for me

I'm using my D11 with the above USB/NULL modem cable setup.

I'm using my own code to talk to it though, there is no reason that the above perl script won't work.

Controlling MythTV from a DirectTV D11 remote

I control the D11 box from myth and Myth from the D11 remote.

Script works after port is initialized

It works for me, but only after I use something else to "touch" the port. Am I missing something?

Edit: I got it working by adding a write_settings line to the end of the initialize subroutine.

D11-100 Notes on Install/Config

After some wrangling, I have managed to get this working. Channels are changing. I am a bit of a Linux newb, so I thought I might toss out a couple of notes on what I did in case it helps somebody else.

Permissions: make sure that the directv.pl script file is owned by the mythtv user, and that the user has execute permissions. I didn't at first (DOH!), and it wouldn't work.

IOGear Adapter: Has a small LED on it. On mine, that LED only lights up when data is being transmitted through the adapter, and even then, it flickers only slightly. I contacted IOGear, and they confirmed that is proper operation. Some folks on the web have stated that their LED was on all the time after plugging into the D11 STB, but I did not find that to be the case for my adapter.

SerialPort Perl Module: In order for this script to work, you must have the Device::SerialPort perl module installed. If it's not, you'll probably get an error containing a note about Device::SerialPort when starting mythbackend. Google Device::SerialPort to find packages or use the method described here to install from WCPAN.

Mythtvsetup Config: Because this script was modified for the D11, I believe it has some residual usage instructions that are no longer required. As the person above indicated, they used a string with multiple parameters in the external changer command and it didn't work. I only needed to plug in the explicit path (/usr/local/bin/directv.pl) to get it to work. Using the box_type parameter, for example, is unnecessary, as the script modifications set D11 as the default box type. This is quite different than the script in its "original" form (used to control one of several older RCA or D10 STBs).

Cabling: Rather than use the recommended Serial-to-USB, Null Adapter, Serial cable combo, I just used Serial-to-USB and a null modem serial cable. If you don't have a serial cable laying around (I didn't), it may be cheaper to get the null modem cable than the serial cable and null modem adapter (it was for me).

Timeout when sending commands to D11-100

I have a D11-100 DirecTV receiver. I bought the IOGEAR GUC232A USB to Serial adapter and the null modem cable. I have run the perl script (directv2.pl) and cannot get it to change channels or turn on/off or anything else. I used the sysinternals tool, and see the packet being sent (0xFA 0x82) to turn the STB on, but there is never a response. The firmware version on the STB is 1005 (though I think it will soon be updated to 1040 from what I hear). Regardless, it isn't working and I don't know why.

I have tried 9600 and 115200 for the baudrate. The LED on the GUC232A blinks (as noted above) when data is being sent to the STB. I have 2 COM ports, and I've tried both of them. I've tried restarting the STB both with the GUC232A plugged in and without it plugged in.

Any suggestions to get this working? I have a Hauppauge PVR 250 card and I'd like to be able to schedule shows etc. Thanks.

Migrating from RCA to Directv D11 receiver

My RCA receiver went bad and Directv replaced it with their own D11 box with the USB port, no low speed data. Got it changing channels again with three simple steps.

1) Ordered a USB to serial adapter amd set it up as described.

2) Downloaded the directv.pl modified for the d11 and installed in /usr/local/bin

3) Installed the SerialPort Perl Module (via RPMforge) for Fedora 4

Changes channels with no problem.

Why USB to serial? Why not USB to USB?

If the DirectTV receiver has a USB port and my MythTV PC has a USB port, why can't I connect them with a USB cable? Why do we have to connect USB to serial?

Answer0: Perhaps using a USB Bridge cable you can connect the PC to the STB but haven't tested that. This is a special USB cable with a small electronic circuit in the middle, You can't use a direct USB A/A cable, this can burn your USB ports!!!

Answer1: According to the General Set-top Information for Installers V2.2, it seems that this is just the way they designed it. It looks for the correct USB vendor ID and USB Product ID on the USB-Serial cable, and then accepts instruction codes through this. See section 3.1 "USB 2.0 Data Ports". Admittedly, it would be really nice as far as having to buy hardware if they supported straight USB->USB operation. However, due to the ease of use for the RS-232 serial protocol, it makes it easier for their hardware developers (and us hackers) to figure out how to interface and control these set top boxes. The USB protocol is much more complex. Also, see the section I wrote here: Official USB to Serial Cable Support --TrinitronX 15:29, 29 December 2008 (UTC)

I found a USB null modem cable (USB NMC-2.5m) seen on this page http://www.ftdichip.com/Products/EvaluationKits/USB-USBNullModem.htm Does anyone have experience using this connector for the D11 STB? Mgpalmer 18:25, 25 September 2008 (UTC)

directv.pl quit working...I had to change the baud rate

My mythbox quit changing channels on my d11 and I've been beating my head against the wall trying to figure it out. I kept getting the following error.

(in cleanup) can't call method "setcflag" on an undefined value at /usr/lib/perl5/device/SerialPort.pm line 482 during global destruction

which searches turned up little of value.


As one of my final futile attempts before I replaced the cable and null modem was to change the baud rate in the directv.pl script to 9600. From the command line I attempted to change channels and it works again.

Go figure. I assume that perhaps direct Tv updated the software/firmware in the box and changed the parameters.

Hope this helps someone.

Script fails

the directv.pl script just stopped working out of the blue. I've got a DirecTV D11-500. I've changed out the null modem cable and the usb-to-serial adapter and still nothing? Any ideas? It just keeps saying: Retry.

SCRIPT STOPPED WORKING...SOLVED

My post above yours is probably the issue. Mine just quit working one morning a few weeks ago. I assume DirectTv changed the programing of the box one night.

Open up the directv.pl with your favorite text editor and change the baud rate to 9600.

retry the script and see if it works now.

Script stopped working - solved & confirmed

The suggestion above to change the baud rate to 9600 worked for me, also. My channel change script had been working perfectly for months with a model D11 receiver and stopped working yesterday (Jan 30). After checking cables and swapping receivers, I was about to check the serial ports on my PC when I ran across the post above. Good find.

Stopped working when I upgraded Distro

I upgraded from MythDora 3.2 to 4.0. I had copied the directv.pl script to a USB drive and reinstalled it after the upgrade, but when I ran the script I get this:

  [root@muse ~]# directv.pl verbose get_channel
  getattr: Input/output error

I didn't mess with the serial cable at all, and it had worked perfectly before. Finally found the solution via google. I must have gone with a default, and picked IR_Blaster. I fixed it by removing /etc/modprobe.d/irblaster. Now it works perfectly. LinuxSneaker 21:23, 6 November 2007 (UTC)