I just bought a product W800RF32A, and I will receive it on January 10th 2007
I would like to write my program today !
Does anyone can give me a source code(VB6, Visual Studio, or other VB) to read a COM on serial port and can to sort a data from serial port for X10 House code and Unit code?
Also does anyone can give me a data sample that comes from serial port ?
Marineau,
Get the protocol for the CM17A Firecracker device, which is less confusing than the info from WGL.
http://software.x10.com/pub/manuals/cm17a_protocol.txtThis document describes 2 bytes of data for each standard X10 RF command.
The W800RF32A sends groups of 4 bytes of data to the serial port. For standard X10 RF, the 1st and 3rd of these are the same 2 bytes as for the CM17A. The 2nd byte is the complement of the 1st and the 4th is the complement of the 3rd. As David Mark points out, the 4 bytes for RF from Ninja controllers or from X10 Security RF devices are different, but you can start with the standard X10 and extend your code later.
Examples:
B1 On: 0x70 0x8F 0x00 0xFF
B1 Off: 0x70 0x8F 0x20 0xDF
B9 On: 0x74 0x8B 0x00 0xFF
B9 Off: 0x74 0x8B 0x20 0xDF
Since there's no separator between each group of 4 bytes, you have to take measures to stay in sync. E.g., if you haven't read a byte in some appropriate period of time, you know that you're waiting for the 1st byte of a transmission. The W800RF32A seems to be fairly reliable in always sending complete groups of 4 bytes, however as David Mark also points out, the bytes may be noise or be corrupted.