Hello experts,
I'm currently trying to make program that sends commands to my home security system. I have it connected to my computer trough the COM port, this feature allow me to control my system by sending hex ASCII codes.
I hope that someone could help me make a function that converts the command numbers into hex ASCII codes, calculates the checksum and adds the end of packet codes.
Here is an example of a complete command:
One of the commands I want to send is: “6543”.
The ASCII codes for this would be: 36 35 34 33
The Checksum = 36+35+34+33 = D2
D = 44 (ASCII)
2 = 32 (ASCII)
“0D” and “0A” needs to be added at the end of the transmission (End of Packet).
The complete transmission need to be in a continuous string. In this example the finalized string would be: 3635343344320D0A.
Thanks,
Salomon