Please login or register.

Login with username, password and session length
Advanced search  

News:

The X10Hub (PiX10Hub) is here! Created by the Community, for the Community.:)% #:)

Author Topic: W800RF32A (Source code and sample request)  (Read 14327 times)

marineau

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 162
W800RF32A (Source code and sample request)
« on: December 24, 2006, 01:28:21 PM »

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 ?

Thanks

Logged

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 289
  • Posts: 12702
Re: W800RF32A (Source code and sample request)
« Reply #1 on: December 24, 2006, 04:14:07 PM »

Logged

marineau

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 162
Re: W800RF32A (Source code and sample request)
« Reply #2 on: December 24, 2006, 04:40:36 PM »

Thanks Brian, this will help me !     

On this document, I read this exemple:   
    A- 00004 OFF   00032: 11111001 00000110 11100011 00011100  . 

- But, a string 00032: is it include in incoming data ? 
- how define a StartBlock and FinishBlock ? 
- In others words, When a Block begin, and when a block is finished ? 
- Does each command have a same length ? 
- Is it possible that this module can receive a half (incomplete) command ?

Thanks
Logged

David Mark

  • Full Member
  • ***
  • Helpful Post Rating: -3
  • Posts: 58
    • Ohio Media Group
Re: W800RF32A (Source code and sample request)
« Reply #3 on: December 24, 2006, 08:02:03 PM »

1. Four bytes per packet (one packet = one command.)
2. You don't know when a block will begin or end, it is just a stream of bytes and it is up to your software to determine what is valid and what is not (by checking the data integrity as described in the protocol.)
3. Stream can be interrupted or corrupted with noise at any given time.
4. Camera remotes do not follow WGL's checksum scheme.

Have fun!
Logged

marineau

  • Hero Member
  • *****
  • Helpful Post Rating: 2
  • Posts: 162
Re: W800RF32A (Source code and sample request)
« Reply #4 on: December 24, 2006, 10:11:17 PM »

1. Four bytes per packet (one packet = one command.)

if anyone hold a button while 1 second on ss13a, how can i know separation of each package :

11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111
chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);chr(255);

Does exist a chr(0) between each block of 4 like this ?
chr(255);chr(255);chr(255);chr(255);chr(0);chr(255);chr(255);chr(255);chr(255);chr(0);chr(255);chr(255);chr(255);chr(255);chr(0)

Scuse me but I'm don't sure to this ?
« Last Edit: December 25, 2006, 10:02:24 AM by marineau »
Logged

David Mark

  • Full Member
  • ***
  • Helpful Post Rating: -3
  • Posts: 58
    • Ohio Media Group
Re: W800RF32A (Source code and sample request)
« Reply #5 on: December 24, 2006, 11:25:38 PM »

No there is no delimiter character between each four byte sequence.  Held buttons of any kind result in repeated commands.  As I recall, pushing a button on any X10 RF remote results in repeated commands and the transceiver does not suppress them (it is up to your software.)
Logged

Charles Sullivan

  • Hero Member
  • *****
  • Helpful Post Rating: 93
  • Posts: 1565
    • HEYU - X10 Automation for Linux, Unix, and Mac OSX
Re: W800RF32A (Source code and sample request)
« Reply #6 on: December 25, 2006, 12:43:03 AM »

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.txt
This 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.

Logged
Yesterday it worked.
Today it doesn't work.
X10 on Windows is like that.

HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

Brian H

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 289
  • Posts: 12702
Re: W800RF32A (Source code and sample request)
« Reply #7 on: December 25, 2006, 07:15:51 AM »

You may want to look here also. Near the top of the page is three things on RF protocol.
Dave Houston's gives some code samples and there is also one on the Extended Codes that may help you.
http://www.idobartana.com/hakb/index.htm
« Last Edit: October 24, 2009, 02:25:46 AM by -Bill- (of wgjohns.com) »
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.