Talk:Controlling DirecTV Set Top Box (STB) via USB or Serial
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.
- 1 Trying to get directv.pl (D11 version) working with MythTV
- 2 No luck with D11-100
- 3 D11-100 works for me
- 4 Script works after port is initialized
- 5 D11-100 Notes on Install/Config
- 6 Timeout when sending commands to D11-100
- 7 Migrating from RCA to Directv D11 receiver
- 8 Why USB to serial? Why not USB to USB?
- 9 directv.pl quit working...I had to change the baud rate
- 10 Script fails
- 11 SCRIPT STOPPED WORKING...SOLVED
- 12 Script stopped working - solved & confirmed
- 13 Stopped working when I upgraded Distro
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.
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.
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?
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.
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)