SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2009, 02:57 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
MODIFIED: Simple Utility to Control Multiple DirecTV STBs via USB or Serial ports

This is an attempt to document my configuration of a system controlling multiple DirecTV HD receivers via PC serial and set-top-box USB ports. This system supports the "dash" designation for applicable DirecTV channels. Unlike the earlier version I created, this version works without remapping channels within the guide.

I. Prerequisites
A. EXEMultiTunerPlugin
B. DirecTV Channel Control Program for GBPVR (directv.exe)
C. DirecTVMultiChg.bat file
D. One (1) USB to Serial Adapter per DirecTV receiver
E. One (1) Null Modem Cable (or Null Modem Adapter and Serial Cable) per DirecTV Receiver
F. One (1) PC Serial port per DirecTV receiver

A. EXEMultiTunerPlugin
Obtain a copy of the SageTV-provided plugin.
http://forums.freytechnologies.com/f...33&postcount=7
Place the plugin into your SageTV directory

B. DirecTV Channel Control Program for GBPVR (directv.exe)
This is a serial control utility designed for GBPVR and is available on the GBPVR Wiki under "Utilities" It's a simple, DOS-based program that works from a command prompt and supports a wide variety of DirecTV receivers. See the Wiki page for details.

C. DirecTVMultiChg.bat file
This is a simple DOS-based batch file I created. It must be placed into the SageTV directory. This is the program that is executed by the EXEMultiTunerPlugin as referenced by the associated registry command. More on this batch file appears below.

D. and E. USB-to-Serial Adapter and Null Modem Cable
DirecTV boxes with USB ports (such as the Model H21) can be controlled via a USB-To-Serial adapter when paired with a null modem cable. You can easily find USB-To-Serial adapters for around $10 and null modem cables for around $2 online.

F. One (1) PC Serial port per DirecTV receiver
Obviously you will need a COM port on your PC for each receiver you want to control. If you have only one (or zero) COM ports on your motherboard you can add additional ports via onboard connectors (if available) and brackets, or via add-in PCI card, or more likely via USB-To-Serial adapters.

II. Configuration
A. Registry edits
B. Sage.properties Requirements
C. "IR" File and Tuner Control Setup
D. DirecTVMultiChg.bat file edits

A. Registry Edits
Create a text file (with a ".reg" extension) with the following contents:
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Frey Technologies\Common\EXEMultiTunerPlugin]
"command"="DirecTVMultiChg.bat %DEVICE% %CHANNEL%"

Execute this file to add a command to the Windows registry.

B. Sage.properties Requirements
The key to the EXEMultiTunerPlugin is that it passes both "device" and "channel" parameters to the command it executes. The "device" parameter is that which is referenced in the device_name property for each input of the applicable capture device. In this batch file the device names are set as "DSS1", "DSS2", et cetera, though they can be set to whatever device_name(s) you use in the .properties file.

C. "IR" File and Tuner Control Setup
The plugin requires an ".ir" file, even though it's not sending infrared commands. For what it's worth, in my setup I created a file named "DSS1.ir" which has only one line "DSS1 38000 400 4 600 800". This line must be terminated with a carriage return, so the file should actually have two lines. The pertinent pieces of information here are the filename "x.ir", where "x" is the name referenced in the device_name property and the "4", which specifies the number of digits for the %CHANNEL% parameter. I also believe you can set the number of digit using the "Remote Options" setup under the Tuner Setup menu. This file is stored in the \SageTV\Common\Remote Codes directory. You would repeat this process for each set-top box using the MultiTuner.

D. DirecTVMultiChg.bat File Edits
As it is currently configured this program handles up to five serially-controlled set-top boxes, though it can be easily edited to accommodate more. Also it assumes that your device_name properties are "DSS1","DSS2","DSS3"... "DSS5", and are connected to corresponding COM ports "COM1", COM2", "COM3"... "COM5". You can modify these assignments as required, but it's probably simple enough to map your receivers in this manner. In some cases your COM ports will install as ports other than "2", "3", et cetera, but you can either change the port number within Windows Device Manager, or modify the device_name property to correspond to the COM port.

Use this batch file at your own risk.

Hopefully this guide helps someone...

-J.R.
Attached Files
File Type: zip DirecTVMultiChg.zip (898 Bytes, 474 views)

Last edited by jchiso; 09-25-2011 at 02:37 PM. Reason: Registry file extension info, .ir file requirements
Reply With Quote
  #2  
Old 11-08-2009, 02:08 AM
pdessart pdessart is offline
Sage User
 
Join Date: Nov 2009
Location: Alameda, CA & Waiheke Island, NZ
Posts: 18
@jchiso -

Haven't tried this yet, but it looks to me like the registry entry should read:

