Академический Документы
Профессиональный Документы
Культура Документы
Ashar Alam
Lawrence Domingo
Elliot Helms
Brian Jun
Thomas Labingi
Ben Kumar
Pablo Martinez Alanis
Rob Miller
Revision Log
Our protocol has been designed to allow all 8 G[OG]GLEs and WHA:LEs to communicate with
each other. Any G[OG]GLE and WHA:LE pair will be capable of pairing with each other. The
16-bit addresses for all 16 devices are shown in the following table.
Team G[OG]GLE XBee address WHA:LE XBee address
1 2081 2181
2 2082 2182
3 2083 2183
4 2084 2184
5 2085 2185
6 2086 2186
7 2087 2187
8 2088 2188
Summary of Commands
The protocol will be able to handle the following core communications:
● Pairing: T his is a bidirectional communication sequence that will be initiated by a
G[OG]GLE, and must be confirmed by the WHA:LE with an acknowledgment.
● Control: T his is a unidirectional communication that contains command information for
the WHA:LE. This data packet will be transmitted from the G[OG]GLE to the WHA:LE at
a frequency of 5Hz, once a successful pairing has occurred.
● Status: T his is a unidirectional communication that contains status information related to
the WHA:LE. This data packet will be transmitted from the WHA:LE to the G[OG]GLE at
a frequency of 5Hz, once a successful pairing has occurred.
● Bumper Contact: This is a broadcast that will be transmitted whenever the WHA:LE
that is “it” registers bumper contact. A method is described in which each WHA:LE that
received bumper contact within 200ms of this broadcast will respond to the “it” WHA:LE,
who will determine if “it” status is passed to another WHA:LE.
● Bumper Contact Response: This is a unidirectional communication that contains the
team number of the non-”it” WHA:LE that received a contact within 200ms of a reported
“it” WHA:LE bumper contact.
● “it” Transfer: This is a unidirectional communication that passes the “it” status from one
WHA:LE to another, following a valid bumper contact and response routine.
● Ed Carryer Commands: This is a broadcast that will be transmitted whenever the
WHA:LE that is “it” sings “Ed”, which will trigger all other WHA:LEs to respond by singing
“Carryer”. A method is described in which each WHA:LE will sing “Carryer” without
interference.
List of Headers for Commands
Command Header
0x01 Directed Message Header
(used for Control and Status)
Overview of FM Communication
In addition to the XBee communication approach, each WHA:LE will transmit audio data over a
specific FM frequency to a corresponding receiver in its paired G[OG]GLE. FM frequency
channels are specified for each team in the table below, to avoid interference between the
devices.
At the start of each game, the G[OG]GLE operator must tune their receiver to the appropriate
FM Frequency for the WHA:LE that they intend to control.
2 106.3
3 105.1
4 104.1
5 103.1
6 102.3
7 101.1
8 100.1
Pairing Protocol
A pair between a G[OG]GLE and WHA:LE is accomplished by the following sequence, at
minimum:
As stated previously, once this pairing is complete, the G[OG]GLE will send a Control packet
and the WHA:LE will send a Status packet, each at a frequency of 5Hz.
After a successful pair, if a Control packet is not received by the WHA:LE and/or a Status
packet is not received by the G[OG]GLE within 1 second, both G[OG]GLE and WHA:LE will
revert to an unpaired state.
If the team selector input on the G[OG]GLE changes from the paired WHA:LE to a new WHA:LE
at any time after a successful pair, a manual unpair will take place and both G[OG]GLE and
WHA:LE will revert to an unpaired state.
The following figures represent common state diagrams to be implemented for pairing between
each G[OG]GLE / WHA:LE.
0x33 MSB and LSB of 0x00 (to not disable See details below:
target WHA:LE ACK)
selected
Pairing Header MSB Xbee LSB Xbee MSB Xbee LSB Xbee
0x33 Address Address Address Address
G[OO]GLE G[OO]GLE WHA:LE WHA:LE
0xFF MSB and LSB of 0x00 (to not disable See details below:
G[OG]GLE that sent ACK)
request
Ack Header MSB Xbee LSB Xbee MSB Xbee LSB Xbee
0xFF Address Address Address Address
G[OO]GLE G[OO]GLE WHA:LE WHA:LE
If both source and destination headers don’t match, disregard pairing request and start again
pairing request.
Unpairing Frame Data
The following tables represent the structure of bytes to be sent at the request and acknowledge
steps of the unpairing process.
0x42 MSB and LSB of 0x00 (to not disable See details below:
target WHA:LE ACK)
selected
Control Protocol
This section describes the protocol for sending a Control packet from a G[OG]GLE to the
WHA:LE that it is paired with. In addition to the Frame ID, this packet will have three bytes. The
first byte will contain the driving information for the WHA:LE. The second byte will give the
direction information to the whale. The last bit will contain, 7 bits for special instructions (0-6)
and one bit that will be flagged in the event that the WHA:LE is “it” and commanded by the user
to sing “Ed”.
0x01 MSB and LSB of 0x00 (to not disable See details below:
target WHA:LE ACK)
selected
Data Packet Contents:
Byte 0 Byte 1 Byte 2 Byte 3
Additional details on the format of the Driving, Direction and Special Command bytes are
included below.
Driving Byte:
This byte will be a number between 0 and 255. At 127 the WHA:LE should not move. The closer
to 0, the nearer the WHA:LE should exert relative to its maximum backward control effort. The
closer to 255, the nearer the WHA:LE should exert relative to its maximum forward control effort.
Direction Byte:
This bit will be a number between 0 and 255. At 127 the WHALE should be moving straight. The
closer you get to 0 the closer your the WHALE should turn relative to its maximum left turn
control effort. The closer to 255, the nearer the WHALE should turn relative to its maximum right
turn control effort.
Special Command:
Bits 0 through 6 are left for each team to use as special commands. The 7th bit will be used to
command the WHA:LE to sing “Ed” if it is currently “it”. The process of commanding the
WHA:LE to sing “Ed” is detailed further in the following section.
7 6 5 4 3 2 1 0
**NOTE: WHA:LE to G[OG]GLE do not exchange capabilities because no team wants to add
additional functionality. We just want to check off :D
If the addressed WHA:LE is “it” and it is currently able to sing, it should do the following as
quickly as possible upon receiving this request:
1. Begin to play the “Ed” audio over its speaker
2. Broadcast the Ed Carryer Command to all other WHA:LEs
3. Set an 8 second timer, during which the “it” WHA:LE is unable to sing “Ed”
Status Protocol
This section describes the protocol for sending a Status packet from a WHA:LE to the
G[OG]GLE that it is paired with. In addition to the Frame ID, this message will have three bytes.
The first two of these bytes will contain sensing information from the WHALE. The last byte will
be left blank for use by each team as desired.
0x01 MSB and LSB of 0x00 (to not disable See details below:
target G[OG]GLE ACK)
selected
Data Packet Contents:
Byte 0 Byte 1 Byte 2 Byte 3
Additional details on the format of the Proximity and Bumper bytes are included below.
Front/Back Proximity:
The four MSBs will contain information about sensing in the front of the WHALE. The four LSBs
will contain information about sensing in the back of the WHALE. In each case, the closer the
object to the WHA:LE, the higher the value of this nybble.
Each team is strongly encouraged to implement some form of proximity sensing such that
inter-operability between teams’ WHA:LEs and G[OG]GLES is improved.
7 6 5 4 3 2 1 0
Bit 7-4 (optional):The higher the value, the closer the obstacle in front of the WHA:LE
Similarly to the above, each team is strongly encouraged to implement some form of left/right
proximity sensing. Bumper detection is similarly encouraged but not required.
7 6 5 4 3 2 1 0
Bit 3:
- 0 if front bumper not active
- 1 if front bumper active
Bit 2:
- 0 if back bumper not active
- 1 if back bumper active
Bit 2:
- 0 if left bumper not active
- 1 if left bumper active
Bit 1:
- 0 if right bumper not active
- 1 if right bumper active
7 6 5 4 3 2 1 0
"IT" UNUSED
Bit 7:
● 0 if receiving WHA:LE is not "it"
● 1 if receiving WHA:LE is "it"
Bit 6-0:
● UNUSED
Each WHA:LE satisfying this criterion sends a directed message to the WHA:LE that is “it”
informing it of the bumper contact. Among all WHA:LEs that respond in this manner, the one
with the strongest RSSI is designated to be next “it”, which is communicated by a directed
message from the formerly “it” to the newly “it” WHA:LE. At this point, the newly appointed “it”
WHA:LE must wait 8 seconds before it can begin moving (Control and Status packets must be
sent, but movement cannot be acted upon until 8 seconds have elapsed).
If no other WHA:LE responds to “it”, gameplay proceeds with the same WHA:LE denoted as “it”.
0x02 0xFFFF (Broadcast) 0x00 (to not disable See details below:
ACK)
0x03 MSB and LSB of It to 0x00 (to not disable See details below:
receive detection ACK)
Bumper Bumper
Contact Response
Response 0x01 - 0x80
Header 0x03 (see below)
umper Response:
B
The Bumper Response byte indicates whether or not the particular WHA:LE encountered a
collision when “it” detected a collision.
As stated above, the newly appointed “it” WHA:LE must implement measures to wait 8 seconds
before acting upon Control movements after newly receiving “it” status.
**Note: The lame-duck "IT" WHA:LE shall be considered "IT" until the entire "IT" transfer
message is completed.
Following receipt of this command, all WHA:LEs that are not “it” should begin a timer as soon as
possible, with a delay of X seconds, where X is their team number (1-8). This structured delay
is intended to enable targeted detection of certain teams’ WHA:LEs. At the end of 8 seconds, an
additional second (ninth second) is allocated for the beacon. Then wait another second before
“it” can start singing ED again. This makes a total of 10 sec.
Upon timeout, each WHA:LE should audibly sing “Carryer”. This sound clip should last no more
than 1 second to allow the next WHA:LE the chance to sing without interference. If fewer than
all 8 teams are playing in a game, there will be delays in this “Carryer” sing response.
All G[OG]GLEs receiving this message should silently ignore this broadcast.
The below diagram indicates the full flow of an “Ed” / “Carryer” sing, including the initial “Ed”
sing request as detailed in the Control Protocol and the “Carryer” sing response as described in
this section.
Acknowledgements
The ME218C 2019 communications committee would like to acknowledge the valuable support
of Professor Ed Carryer and Karl Gumerlock in the creation of this standard document.