Bluetooth Transforms are no longer supported.
In this profile, the Transform provides a virtual com port to communicate with the remote device. It can be used as a wireless replacement for RS232. To connect with the SPP profile, the remote device should first be paired with the local device. So to test the SPP profile, use the Pair/Unpair Transform along with the SPP Transform. In the Pair/Unpair Transform, specify the MAC address of the Remote device to connect with the SPP Profile.
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).
Creating a Harness for the Bluetooth SPP Connector using MxTransIt
1.Create an MxVDev project for Bluetooth SPP testing.
2.If necessary, select Simulation->Edit Harness from the MxVDev main menu to open MxTransIt.
3.To connect with SPP profile, the local device has to pair first. Select the Bluetooth PairUnpair Transform from the MxTransIt Toolbox.
4.Set the properties of the Bluetooth PairUnpair Transform.
5.Add the Bluetooth SPP Transform to the harness by double-clicking in the Toolbox.
Export the Ports
1.Right-click on the BluetoothTransform PairUnpair Transform and export the ports.
2.Right-click on the BluetoothSPP Transform and export the ports as shown below.
3.The Export Ports form is displayed:
4.Select the required ports from the list of available ports
5.Click OK to export all selected ports to MxVDev.
6.Click to save the harness.
Ports
Inport |
|
SPPProfileConnect/Disconnect |
This is a message Signal used to send commands to Connect/ Disconnect the SPP Profile. In MxVDev, double-click on the Signal to display this dialog and create a transition. ![]() SPPProfileConnect/Disconnect Transition Editor |
Outports |
|
SPPConnectionState |
This is a discrete Signal, which gives the present status of the SPP connection. The Enum values of the SPPConnectionState variable are: •Connected. •NotConnected |
SPPResponse |
This is a message Signal which shows the SPP profile response. |
SPP Testing
Local PC working as a Bluetooth SPP Initiator
1.Pair the local PC with the remote device using Pair/Unpair device variable as discussed in Pair/Unpair–Testing.
2.Create a Scenario and a TestCase with the SPPProfileConnect/Disconnect, SPPConnectionState, and SPPResponse Signals.
3.Connect the SPP profile by sending the connect command on the SPPProfileConnect/Disconnect Signal.
The connection status is displayed on SPPConnectionState. SPPResponse provides the responses from the SPP profile.
In the sample TestCase, SPP connects at time 5 seconds.
4.A virtual serial com port is generated if the SPP connection is successful on both systems.
5.Open the device manager to view the new com port numbers.
6.Open and configure the hyper terminals in local device as well in remote device using newly created com port numbers.
7.Enter text in HyperTerminal of the Local PC. The same text appears in HyperTerminal window of Remote PC as shown in the figures below.
HyperTerminal in Local PC
HyperTerminal in Remote PC
Test PC as a Bluetooth SPP Acceptor |
1.Pair the Local PC with the Remote device using Pair/Unpair device variable as discussed in Pair/Unpair–Testing.
2.After pairing with the Head Unit (or any remote device which supports the SPP profile), the Head Unit initiates SPP connection by default. The Local PC accepts the SPP request from the Head Unit (or other remote device). There is no need to send the command to connect SPP with the Local PC.
Note: The remote device is a Head Unit in the vehicle or any other unit which supports SPP.
3.Create a Scenario and TestCase using the SPPConnectionState and SPPResponse Signals.
The connection status is displayed on the SPPConnectionState Signal. SPPResponse provides the responses of the SPP profile.
Below is a sample TestCase to test SPP profile connection. Here we are connecting SPP.
4.After Connecting the SPP profile, you can send AT commands or any other messages to the Head Unit (or any remote device) using the virtual serial port created by SPP the connection. The Head Unit (or other remote device unit which has the same capabilities) reads the commands or messages and responds.
In this way the Local PC can communicate with a Head Unit (or remote device) using SPP.
If the remote device closes the virtual com port connection, the SPP connection is closed at both sides.
Note: The remote device should be able to open the virtual com and send/receive data or an application should be present to process the messages.