[PLUG] Setting serial parameters

Richard C. Steffens rsteff at comcast.net
Sat Apr 26 22:00:26 UTC 2008


Denis Heidtmann wrote:

> The program I am using is x10 (lower case). 

Now that I pay attention when I look at it, the program I use is also
spelled in lower case.

> It is written by Aaron Hightower. 

Mine is a revision by Paul Fox of a program by Larry Campbell.

> You will note that I mentioned running x10 -t, the self-test option. 

Mine doesn't have that as an option. It has a similar one:

rsteff at Moonguide:~> x10 -h
Command error: Invalid command name
Usage:
<...>
x10 diagnostic              run interface self-test diagnostics
<...>

All of the options for my version start with x10, and are followed by a
word or words, but no dash.

> I have 
> been assuming that setting up the serial is the problem.  I do not think that 
> the x10 program is the problem.  It ran last year and the year before, after 
> finding the correct serial port.  If I have the wrong serial port, it tells me 
> it cannot communicate with the CP-290.

Do you have the source code? Perhaps you could search it for what it
wants in the way of a serial port. I'm not a C programmer, but I can
sort of follow what's going on when I read the file that has the code to
access the serial port.

> I am interested in your mention of a configuration file.  I assume that is for 
> compiling, not for running?

Yes. I run my with CRONTAB entries.

My file, x10config, contains the following:
---------------------------------------------------------------------------
#
# this file should contain x10 appliance aliases, one per line, as:
#   appliance-name  housecode  modulenumber
# for example:
#  mydesklamp	A	4
#  atticfan	B	3
#
# In addition, the devicename for the line the Powerhouse is attached to may
# be specified with:
#  TTY	/dev/tty00
# and the default housecode with:
#  HOUSECODE	A
# this is only used by the switches on the unit itself, and units
#  specified by number only on the command line.
#
LR-AcornLts	K 1
BR-GentsChest	K 3
LR-TableLmp	K 7
BR-PictureLmp	K 8
#
#
# Oregon City:
LATITUDE	45:34
LONGITUDE	-122.57
#
# set default housecode -- the one the switches will use
HOUSECODE	K
TTY		/dev/ttyX10
#TTY		annex:7002
---------------------------------------------------------------------------

If I ever re-compile it I'll just use /dev/ttyS0 for TTY. I have to
re-create a sym link after every boot to get it to work. I finally
figured out how to do that with an entry in /etc/init.d/boot.local

# create a symlink for the X10 program
ln -s /dev/ttyS0 /dev/ttyX10

I suspect that is not particularly relevant to your program, but maybe
it will trigger a thought.

-- 
Regards,

Dick Steffens




More information about the PLUG mailing list