🔌General Home Automation > Original ActiveHome

CM11 Communication, Interface ready problem 0x55

(1/1)

Ithacan:
I am trying to write a python serial driver for my CM11a.
I can read that the device wants the timer set.
I can program the interface clock.
It returns the proper checksum and no longer poles.
When I try to issue a simple command sequence
0x04, 0x66
I get the appropriate checksum returned.
When I acknowledge with 0x00, I get nothing.
I'm expecting 0x55 (ready)

I've tried with and without batteries in the CM11a.
I've tried every format that I can think of to send 0x00.
But in the end I get nothing back indicating that the device is ready.

I'm using python and pyserial for the communication. The commands below show what I'm sending to the controller.

ser.write(chr(0x04)+chr(0x66))
ser.read(1)
ser.write(chr(0x00))
ser.read(1)

Any help on this is appreciated. -Kind Regards

dhouston:
I've never used Python so am unfamiliar with its syntax but you need to be sending hex values not Ascii characters.

Ithacan:
thanks for the quick reply and the redirection to the more appropriate forum.

It is my understanding that sending the character representation of a hex value is equivalent, i.e. it sends one byte defined by the hex value. I have some confimation from this in that I program the interface clock and the checksum returned is correct. Also, the length command states that length(chr(0x00)) = 1, not 4). Printing chr(0x66), for example, puts out the character 'f'.

I'd be curious if there is a good way to verify what I sent. Are there other programs that can sniff the output or do I need to hook it up to another computer and do reads?

Thanks for people's patience with this newbie question on old x10 devices. I've put in many hours beating my head against this one. I'm sure that I'm doing something dumb.

Are there any line feeds or carriage returns needed in the output after each transmission? I am not intentionally putting any in.

dhouston:
Like I wrote, I'm not familiar with Python syntax but using chr() seems a bit confusing.

You can use a loopback plug to see what you are sending.

* http://www.ehow.com/how_7500071_wire-rs232-loopback-adapter.html

Navigation

[0] Message Index

Go to full version