[mythtv-users] DCT2000 Serial Control

Lonny Selinger lonny at bangtherockstogether.net
Wed Jul 23 10:12:47 EDT 2003


> I'm under the impression that this implementation has nothing to do
> with lirc. I don't think you need it for controlling the DCT2000 via a
> serial connection.

Thats a safe assumption after looking through the code more :\  I need
more sleep (but thank you for pointing it out) :)

> The crcgen module is the crcgen.py file that you copied to
> /usr/local/bin. Apparently your python isn't searching there for
> includes. I'm not a Python expert, so I don't know where you should
> put a module for it to be included, or how to modify the include path,
> but I'm pretty sure that's what your problem is.

I loaded python from the command line in verbose mode and saw where it
was loading other modules from, did an 'import crcgen' with crcgen.py
in my current directory, and copied the newly created crcgen.pyc and
crcgen.py to that directory (I know nothing about python but at least
some things are similar to other interpreted languages)

This seems to have cleared that up (for anyone else who might run into
the same issue ... BTW the dir I copied them to was:
/usr/lib/python2.2/

> As for commenting it out, I'm under the impression that the control
> code can't work without it, since the DCT2000 control codes appear to
> contain a CRC checksum.

All better now and not commented out.

>> It seems like for some reason the supplied serial port isn't getting
>> passed to serialposix.py. Here's line 111 in remote.py:
>> serCon = serial.Serial('/dev/ttyS0',baudrate=9600,
>> bytesize=serial.EIGHTBITS,  parity=serial.PARITY_NONE,
>>     stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=1,rtscts=0,)
>
> Not sure on this one. You may want to try setting xonxoff=0 instead of
> 1, there was a post mentioning that earlier. Also, if you have lirc
> running, make sure it's not using the port that the channel changing
> script it trying to use (though I think that would be something other
> than an "Input/output error")

Well I did some more looking in the script (remote.py) and found that
*part* of the issue was when I copied the script, it put a CR mid
line, so I joined the line and changed xonxoff to '0' ... I still get
the same  error but now it prints the serCon to one line  :\

Thanks for all the suggestions so far :) ... I'll continue to hammer
away!!

--
Lonny


More information about the mythtv-users mailing list