This transform allows the user to test the Pairing and Unpairing functionality of the Bluetooth device. To Pair with the Remote device the Local device and Remote device should be in discoverable and connectable mode. To test the Pair Unpair functionality, use the PairUnpair Transform in MxTransIt. In the PairUnpair Transform properties, specify the Bluetooth address of the Remote device.
Prerequisite
To use this Transform, the BlueSoleil Application should be installed. The BlueSoleil service must be running prior to creating and starting a Bluetooth project. Activating BlueSoleil can be done simply by plugging in the Bluetooth USB Network Adapter (dongle).
Create the Bluetooth Transform PairUnpair Connector using MxTransIt
1.Create an MxVDev project for Bluetooth PairUnpair testing.
2.If necessary, select Simulation->Edit Harness from the MxVDev main menu to open MxTransIt.
3.Add the Bluetooth Transform PairUnpair Transform to the Harness by double-clicking or by dragging from the Toolbox.
4.Select the Transform to display its properties as shown below.
5.Enter the Bluetooth MAC address of the Remote device.
6.Select the Bluetooth Device Class from the drop-down box field.
7.Change the BTDevice name by editing the “FriendlyName“ field.
8.Change the PassKey by editing the “PassKey“ field.
1.Right click on the Transform, select Transform->Export Ports
2.Select the required ports from the list of available ports
3.Click OK to export all selected ports to MxVDev.
4.Click to save the harness.
Ports
Inport |
|
This is a message Signal used to send the Pair or Unpair command to the remote device. In MxVDev, double-click on the Signal to display this dialog and create a transition. ![]() Pair/Unpair Device Transition Editor |
|
Outports |
|
PairState |
This is a discrete Signal which gives the present pairing status of the Remote device with Local device. The Enum values of the PairState Signal are •Paired •Unpaired |
PairResponse |
This is a message Signal which shows the PairUnpair response. |
The remote device should have the Bluetooth module.
Testing Operation
1.Create an MxV Project.
2.Create Scenario and TestCase.
3.Add the Pair/Unpair Device, PairState, and PairResponse Signals to the TestCase using Pick Signals.
4.Pair with the Remote device by sending the Pair command. Use the Pair/Unpair Device Transition Editor to create a message transition.
The Pair status is displayed by the PairState and PairResponse response Signals as shown below. You can also observe the pairing notification and pairing symbol in the Bluesoleil window of the local PC.
Test Case showing pairing at 2 seconds