Your Universal Remote Control Center
RemoteCentral.com
Discrete Code Hunter Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 43 made on Sunday June 14, 2015 at 12:58
beto
Lurking Member
Joined:
Posts:
June 2015
1
Hi,

I was getting ready to post here with a checksum problem, but in the process of documenting the problem for the forum, I solved it.  I'm still going to post this, as the step by step might help someone else.

I am working with a fujitsu heat pump, and programming in C to send codes to my heat pumps over my network (network connected IR transmitter in each room with a heat pump).

I have been able to capture valid 16 byte commands, and reproduce them. The problem is that I would like to calculate the commands, rather than record every single possible command.

For whatever reason, my bits are reversed from the .pdf in the previous posts (my 1 is a 0 and my 0 is a 1).

Here is a code that works (Cool, Fan High, Swing, 18C):

11010111
00111001
11111111
11110111
11110111
10000000
01101111
11110011
01111011
01111111
01110111
11111111
11111111
11111111
11111011
01000001

And another (Cool, fan high, swing, 20C):

byte#   bin            dec      1=0/0=1     dec          byte reversed
01)     11010111 - 215  - 00101000  -  040
02)     00111001 - 057  - 11000110  -  198
03)     11111111 - 255  - 00000000  -  000
04)     11110111 - 247  - 00001000  -  008
05)     11110111 - 247  - 00001000  -  008
06)     10000000 - 128  - 01111111  -  127
07)     01101111 - 111  - 10010000  -  144
08)     11110011 - 243  - 00001100  -  012  - 00110000  - 48
09)     01111101 - 125  - 10000010  -  130  - 01000001  - 65
10)     01111111 - 127  - 10000000  -  128  - 00000001  - 1
11)     01110111 - 119  - 10001000  -  136  - 00010001  - 17
12)     11111111 - 255  - 00000000  -  000  - 00000000  - 0
13)     11111111 - 255  - 00000000  -  000  - 00000000  - 0
14)     11111111 - 255  - 00000000  -  000  - 00000000  - 0
15)     11111011 - 251  - 00000100  -  004  - 00100000  - 32
16)     01000101 - 069  - 10111010  -  186  - 01011101  - 93

Sum 12 + 130 + 128 + 136 + 4   =  154 (throwing away one overflow)
This sum is not close to 069, 186, or 93.

Sum 48+65+1+17+32 = 163 (256 - 163 = 93!!) Eureka!

Well, there you have another documented calculation of checksum.  I hope it helps someone else.


Hosting Services by ipHouse