[mythtv-users] DCT2000 Serial Control

Chip Marshall chip at chocobo.cx
Wed Jul 23 11:30:53 EDT 2003


On July 23, 2003, Lonny Selinger sent me the following:
> So following the directions and suggestions for getting the serial
> connection on a DCT2000 working I've managed to come to a block. I
> compiled, configured, and installed lirc from CVS using the serial
> option (home-brew) and grabbed Ian's scripts. So far this is what I'm
> getting.

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.

> I copied the remote.py and crcgen.py to /usr/local/bin (changed
> /dev/ttyS1 to /dev/ttyS0) and tried to execute the changechannel
> script ... this is what I got:
> 
> # ./changechannel.sh 3
> Traceback (most recent call last):
>   File "/usr/local/bin/remote.py", line 13, in ?
>     import crcgen               # CRC generator - preset to generate
> CCITT polynomial crc's
> ImportError: No module named crcgen
> 
> I searched google for a while trying to find a crcgen module for
> python and came up with nothing (not sure if they have a repository
> for modules but I'm guessing they do and I just couldn't find it).
> Anyway, just for the sake of debugging and to see if anything would
> happen, I commented out the crcgen line and tried again:

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.

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.
 
> File "/usr/local/bin/remote.py", line 111, in ?
>     stopbits=serial.STOPBITS_ONE, timeout=1, xonxoff=1,rtscts=0,)
>   File "/usr/lib/python2.2/site-packages/serial/serialposix.py", line
> 161, in __init__
>     raise serialutil.SerialException, "could not open port: %s" % msg
> serial.serialutil.SerialException: could not open port: (5,
> 'Input/output error')
> 
> 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")

-- 
Chip Marshall <chip at chocobo.cx>           http://www.chocobo.cx/chip/
GCM/CS d+(-) s+:++ a22>? C++ UB++++$ P+++$ L- E--- W++ N@ o K- w O M+
V-- PS+ PE Y+ PGP++ t+@ R@ tv@ b++@ DI++++ D+(-) G++ e>++ h>++ r-- y?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
Url : http://lists.snowman.net/pipermail/mythtv-users/attachments/20030723/4ed169fc/attachment.bin


More information about the mythtv-users mailing list