Pairing a device

To be able to connect and transfer data between two devices (such as the car's head unit and a smartphone), you have to go through the pairing process. Pairing necessarily involves authentication so as to ensure security when connecting.

Pairing interactions

The following diagram shows the interactions involving the HMI, the PPS interface (pps-bluetooth), and the Bluetooth Manager (io-bluetooth):

Figure 1. Typical message exchange between the HMI, pps-bluetooth, and io-bluetooth

The Bluetooth Manager listens for commands such as initiate_pairing on the /pps/services/bluetooth/control object and then publishes BTMGR_EVENT_* events to the /pps/services/bluetooth/status object.

Adding a device

When the HMI receives a request to add a device (e.g., the user taps ADD NEW DEVICE in the Bluetooth Connectivity screen under Settings in the HMI), the Bluetooth Manager will issue a BTMGR_EVENT_DEVICE_ADDED event to the pps-bluetooth service, which will publish the appropriate status information to these PPS objects:

Making devices discoverable

The set_access Bluetooth command lets you set the accessibility level of the Bluetooth system as follows:

Number value in data parameter: Meaning:
0 Devices won't be discovered or connected (IOBT_NOT_ACCESSIBLE)
1 Devices may be discovered and connected (IOBT_GENERAL_ACCESSIBLE)
2 Devices will have limited discoverability and connectability (IOBT_LIMITED_ACCESSIBLE)
3 Devices may be connected, but not discovered (IOBT_CONNECTABLE_ONLY)
4 Devices may be discovered, but not connected (IOBT_DISCOVERABLE_ONLY)

For example, the following set_access command will set the accessibility level to 1 (so devices may be discovered and connected):

echo "command::set_access\n
      data:n:1" >>