From: Pilfos <pi...@gm...> - 2007-03-16 22:41:22
|
Hello, I'm starting to study MisterHouse "architecture", and before going deep I would like to know If it will be easy to develop a new serial protocol. I have a "custom" hardware, IHC from Denmark. This hardware has it's own protocol that works with RS485, but I could communicate with a RS232/RS485 converter. Basically, I can send & receive hex numbers in ascii. For example, each message that I send or receive, start with 0x02. Each message ends with 0x17. After the 0x17 always a CRC appears, that is the sum of all the numbers of the message. For example, to get the status of all the outputs of the system: a) IHC is sending this commmand: 02 1C 30 17 65 ( The system is ready) b) After that, the PC sends: 02 12 82 17 AD (ask for Getting the output status, lights) c) IHC answers: 02 1C 83 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 B9 (Return the outputs on) There is 1 light ON. There are commands to switch ON & switch OFF outputs, requests the inputs (buttons pressed). As you can see the protocol is easy to understand. Is there any source code with sending & receiving ascii through serial, with events, which I could modify easily under Misterhouse? Thanks in advance! -- View this message in context: http://www.nabble.com/Programming-a-new-serial-protocol-tf3417211.html#a9523779 Sent from the Misterhouse - User mailing list archive at Nabble.com. |