Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: CM11A response  (Read 10990 times)

homevista

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 40
  • It is your home, control it your way
    • http://www.automationvista.com
CM11A response
« on: May 09, 2007, 11:04:41 PM »

Hi,

I am programming a program working with CM11A. CM11A often sends to PC byte 0xFF. I do not know what this byte means. This byte was not mentioned in the document about cm11a_protocol.

Thanks

hkactive

  • Full Member
  • ***
  • Helpful Post Rating: 1
  • Posts: 50
Re: CM11A response
« Reply #1 on: May 11, 2007, 05:51:54 PM »

Here is a quote from the CM11A_Protocol.txt

Quote
3.1.3.   Interface Ready to Receive.

Once the X-10 transmission has taken place (and this may be quite time consuming in the case of Dim or Bright commands) the interface will send 0x55 to the PC to indicate that it is in a 'ready' state. 

3.1.4.    Example.

   PC      Interface   Description
   0x04,0x66         Address A1
         0x6a      Checksum ((0x04 + 0x66)&0xff)
   0x00            OK for transmission.
         0x55      Interface ready.

   0x04,0x6e         Address A2
         0x72      Checksum ((0x04 + 0x6e)&0xff)
   0x00            OK for transmission.
         0x55      Interface ready.

   0x86,0x64         Function: A Dim 16/22*100%
         0xe0      Incorrect checksum.
   0x86,0x64         Function re-transmission
         0xea      Checksum ((0x86 + 0x64)&0xff)
   0x00            OK for transmission.
         0x55      Interface ready.

You see several mentions of 0xff here. But basically it's used in the checksum that the CM11 sends back to the PC. If you're receiving just an 0xff in the receive event, I believe that just indicates you just sent a couple pairs of 0x00 0x00: i.e 0x00 + 0x00 + 0xFF = 0xFF. Whether that is what you intended to send or not, that is what the CM11a picked up from your code.

If you are sending an ON, OFF, or some other function, then you must respond to this 0x55 by sending a notice to the CM11 that you are going to send a function header: e.g. send a &H6 followed by a couple &H0

The documentation is really vague what to do--or at the least hard to decipher--as to what to do after receiving an 0x55: but you need to respond to the 0x55 by transmitting the &H6 (I do this in VB as follows: mscomm1.output chr$(&H6) & chr$(&H0) & chr$(&H0)

After sending this to the CM11, you should receive in the receive event a response from the CM11 indicating that you sent a function header (&H6). You then need to deal with this receive event appropriately: e.g. send a command to turn the light on, off, etc. But it's your responsibility to code exactly what function you want to send at this time.

But you need to post questions about the CM11 on a different forum. This forum is for the CM15A. This question should be redirected to the Original ActiveHome forum.

Hank
« Last Edit: May 11, 2007, 06:13:47 PM by hkactive »
Logged
 

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