Author Topic: CM11: Bad checksum received  (Read 3048 times)

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
CM11: Bad checksum received
« on: January 30, 2008, 05:58:57 pm »
Hi,

I noticed that the bug with CM11 interface and X10 Motion Sensor exists since February, 2006 (http://forum.linuxmce.org/index.php?topic=642.0). The problem is related with checksum for sent command and received event. Recently I setup CM11 on my LMCE 0704 installation and I faced with the same problem. After adding motion detector MS13E the CM11 interface stopped work. In the log I can see following messages:

Code: [Select]
10      10/25/07 22:31:24.148           Sending address with HouseCode=6, DeviceCode=6. <0xb6960b90>
10      10/25/07 22:31:24.148           Sending packet with HighByte=4, LowByte=66. <0xb6960b90>
10      10/25/07 22:31:24.148           Sending header with Checksum: 6a. <0xb6960b90>
10      10/25/07 22:31:26.056           Got response: 5a from CM11A. <0xb6960b90>
01      10/25/07 22:31:26.056           Bad checksum received (send:6a, recieved:5a). <0xb6960b90>
01      10/25/07 22:31:26.160           Failed sending address. <0xb6960b90>

The same result I got with Beta 3. So, I just wondering if that bug is gonna be fixed or it'll stay like that forever?
« Last Edit: January 30, 2008, 06:01:41 pm by nite_man »
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

kir

  • Guru
  • ****
  • Posts: 183
    • View Profile
Re: CM11: Bad checksum received
« Reply #1 on: January 30, 2008, 06:19:52 pm »
The same result I got with Beta 3. So, I just wondering if that bug is gonna be fixed or it'll stay like that forever?

I am not an X10 expert, so my question may sound stupid.. how it should work? :) I mean, if the X10 is received instead of checksum, how the CM11A can distinct between event and checksum?

Btw, sources to CM11A are available here: http://svn.linuxmce.com/pluto/trunk/src/CM11A

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: CM11: Bad checksum received
« Reply #2 on: January 30, 2008, 09:15:56 pm »
I'm also not a big X10 specialist. So, I cannot answer on your question. In fact, CM11 LMCE interface works fine with devices which don't generate events I guess. Maybe CM11 receives checksum after events but should do it before.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

nosilla99

  • Veteran
  • ***
  • Posts: 120
    • View Profile
Re: CM11: Bad checksum received
« Reply #3 on: January 30, 2008, 10:25:53 pm »
The code should be simple to fix, I looked at this when it was first raised in pluto.

When 5a is received it signals that event data is waiting in the incomming buffer.  A solution would be to make two modifications.  The first is to poll the CM11A on a regular basis and check for the byte 5a, if found then call a receive event and pass the results to dcerouter.  The second modification is to modify the send routine to also call the receive event routine if the checksum fails and the returned checksum is 5a.

If I get a development environment setup on LMCE then I will see what I can do as the modifications should not take too much effort.

NOS