Please login or register.

Login with username, password and session length

Author Topic: CM11 Communication, Interface ready problem 0x55  (Read 10631 times)

Ithacan

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
CM11 Communication, Interface ready problem 0x55
« on: November 20, 2012, 10:47:20 PM »

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
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: CM11 Communication, Interface ready problem 0x55
« Reply #1 on: November 21, 2012, 05:26:47 AM »

I've never used Python so am unfamiliar with its syntax but you need to be sending hex values not Ascii characters.
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston

Ithacan

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 2
Re: CM11 Communication, Interface ready problem 0x55
« Reply #2 on: November 21, 2012, 07:26:04 AM »

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.
Logged

dhouston

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 37
  • Posts: 2547
    • davehouston.org
Re: CM11 Communication, Interface ready problem 0x55
« Reply #3 on: November 21, 2012, 09:33:52 AM »

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.
Logged
This message was composed entirely from recycled letters of the alphabet using only renewable, caffeinated energy sources.
No twees, wabbits, chimps or whales died in the process.
https://www.laser.com/dhouston
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.