Subject:
|
Re: frame RCX reply how
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Sat, 1 Feb 2003 19:43:57 GMT
|
Viewed:
|
4943 times
|
| |
 | |
Concerning the parsing of LEGO packets, I've found these bits to
be useful in coming up with a parsing algorithm:
* Packets start with 0x55
* Individual bytes of a packet are sent with little or no delay in between
bytes
* Packets may or may not have a delay between them, but if they
do then this is a good place to start looking for a start packet byte
(0x55).
(IIRC, the remote sends a continuous byte stream consisting of packets
back
to back).
* When transmitting a packet you're likely to get an echo of the transmitted
bytes on the receiver. These may not match the original if there is IR
interference. (BrickOS actually uses this mechanisim to detect packet
collisions when multiple RCX/towers are transmitting at once).
* Spurious data bytes are sometimes seen at the beginning and end
of packets. The checksum and packet byte sequence can often be used
to determine end of packet.
I'm probably forgetting something...
HTH,
Mark
|
|
Message is in Reply To:
 | | Re: frame RCX reply how
|
| (...) can be (...) This is the PBAliveOrNot (or ping) packet type. It has the side- effect of reinitializing the toggle bit used to determine repeat packets. Do you have the Minsdstorms SDK? It covers all the standard LEGO packet types in detail: (...) (22 years ago, 1-Feb-03, to lugnet.robotics.rcx)
|
16 Messages in This Thread:         
     
      
    
        
     
  
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|