Pairing Gaming Hub

Description

The Pairing Gaming Hub application is used to showcase a point-to-multipoint Pairing Procedure using the SPARK Wireless Core.

Four devices are present in this application. The Dongle device acts as a Coordinator while the Mouse, Keyboard and Headset devices act as 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 this application example does not implement persistent storage, rebooting a Node device puts it in an unpaired state. Furthermore, the whole Pairing Procedure needs to be repeated when rebooting the Coordinator device since it has the Paired Device List with all of the Nodes’ addresses.

During a Pairing Procedure, audio and data transfers are not possible. This is because a different schedule is applied during the Pairing Procedure. For example, if the Dongle and the Headset are already paired and are streaming audio, the audio stream will be interrupted when pairing the Mouse or Keyboard devices.

Pairing Gaming Hub Diagram

Figure 21: Pairing Gaming Hub application’s system diagram.

See Pairing Module for more information on the Pairing Procedure.

Behavior

The Gaming Hub schedule is made up of 17 timeslots. The first timeslot is dedicated to the Beacon Signal and the following timeslots alternate between the Headset, Mouse and Keyboard devices.

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.

Many timeslots are used to ensure that the beacon only occurs every 4.25 ms.

Here is a simplified view of the Gaming Hub Schedule:

Pairing Gaming Hub Schedule

Figure 22: Pairing Gaming Hub application’s schedule

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 SW2 button on the Dongle and the SW2 on another Node device. On the Dongle, SW1 button is used to unpair all devices from it. The user must also manually unpair all Node devices to start a new Pairing Procedure.

The Dongle records audio from its Line-In connector and sends a 48 kHz/16 bits audio stereo stream to the Headset device. Once paired, LED0 toggles on the Dongle each time a frame is successfully sent to the Headset (almost always on because of the high packet rate).

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 Keyboard Press events from the Keyboard device and toggles LED1.

The Dongle receives Mouse Press events from the Mouse device and toggles LED2.

Table 6: Dongle Device

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

Audio transmission

Toggle LED when a wireless transmission to the Headset is successful.

LED1

Keyboard Press

LED ON when receiving a Keyboard Press status from the Keyboard device.

LED2

Mouse Press

LED ON when receiving a Mouse Press status from the Mouse device.

Headset Device

The paired Headset device receives a 48 kHz/16 bits audio stereo stream from the Dongle and plays it on the Headphone connector.

The SW2 button is used to pair the Headset device. Once paired, pressing it again will unpair the device.

Table 7: Headset Device

Interface

Name

Description

SW1

N/A

N/A

SW2

Pair/Unpair Device

Start the Pairing Procedure when unpaired or unpair the device if paired.

LED0

N/A

N/A

LED1

Reception Success

Toggle LED when a wireless reception is successful from the Dongle device.

LED2

N/A

N/A

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.

Table 8: Mouse Device

Interface

Name

Description

SW1

Mouse Button Press

Send a Mouse Button Press status 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

Button Press status.

LED ON when the Mouse Button is pressed.

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.

Table 9: Keyboard Device

Interface

Name

Description

SW1

Keyboard Button Press

Send a Keyboard Button Press status 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

Button Press status.

LED ON when the Keyboard Button is pressed.

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 Procedure.

  • Bottom-to-top 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

This application does not require specific configurations.