SnapStream Forums

Go Back   SnapStream Forums > User-to-User Troubleshooting & Support Forums > Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-15-2004, 09:25 AM
Registered User
 
Join Date: Sep 2004
Posts: 7
BTV and WinLIRC

Has anyone managed to get BTV working with WINLIRC as a IR blaster interface?

Thanks,
Spektre
Reply With Quote
  #2 (permalink)  
Old 09-17-2006, 11:46 AM
Registered User
 
Join Date: Sep 2006
Posts: 5
Re: BTV and WinLIRC

More than a year and a half later, and an even newer version of BTV, the answer is yes.

How to use WinLIRC to control BeyondTV 4.4 and your set top boxes

Many people use Girder and the WinLIRC plugin for it to control their HTPC. Downsides are that Girder is not free and the learning curve was too steep for me.
Some time ago I asked the HIP (http://www.byremote.com.au/) developer to make a WinLRIC plugin and he did. But I didn't use it. You can find HIP and the WinLIRC plugin at http://www.byremote.com.au/downloads...asp?SCLASS=HIP
HIP is purportedly easier to learn than Girder, and it is free.

But there is an even easier shortcut.

IREX from http://www.ramscan.com/irex/

The readme and config files from the downloaded Irex zip file should be sufficient documentation for you to master control of your HTPC/TVPC. Keyboard commands for controlling BTV are in BeyondTV Help.

But controlling your HTPC/TVPC is only half of the solution for most people. Many (if not most) people want to control a set top box or two (or more). So most of this dissertation is about controlling your set top box(es) from BeyondTV using the external tuner plugin, WinLIRC (and the "included" transmit.exe file), and some home-brew scripting.

The BeyondTV setup wizard will let you send "enter" after the channel number, or to send the channel as a single argument, or, if sent as individual digits, putting time delay between the digits, padding with zeros to two, three or four digits.

But none of that works for me - I could not get the external tuner to use the settings from the BTV setup wizard so I could not use transmit.exe by itself. So if you have that problem, here is how I solved it:

Step 1. I needed time delay between digits. I downloaded and installed the Windows Server 2003 Administration Tools Pack from http://www.microsoft.com/downloads/d...a1e4-a8dcbacff 8e3&DisplayLang=en. Then I copied the sleep.exe to C:\Winlirc and uninstalled the resource kit (kind of a convoluted way to get sleep.exe, but I didn't spend a lot of time on the web looking for it). The syntax for a time delay of 1/4 second is

sleep -m 250

That will give you a 250 millisecond delay wherever you put it in your script (more on the script later). You can adjust your delay to whatever works with your set top box (leave out the sleep command if you don't need any delay).

Step 2. Download and install WinLIRC. A compiled transmit.exe file was somehow left out of WinLIRC 0.6.5, so get it from the WinLIRC 0.6.4 version and put it in your WinLIRC directory (I downloaded the 0.6.4 zip file, extracted transmit.exe into the C:\Winlirc directory, then deleted the 0.6.4 zip).

Step 3. For detailed instructions on using WinLIRC, see http://gbpvr.com/pmwiki/pmwiki.php/Hardware/WinLirc

Step 4. Once you get the remote codes of your set top box into your WinLIRC config file, and WinLIRC is working with your set top box, you are ready to write your script. If your set top box requires you to press "enter" or "select" after the channel digits, that needs to go in your script. So you need to know the name of that key in your WinLIRC config file. I named it "E" when I was teaching WinLIRC the codes for my set top box. So that is what I used in my script.

I have two set top boxes, one needs "enter" to change channels, and the other changes channels faster if I pad to three digits. I also have listings for two service providers combined into a single lineup and both providers have channels 5, 6 and 10. Since I am using the XMLTV plugin for BeyondTV and not TitanTV, I was able to edit the lineups and assign different channel numbers to these channels in the lineup, then I translate them back to their original values in the script so the correct digits get sent to the correct set top box.

I named my script "channel.cmd" and put it in my Winlirc directory (C:\Winlirc\channel.cmd):
-----------------------------------------------------------------------
@echo off
REM Syntax for this script is "channel.cmd channel_number"
REM where "channel_number" is a number up to three digits.
REM (one can expand that to four or more digits if required.)
REM
REM I am using TRANSMIT.exe to send the characters to WinLIRC.
REM TRANSMIT.exe can only send one character at a time to WinLIRC.
REM The syntax is "transmit remotename codename repititions"
REM
REM This script decides which remote code set to use (based on
REM channel number), transmits the digits one at a time, using the
REM appropriate remote name (and inserting leading zeroes if the
REM set top box requires padding), and sends "enter" if the set
REM top box requires that character to initiate channel change.
REM

SET CHANNEL=%1

REM Since I have one lineup combined from two different service
REM providers, and two set top boxes, I have to select which
REM command set to use, and I do that based on channel number.
REM 1 - 6, 9, 10 and 26 are in my AFN lineup,
REM all other channels are in my NTL lineup.
REM 5, 6 and 10 appear in both lineups, so I mapped those NTL
REM channels to 17, 18 and 16 in my XMLTV plugin configuration.
REM The first 8 "IF" statements branch to the correct section of the
REM script, or restore the channels as required to get the correct
REM digits to the NTL set top box for this to work.

IF %CHANNEL% GTR 26 GOTO :NTL
IF %CHANNEL% LSS 7 GOTO :AFN
IF %CHANNEL% EQU 9 GOTO :AFN
IF %CHANNEL% EQU 10 GOTO :AFN
IF %CHANNEL% EQU 26 GOTO :AFN
IF %CHANNEL% EQU 16 SET CHANNEL=10
IF %CHANNEL% EQU 17 SET CHANNEL=5
IF %CHANNEL% EQU 18 SET CHANNEL=6
:NTL
REM These four "IF" statements pad zeroes to make three digits
IF %CHANNEL% LSS 100 call C:\WINLIRC\transmit NTL 0 2
IF %CHANNEL% LSS 100 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% LSS 10 call C:\WINLIRC\transmit NTL 0 2
IF %CHANNEL% LSS 10 call C:\Winlirc\sleep.exe -m 150
call C:\WINLIRC\transmit.exe NTL %CHANNEL:~0,1% 2
IF %CHANNEL% GTR 9 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 9 call C:\WINLIRC\transmit NTL %CHANNEL:~1,1% 2
IF %CHANNEL% GTR 99 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 99 call C:\WINLIRC\transmit NTL %CHANNEL:~2,1% 2
GOTO :end
:AFN
call C:\WINLIRC\transmit AFN %CHANNEL:~0,1% 2
IF %CHANNEL% GTR 9 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 9 call C:\WINLIRC\transmit AFN %CHANNEL:~1,1% 2
call C:\Winlirc\sleep.exe -m 150
REM AFN set top box requires "enter" to initiate channel change.
REM the "enter" code in my winlirc .cf file is named "E"
call C:\Winlirc\transmit AFN E 1
:end
EXIT
-----------------------------------------------------------------------
If WinLIRC works for you (I usually tested with the WinLIRC gui and sent the "mute" command), then you can test your script from a DOS window. Change to the directory where your channel.cmd file is and type

channel.cmd 24

and hit <enter>. Your set top box should change to channel 24. If that works, you are almost done.

Step 5. Download the zip file from post 1 of of the forum thread
EXE File Tuner Plugin
Unzip the SSexeTuner.dll in the tuner directory of BeyondTV. If you installed BeyondTV in the default directory of the installer, the tuner directory is

C:\Documents and Settings\All Users.Windows\Application Data\SnapStream\Beyond TV\tuner

Extract and edit the .reg file. Here is what mine looks like:
-----------------------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\snapstream media\EXETunerPlugin]
"Executable"="C:\\Winlirc\\channel.cmd"
"Arguments"="%CHANNEL%"
----------------------------------------------------------------------
Save the .reg file and run it.

Follow the rest of the BTV setup wizard instructions in the readme.txt that comes in the ssexetuner_0.1.zip file. You might have to restart your PC for the registy change to take effect, or you might just have to restart BTV, or you might not have to restart anything. Do whatever works.

That's it. It works for me, but your mileage may vary.
Reply With Quote
  #3 (permalink)  
Old 02-08-2008, 04:03 PM
Registered User
 
Join Date: Mar 2004
Location: Livermore, CA
Posts: 390
Send a message via AIM to Greg Caulder
Re: BTV and WinLIRC

Quote:
Originally Posted by markbb1 View Post
More than a year and a half later, and an even newer version of BTV, the answer is yes.

How to use WinLIRC to control BeyondTV 4.4 and your set top boxes

Many people use Girder and the WinLIRC plugin for it to control their HTPC. Downsides are that Girder is not free and the learning curve was too steep for me.
Some time ago I asked the HIP (http://www.byremote.com.au/) developer to make a WinLRIC plugin and he did. But I didn't use it. You can find HIP and the WinLIRC plugin at http://www.byremote.com.au/downloads...asp?SCLASS=HIP
HIP is purportedly easier to learn than Girder, and it is free.

But there is an even easier shortcut.

IREX from http://www.ramscan.com/irex/

The readme and config files from the downloaded Irex zip file should be sufficient documentation for you to master control of your HTPC/TVPC. Keyboard commands for controlling BTV are in BeyondTV Help.

But controlling your HTPC/TVPC is only half of the solution for most people. Many (if not most) people want to control a set top box or two (or more). So most of this dissertation is about controlling your set top box(es) from BeyondTV using the external tuner plugin, WinLIRC (and the "included" transmit.exe file), and some home-brew scripting.

The BeyondTV setup wizard will let you send "enter" after the channel number, or to send the channel as a single argument, or, if sent as individual digits, putting time delay between the digits, padding with zeros to two, three or four digits.

But none of that works for me - I could not get the external tuner to use the settings from the BTV setup wizard so I could not use transmit.exe by itself. So if you have that problem, here is how I solved it:

Step 1. I needed time delay between digits. I downloaded and installed the Windows Server 2003 Administration Tools Pack from http://www.microsoft.com/downloads/d...a1e4-a8dcbacff 8e3&DisplayLang=en. Then I copied the sleep.exe to C:\Winlirc and uninstalled the resource kit (kind of a convoluted way to get sleep.exe, but I didn't spend a lot of time on the web looking for it). The syntax for a time delay of 1/4 second is

sleep -m 250

That will give you a 250 millisecond delay wherever you put it in your script (more on the script later). You can adjust your delay to whatever works with your set top box (leave out the sleep command if you don't need any delay).

Step 2. Download and install WinLIRC. A compiled transmit.exe file was somehow left out of WinLIRC 0.6.5, so get it from the WinLIRC 0.6.4 version and put it in your WinLIRC directory (I downloaded the 0.6.4 zip file, extracted transmit.exe into the C:\Winlirc directory, then deleted the 0.6.4 zip).

Step 3. For detailed instructions on using WinLIRC, see http://gbpvr.com/pmwiki/pmwiki.php/Hardware/WinLirc

Step 4. Once you get the remote codes of your set top box into your WinLIRC config file, and WinLIRC is working with your set top box, you are ready to write your script. If your set top box requires you to press "enter" or "select" after the channel digits, that needs to go in your script. So you need to know the name of that key in your WinLIRC config file. I named it "E" when I was teaching WinLIRC the codes for my set top box. So that is what I used in my script.

I have two set top boxes, one needs "enter" to change channels, and the other changes channels faster if I pad to three digits. I also have listings for two service providers combined into a single lineup and both providers have channels 5, 6 and 10. Since I am using the XMLTV plugin for BeyondTV and not TitanTV, I was able to edit the lineups and assign different channel numbers to these channels in the lineup, then I translate them back to their original values in the script so the correct digits get sent to the correct set top box.

I named my script "channel.cmd" and put it in my Winlirc directory (C:\Winlirc\channel.cmd):
-----------------------------------------------------------------------
@echo off
REM Syntax for this script is "channel.cmd channel_number"
REM where "channel_number" is a number up to three digits.
REM (one can expand that to four or more digits if required.)
REM
REM I am using TRANSMIT.exe to send the characters to WinLIRC.
REM TRANSMIT.exe can only send one character at a time to WinLIRC.
REM The syntax is "transmit remotename codename repititions"
REM
REM This script decides which remote code set to use (based on
REM channel number), transmits the digits one at a time, using the
REM appropriate remote name (and inserting leading zeroes if the
REM set top box requires padding), and sends "enter" if the set
REM top box requires that character to initiate channel change.
REM

SET CHANNEL=%1

REM Since I have one lineup combined from two different service
REM providers, and two set top boxes, I have to select which
REM command set to use, and I do that based on channel number.
REM 1 - 6, 9, 10 and 26 are in my AFN lineup,
REM all other channels are in my NTL lineup.
REM 5, 6 and 10 appear in both lineups, so I mapped those NTL
REM channels to 17, 18 and 16 in my XMLTV plugin configuration.
REM The first 8 "IF" statements branch to the correct section of the
REM script, or restore the channels as required to get the correct
REM digits to the NTL set top box for this to work.

IF %CHANNEL% GTR 26 GOTO :NTL
IF %CHANNEL% LSS 7 GOTO :AFN
IF %CHANNEL% EQU 9 GOTO :AFN
IF %CHANNEL% EQU 10 GOTO :AFN
IF %CHANNEL% EQU 26 GOTO :AFN
IF %CHANNEL% EQU 16 SET CHANNEL=10
IF %CHANNEL% EQU 17 SET CHANNEL=5
IF %CHANNEL% EQU 18 SET CHANNEL=6
:NTL
REM These four "IF" statements pad zeroes to make three digits
IF %CHANNEL% LSS 100 call C:\WINLIRC\transmit NTL 0 2
IF %CHANNEL% LSS 100 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% LSS 10 call C:\WINLIRC\transmit NTL 0 2
IF %CHANNEL% LSS 10 call C:\Winlirc\sleep.exe -m 150
call C:\WINLIRC\transmit.exe NTL %CHANNEL:~0,1% 2
IF %CHANNEL% GTR 9 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 9 call C:\WINLIRC\transmit NTL %CHANNEL:~1,1% 2
IF %CHANNEL% GTR 99 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 99 call C:\WINLIRC\transmit NTL %CHANNEL:~2,1% 2
GOTO :end
:AFN
call C:\WINLIRC\transmit AFN %CHANNEL:~0,1% 2
IF %CHANNEL% GTR 9 call C:\Winlirc\sleep.exe -m 150
IF %CHANNEL% GTR 9 call C:\WINLIRC\transmit AFN %CHANNEL:~1,1% 2
call C:\Winlirc\sleep.exe -m 150
REM AFN set top box requires "enter" to initiate channel change.
REM the "enter" code in my winlirc .cf file is named "E"
call C:\Winlirc\transmit AFN E 1
:end
EXIT
-----------------------------------------------------------------------
If WinLIRC works for you (I usually tested with the WinLIRC gui and sent the "mute" command), then you can test your script from a DOS window. Change to the directory where your channel.cmd file is and type

channel.cmd 24

and hit <enter>. Your set top box should change to channel 24. If that works, you are almost done.

Step 5. Download the zip file from post 1 of of the forum thread
EXE File Tuner Plugin
Unzip the SSexeTuner.dll in the tuner directory of BeyondTV. If you installed BeyondTV in the default directory of the installer, the tuner directory is

C:\Documents and Settings\All Users.Windows\Application Data\SnapStream\Beyond TV\tuner

Extract and edit the .reg file. Here is what mine looks like:
-----------------------------------------------------------------------
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\snapstream media\EXETunerPlugin]
"Executable"="C:\\Winlirc\\channel.cmd"
"Arguments"="%CHANNEL%"
----------------------------------------------------------------------
Save the .reg file and run it.

Follow the rest of the BTV setup wizard instructions in the readme.txt that comes in the ssexetuner_0.1.zip file. You might have to restart your PC for the registy change to take effect, or you might just have to restart BTV, or you might not have to restart anything. Do whatever works.

That's it. It works for me, but your mileage may vary.


Isn't their an easier way to set this thing up? also i am not really sure how your setup handles multiple cable boxes with the serial IR blaster. Can you please explain? Maybe some screen shots of your setup procedures.

Greg
__________________
Core 2 Duo E6300 | 2GB DDR2 | 3x500GB SATA2 in RAID 5 array | 2x250GB SATA2 HDD (OS HDD's) | 1x PVR-250 | 1x PVR-USB2 | PVR-150 | HVR-1600 /w QAM | Geforce 6600 | PureVideo Decoder | BTV 4.8.1

BTV Link 1: Hiper Group HMC-1x53x Slimline Media Case | Celeron 2.66Ghz | 1GB DDR2 | FX5700LE | XP Pro | PureVideo Decoder
BTV Link 2: AMD 2.0Ghz | 768MB DDR | FX5500 | XP Pro | Firefly Remote

Door 2 Door Tech Solutions

As of 3/27/2008
Reply With Quote
  #4 (permalink)  
Old 02-15-2008, 08:39 PM
Registered User
 
Join Date: Mar 2004
Location: Livermore, CA
Posts: 390
Send a message via AIM to Greg Caulder
Re: BTV and WinLIRC

Can someone help me out here on this?

I have several ideas on how to make this extremely simple, and I have plans for Snapstream to integrate this directly into BTV.


Greg Caulder
__________________
Core 2 Duo E6300 | 2GB DDR2 | 3x500GB SATA2 in RAID 5 array | 2x250GB SATA2 HDD (OS HDD's) | 1x PVR-250 | 1x PVR-USB2 | PVR-150 | HVR-1600 /w QAM | Geforce 6600 | PureVideo Decoder | BTV 4.8.1

BTV Link 1: Hiper Group HMC-1x53x Slimline Media Case | Celeron 2.66Ghz | 1GB DDR2 | FX5700LE | XP Pro | PureVideo Decoder
BTV Link 2: AMD 2.0Ghz | 768MB DDR | FX5500 | XP Pro | Firefly Remote

Door 2 Door Tech Solutions

As of 3/27/2008
Reply With Quote
  #5 (permalink)  
Old 03-01-2008, 11:54 AM
Registered User
 
Join Date: Sep 2006
Posts: 5
Re: BTV and WinLIRC

Quote:
Originally Posted by Greg Caulder View Post
Isn't their an easier way to set this thing up? also i am not really sure how your setup handles multiple cable boxes with the serial IR blaster. Can you please explain? Maybe some screen shots of your setup procedures.

Greg
Greg,

Sorry for not responding sooner. My HTPC project has been on a shelf since September 2006 when the wife kicked me off the dining room table.

If you can figure out an easier way to set this thing up, please post it in this forum.

I had a two-headed LIRC blaster. I had one head on the satellite receiver and one head on the cable receiver. I had two sections of channel codes in the WinLIRC ini file, one for the AFN remote and one for the NTL remote. Note that in the channel.cmd script the first argument in the transmit command in the :AFN section is "AFN". That controls the satellite receiver. The NTL commands control the NTL receiver. There were three channels that had the same channel number in each lineup - 5, 6 and 10. Channels 16, 17 and 18 were not used in either lineup. It's been a while since I did this, so I don't remember if I manipulated the XMLTV files to make NTL channels 5, 6 and 10 to be 17, 18 and 16, respectively, or if I did it by mapping the BTV channels some other way. The series of "IF" statements cause the cmd file to send AFN commands for AFN channels and NTL commands for NTL channels (translating 5, 6 and 10 as stated previously). Each of my receivers ignores the other's commands. If you have several cable or satellite receivers of the same make/model from the same provider, I don't know how you would segregate them. I think I read one time somewhere that one US satellite provider (don't remember if it is DISH or DIRECTTV) has a way that you can make each receiver use a different command set, up to four, I believe. I once found a post for using two sets of LIRC hardware on one PC using two com ports, but that was under MythTV (Linux). If you are using Windows and multiple receivers from one provider, I don't have any suggestions.

PM me again if I didn't answer all your questions. Since I put the HTPC aside the only related activity I have spent any time on is XMLTV. If you need to create or manipulate an XMLTV file to work with your EPG, I can probably figure out how to do it.

Mark
Reply With Quote
Reply

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
BTV and WinLIRC Lachlan Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 0 10-28-2006 11:33 AM
WinLIRC server Spektre Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 3 09-18-2006 12:54 PM
Using WinLIRC with BTV Spektre Development Discussion 0 12-15-2004 09:16 AM
Help w/ BTV, Girder and WinLirc IR transmitter? Markintosh Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 5 07-26-2004 03:18 PM


All times are GMT -6. The time now is 08:19 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
©2004-2009 Snapstream Media