Pairing Gaming Hub¶
Description¶
The Pairing Gaming Hub application is used to showcase a Point-to-Multipoint (PMP) pairing procedure.
Four devices are present in this application. The Dongle device acts as a Coordinator while the Mouse, Keyboard and Headset devices act as the Nodes.
When the application starts, the devices are all in an unpaired state. The user must manually pair the Nodes with the Coordinator one after the other.
The schedule is already known by all devices but they cannot communicate with each other as long as they are not paired.
Since no filesystem is present in the SDK, rebooting a Node device put it in an unpaired state. Furthermore, the whole Pairing Procedure needs to be done again when rebooting the Coordinator device since it has the Paired Device List with all of the Nodes’ address.
During a pairing process, the normal network functionality will not be functional. This is because a different schedule is applied during the pairing process. For example, if the Dongle and the Headset are already paired and streaming audio, the audio stream will be interrupted when pairing the Mouse or Keyboard devices.
Figure 2: Pairing Gaming Hub Diagram¶
See Pairing Module for more information on the Pairing Procedure.
Behavior¶
Dongle Device¶
The Dongle device acts as the Coordinator of the network. It keeps an inventory of Nodes inside its network with the Paired Device list.
To start a Pairing Procedure, the user must press the SW1 button on the Dongle and the SW1 on another Node device. On the Dongle, SW2 button is used to unpair all devices from it. The user must manually unpair the Node devices to start a new pairing process.
The Dongle records audio from its Line-In connector and sends an audio stereo stream of 42 samples @ 48 kHz/16 bits to the Headset device. Once paired with the Headset device, the Dongle device keeps tracks of the connection by toggling LED0 each time a frame is sent and acknowledged.
Since the Coordinator does not send any payload to the Mouse and Keyboard devices, a Beacon signal is used to keep the connections synchronized.
The Dongle receives Mouse Press events from the Mouse device and toggles LED1.
The Dongle receives Keyboard Press events from the Keyboard device and toggles LED0.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Unpair All Devices |
Clear the Paired Device list to unpair all devices. |
SW2 |
Pair Device |
Start the Pairing Procedure with another device. |
LED0 |
Keyboard Press |
Toggle LED when receiving a Keyboard Press event from the Keyboard device. |
LED1 |
Mouse Press |
Toggle LED when receiving a Mouse Press event from the Mouse device. |
LED2 |
Headset TX ACK |
Toggle LED when receiving an acknowledgment from the Headset device. |
Headset Device¶
The paired Headset device receives an audio stereo stream of 40 samples @ 48 kHz/16 bits from the Dongle and plays it on the Headphone connector.
The Headset device keeps tracks of the connection by toggling LED0 each time a frame is sent and acknowledged.
Both the SW1 and SW2 button are used to pair the Headset device. Once paired, pressing them again will unpair the device.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Pair/Unpair Device |
Start the Pairing Procedure when unpaired or unpair the device if paired. |
SW2 |
Pair/Unpair Device |
Start the Pairing Procedure when unpaired or unpair the device if paired. |
LED0 |
N/A |
N/A |
LED1 |
N/A |
N/A |
LED2 |
Dongle RX Frame |
Toggle LED when receiving a frame from the Dongle device. |
Mouse Device¶
The Paired Mouse device simulates a Mouse Button Press event and sends it to the Dongle device. It also periodically receives a Beacon signal from the Dongle to stay synchronized.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Mouse Button Press |
Send a Mouse Button Press event to the Dongle device. |
SW2 |
Pair/Unpair Device |
Start the Pairing Procedure when unpaired or unpair the device if paired. |
LED0 |
N/A |
N/A |
LED1 |
N/A |
N/A |
LED2 |
N/A |
N/A |
Keyboard Device¶
The Paired Keyboard device simulates a Keyboard Key Press event and sends it to the Dongle device. It also periodically receives a Beacon signal from the Dongle to stay synchronized.
Interface |
Name |
Description |
|---|---|---|
SW1 |
Keyboard Key Press |
Send a Keyboard Key Press event to the Dongle device. |
SW2 |
Pair/Unpair Device |
Start the Pairing Procedure when unpaired or unpair the device if paired. |
LED0 |
N/A |
N/A |
LED1 |
N/A |
N/A |
LED2 |
N/A |
N/A |
Pairing LED Pattern¶
- LED patterns are used to notify the user about pairing status.
LED0 blinking twice means that the device has started the Pairing Process.
Left-to-right LED pattern means that the Pairing Procedure was successful.
All LEDs blinking twice means that the Pairing Procedure failed
All LEDs Blink twice when the user manually unpairs the device.
Configuration¶
Gaming Hub Schedule¶
The Gaming Hub Schedule is made up of 17 timeslots which totals 4.2 ms. Every timeslot is 250 us long except the Beacon Signal which is 200 us long.
The first timeslot is dedicated to the Beacon Signal.
After the Beacon Signal, there are three Headset timeslots followed by a Mouse timeslot.
Then there are three more Headset timeslots followed by a Keyboard timeslot.
This last two patterns are repeated once again and the schedule loops back at the beginning of the sequence.
Here is a simplified view of the Gaming Hub Schedule:
Figure 3: Pairing Gaming Hub Schedule¶