|
Regarding the IR protocol, I have elsewhere suggested the following simple
low-level format:
1 start, 1 stop, 2400 baud, odd parity
55 f0 f0 L ~L D1 ~D1 .. Dn ~Dn C ~C
L is number of data bytes, valid range 1..255, less depending on buffer sizes
Dx are data bytes, 1..n, n=L
C is checksum byte, sum (x=1..n) Dx
This format was chosen because it is simple and extensible; you are
supposed to build another protocol (e.g. the LNP) on top of it.
The 55 f0 f0 header was chosen because (unlike the original 55 ff 00), it
cannot appear in any part of a valid message except at the start. Also, it
is different from 55 ff 00, so an RCX running the standard firmware will
not get confused as often. The disadvantage of a new header is that
you need to modify existing software (e.g. send.c) to talk to the RCX with
the new format.
L was chosen to be a single byte because most messages are likely to be
smaller than 256 bytes and because large transmissions should probably be
split anyways - a 255 byte message takes about 2.4 seconds to transmit at
2400 baud. Also, larger messages require larger buffers inside the RCX.
A different implementation might choose to use the original 55 ff 00 header
instead. Even with the 55 ff 00 header, it would be difficult to confuse
the standard RCX firmware, since (for the most part) you'd need a checksum
error to do this. Note that messages with lengths 1-5 would not need a
checksum error, but since 1-5 are not valid firmware opcodes, these
messages would be ignored and would not confuse anybody.
I have implemented code to support this format for an unreleased version of
Librcx, and am of course willing to share source code. I am hoping that
other people will either use this format or point out its deficiencies so
the format can be fixed.
-Kekoa
|
|
Message has 1 Reply:
Message is in Reply To:
15 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|