LinHES Forums

serial cable to control a box under R5.5
Page 1 of 1

Author:  graysky [ Fri Jul 25, 2008 1:16 pm ]
Post subject:  serial cable to control a box under R5.5

Anyone successfully using a serial cable to control channel changing on an R5.5 system and a digital cable box? I found this page that kind of outlines the process. There is also a very old wiki page here. Also the following that I can't get to work in the url equals syntax: ... p_Box_(STB)_via_USB_or_Serial

As I understand it, /usr/local/bin/change_channel will allow me to change channels on my digital box (I believe they'll be giving me a DCT-2000 series, either a 22xx or 25xx) via a serial cable.

To test the connection (change to channel 12 for example) is the syntax simply:
$ /usr/local/bin/change_channel 12
? Some of the content in that 2nd link is over my head (wrapper script for example) where there is a discussion about ports (/dev/ttyS0 vs. /dev/ttyS1 etc.?)

Thanks for info as always :)

Author:  s1148625 [ Tue Jun 16, 2009 8:23 pm ]
Post subject: 

Graysky, were you ever able to figure this out?

I've not been able to find a recent post detailing the setup, and I just got a DCT-2000. I have a serial cable on the way, so when it arrives, I'd like to have a procedure identified for getting it linked with my Myth box.

[EDIT] I'm running R5.5 currently.

Author:  christ [ Tue Jun 16, 2009 8:28 pm ]
Post subject: 

What kind of serial cable do you mean? There is all kinds of support for ieee1394 (aka. firewire). I'm not familiar with DCT-2000 but most ieee1394 commands are common between STBs.


Author:  s1148625 [ Wed Jun 17, 2009 9:43 am ]
Post subject: 

DCT-2000 doesn't have firewire, unfortunately.

Author:  christ [ Wed Jun 17, 2009 6:44 pm ]
Post subject: 

ok. what does it have? maybe someone can help you if they know what kind of serial device you are talking about. It's not ieee1394; is it USB? RS-232? something else. These are the more popular serial devices but I am not familiar with what a DCT-2000 has specifically.

Author:  s1148625 [ Thu Jun 18, 2009 12:13 am ]
Post subject: 

It's just a standard 9-pin serial interface. The setup was detailed on the Wiki here:

but since KnoppMyth V5A15 is the most recent build noted, I imagine I can't use these steps verbatim to get things working in R5.5. Almost all of the instructions I've found for setting up this box via serial cable are from 2005 or earlier... that's why I was checking to see if graysky had been able to get his configured on R5.5.

Author:  christ [ Fri Jun 19, 2009 6:31 am ]
Post subject: 

I don't think it will work as is in that How-to but I do note that this program for the dct-2000 still exists in the 0.21-fixes contribs at You should just be able to get that source and directory for 0.21-fixes and recompile essentially as in the how-to.

You may have to play with a few things to get it working but I see no obvious reason why it wouldn't work.

I'm traveling starting today so will only be popping in from time to time but wanted to get you started.

Author:  sparks [ Tue Jul 21, 2009 5:52 pm ]
Post subject: 

I know this topic has been inactive for a month but I just came across it. I have been using RS232 to control my comcast cable boxes for probably 4 or 5 years (I'm guessing). And I haven't recompiled since I first used them (I have two versions, one for each box). I just kept moving them forward when I upgraded. Now, I'm still using R5F27 but I don't think there shouldn't be any reason why it won't work with R5.5. I would think, worst case, would be one would have to compile using that system. One of the things I do remember is that, when compiling, having to change the serial port designation in the source, channel.c. One version uses /dev/ttyS0 and the other /dev/USB0 (I use a USB-Serial adapter). Hence, two versions. After compiling, the only interaction the program has with MythTV is the passing of the parameter (the new channel). And that is done indirectly because of the shell wrapper script. Make sure the program talks to the correct serial port (via channel.c) and that nothing else is using that port, like a serial mouse via xorg.conf (or whatever it's called these days). Not having seen anything specific about why it doesn't work, this response is pretty general.


Author:  s1148625 [ Tue Jul 21, 2009 7:09 pm ]
Post subject: 

I was never able to find any instructions that were complete enough for me to get the serial control working in 5.5... I ended up just getting an irblaster, which works fine.

Author:  tao [ Sat Aug 08, 2009 4:38 pm ]
Post subject:  Serial control in R5.5

I upgraded to R5.5 a couple months ago - and (IIRC) I had to copy the channel program from my old installation to the R5.5 install. I worked fine for me though.

Author:  cliffsjunk [ Sat Aug 08, 2009 4:58 pm ]
Post subject: 

Several things I can think of to consider:
- either make sure there is not a difference in ground potentials (voltage difference between grounds) between the STB and the PC or use an optical isolater circuit.
- I think you will have to use a separate serial port from your LIRC receiver. LIRC probably uses ttyS0. This cable will probably use ttyS1.
- you still need LIRC to read IR from your remote, but you will not be sending via lirc. you will just send some simple commands out with something like (some really wild guesses):
echo $1 >/dev/ttyS1

and that may be all you need in your new channel_change script, but you need to read the programmer's manual for the STB and see exactly what it may need besides the channel number.
- You need to set the baud rate of this serial port. look into the setserial program.
- the serial cable needs to be crossed (null mdem cable), not straight thru. Each transmit signal goes to the receive on the other side, but there are other wires that need to cross too.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group