"command"="DirecTVMultiChg.bat %DEVICE% %CHANNEL%"


One question, though. If you have a USB controlled STB and your PC is USB only, is it necessary to use USB <-> serial adapters? And if so, are you suggesting that two be placed back-to-back with a null-modem adapter in between?

Thanks,
Peter
Reply With Quote
  #3  
Old 11-08-2009, 10:02 AM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
Quote:
Originally Posted by pdessart View Post
... Haven't tried this yet, but it looks to me like the registry entry should read:

"command"="DirecTVMultiChg.bat %DEVICE% %CHANNEL%"
You are correct. I've made the change.

Quote:
Originally Posted by pdessart View Post
... If you have a USB controlled STB and your PC is USB only, is it necessary to use USB <-> serial adapters? And if so, are you suggesting that two be placed back-to-back with a null-modem adapter in between?
Yes. Any type of PC serial port will work; whether it's via onboard, add-in card or USB-To-Serial adapter.
Reply With Quote
  #4  
Old 11-09-2009, 02:36 AM
pdessart pdessart is offline
Sage User
 
Join Date: Nov 2009
Location: Alameda, CA & Waiheke Island, NZ
Posts: 18
Well, as I said I haven't tried this at all yet. I'm currently using a HDHomerun and some R5000HDs. Early next year, though, I'm planning to try integrating DirecTV using the Hauppauge HD-PVR. Since this uses IR blasting - which I'd rather not rely on - I'd like to try to incorporate serial control of the STBs. So, I was very interested to come across your first post.

Nice work on the batch file by the way (although I'd be inclined to name it .cmd since unless I'm mistaken some of this would require at least NT - as opposed to DOS). I'm much more fluent in *nix shell files, but I appreciate the parsing approach - which doesn't rely on any added exes.

I've done some more research and now understand better how this would interface with the STBs. I think what was throwing me at first is that most peripherals with USB interfaces are configured as clients. If that were the case with the DirecTV boxes, putting these serial adapters back-to-back wouldn't work.

However, according to this DirecTV Installers Guide, the DTV boxes' USB ports are configured as hosts (i.e. same as PCs). I liked the idea of simplifying the cabling using something like this USB-USB Null Modem Cable. (I came across this from reading posts by MythTV users. Lots of good info on the topic, including this guide: Controlling DirecTV Set Top Box (STB) via USB or Serial - although much of it is Linux specific.)

Unfortunately, the DirecTV STBs only support adapters using the Prolific PL2303 chipset (superseded by the 2303X and 2303HX, so it may take a bit of hunting to find them...) while that USB-USB cable uses the (generally thought to be superior) FTDI chipset. So, it looks like the only choice (for PCs without RS-232 ports) is:
PC <-> USB/serial converter <-> null modem adapter <-> PL2303 USB/serial converter <-> STB

In my searching I came across this program: DirecTV Serial Control Utility, which looks like it would be useful after cabling together the STBs and PC as a first test of the interconnect. Another intriguing idea occurred to me when I saw that this program includes a built in web server. I could almost see creating a network encoder using this plus the HD-PVR. (Almost... )
Reply With Quote
  #5  
Old 11-09-2009, 04:49 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
Quote:
Originally Posted by pdessart View Post
... I've done some more research and now understand better how this would interface with the STBs. I think what was throwing me at first is that most peripherals with USB interfaces are configured as clients. If that were the case with the DirecTV boxes, putting these serial adapters back-to-back wouldn't work.

However, according to this DirecTV Installers Guide, the DTV boxes' USB ports are configured as hosts (i.e. same as PCs). I liked the idea of simplifying the cabling using something like this USB-USB Null Modem Cable. (I came across this from reading posts by MythTV users. Lots of good info on the topic, including this guide: Controlling DirecTV Set Top Box (STB) via USB or Serial - although much of it is Linux specific.) ...
I'm not really sure what you're saying here; whether it's confirming or disputing anything that's been said earlier, but to be clear, this will work with a USB-to-Serial adapter on the PC. As long as you install the adapter and set the port accordingly it behaves no differently than a traditional, onboard COM port.
Reply With Quote
  #6  
Old 11-09-2009, 08:18 PM
pdessart pdessart is offline
Sage User
 
Join Date: Nov 2009
Location: Alameda, CA & Waiheke Island, NZ
Posts: 18
J.R. -

I'm not disputing anything. I wasn't saying that back-to-back USB/Serial adapters wouldn't work, just that I hadn't understood how it did. I understand how the USB host adapter on the PC presents a substitute for the onboard COM port, having used them for this plenty. What didn't make sense to me was how the reverse could be true - that the other adapter could turn a serial connection into a client USB connection.

My research showed that the DirecTV engineers had designed their USB ports as host ports, which allows the STB <-> USB adapter <-> RS-232 side of things to work.

It wasn't disbelieving that this approach works, however, which had started me researching further. I was looking for a way to connect to the STBs with some sort of direct USB to USB cable. What I found was that the only single-cable solution designed to connect serial-to-serial via USB won't work for the DTV boxes (because it uses a different USB chip than they support).

Again, thanks for your work on this tool. When I undertake adding DirecTV to my Sage system, I think this is exactly what I need.

Peter
Reply With Quote
  #7  
Old 11-09-2009, 08:32 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
I see what you're saying now; you were speaking from the DirecTV side of the issue. All I can say about that is knock on wood and let's just hope DirecTV does not change the port's current implementation...
Reply With Quote
  #8  
Old 09-25-2011, 02:45 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
Quote:
Originally Posted by jchiso View Post
C. "IR" File and Tuner Control Setup
The plugin requires an ".ir" file, even though it's not sending infrared commands. For what it's worth, in my setup I created a file named "DSS1.ir" which has only one line "DSS1 38000 400 4 600 800". This line must be terminated with a carriage return, so the file should actually have two lines.
I spent a good amount of time re-creating a server last night and had problems getting commands sent via the (USB) serial port until I modified the .ir file. A file with just one line would not work, nor would it allow me to change Remote Options within the setup menu. It did not work until I did this:
DSS1 38000 400 4 600 800
<blank line>
Reply With Quote
  #9  
Old 07-04-2013, 02:50 PM
snorth87 snorth87 is offline
Sage User
 
Join Date: Jul 2013
Posts: 10
Issues with "dash" channels

I got the extmultitunerplugin to work and change channels using HD PVR and DirecTV. The only remaining issue I have is with the one channel I ever watch that has a dash in it.

My regional sports network (Fox Sports Southwest, ch 676) has an alternate channel that sometimes shows games on HD channel 677-1. The DirecTV guide info that downloads into Sage only shows the SD version of this alternate channel on 677. It can tune to this SD 677 channel just fine, but I would like HD. I've tried every combination of logical and physical remapping I could think of, but still can't get Sage to tune to channel to 677-1.

Any help or ideas?

Thanks!
Reply With Quote
  #10  
Old 07-05-2013, 11:09 AM
SHS's Avatar
SHS SHS is offline
Moderator
 
Join Date: Mar 2003
Location: Vinita, Oklahoma
Posts: 4,544
Quote:
Originally Posted by snorth87 View Post
I got the extmultitunerplugin to work and change channels using HD PVR and DirecTV. The only remaining issue I have is with the one channel I ever watch that has a dash in it.

My regional sports network (Fox Sports Southwest, ch 676) has an alternate channel that sometimes shows games on HD channel 677-1. The DirecTV guide info that downloads into Sage only shows the SD version of this alternate channel on 677. It can tune to this SD 677 channel just fine, but I would like HD. I've tried every combination of logical and physical remapping I could think of, but still can't get Sage to tune to channel to 677-1.

Any help or ideas?

Thanks!
There should be no 677-1 that only works if your on a QAM and ATSC Tuner Cards know as sub channel
I only see
677 Fox Sports Southwest (Zone 3)
677 Fox Sports Southwest HD (Zone 3)
Reply With Quote
  #11  
Old 07-05-2013, 04:07 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 624
Quote:
Originally Posted by snorth87 View Post
I got the extmultitunerplugin to work and change channels using HD PVR and DirecTV. The only remaining issue I have is with the one channel I ever watch that has a dash in it.

My regional sports network (Fox Sports Southwest, ch 676) has an alternate channel that sometimes shows games on HD channel 677-1. The DirecTV guide info that downloads into Sage only shows the SD version of this alternate channel on 677. It can tune to this SD 677 channel just fine, but I would like HD. I've tried every combination of logical and physical remapping I could think of, but still can't get Sage to tune to channel to 677-1.

Any help or ideas?

Thanks!
You have to re-map the (physical) channels to a five-digit format, where channel "667-1" is mapped to "16671". The plugin only supports digits. The batch file converts the tuning command to send it to the receiver as "667-1" ...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Serial USB Control of DirecTV D12-300 davephan Hardware Support 11 07-01-2015 01:32 AM
Directv serial (USB) control problems jvcd3po Hardware Support 10 09-22-2009 07:50 PM
DirecTV usb serial control redbaron73 SageTV Linux 8 02-28-2009 09:42 PM
Simple utility to control multiple USB or Serial HD DirecTV STBs jchiso Hardware Support 15 02-19-2009 06:27 PM
Got DirecTV Serial Control in SageTV working with Hughes HAH-SA ? What STBs do work ? kennethadams102 Hardware Support 21 03-12-2005 03:48 AM


All times are GMT -6. The time now is 12:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.