how to set up vsp and spp - laird techcdn.lairdtech.com › home › brandworld › files ›...

23
Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless 1 Americas: +1-800-492-2320 Europe: +44-1628-858-940 Hong Kong: +852 2923 0610 How to Set Up vSP and SPP BT900 Application Note v1.0 INTRODUCTION Serial Port Profile (SPP) for Classic Bluetooth and Virtual Serial Port (vSP) for Bluetooth Low Energy are two means of sharing serial data between Bluetooth devices. This guide explains possible SPP and vSP scenarios using a Laird BT900 module and describes how to connect devices in each possible scenario. The guide is divided into the following sections: Setup Preparation If using a DVK board (BT900/BL620/BL600) ensure that the current measurement track is not cut at point SB9, or if it is then ensure a jumper is fitted across the CON1 junction. Connection Scenarios vSP SPP Detailed setup instructions REQUIREMENTS PC running Windows XP or later UwTerminal 7.0 or later (available from the software downloads tab of the BT900 product page) Laird Bluetooth development kits (BT900, BL600, BL620) Android device with BLE support (for vSP, device required Android 4.3 Jelly Bean or higher) and Laird Toolkit 4.18.1.12 or later (available on the Google Play Store) iOS device with BLE support and Laird Toolkit (available on the App Store) FTDI Drivers http://www.ftdichip.com/Drivers/VCP.htm (if not included with the OS) SETUP PREPARATION FOR ALL SCENARIOS 1. To prepare your setup, follow these steps: 2. Plug in the BT900 DVK to a PC using the provided USB-to-Mini USB cable. The DVK has an FTDI USB-UART chip on board. When connected, Windows 7 or later should install the driver automatically. The driver is also available from the FTDI website. 3. Locate and note the COM port in Windows Device Manager. The COM port number varies on each computer (Figure 1).

Upload: others

Post on 09-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

1 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

How to Set Up vSP and SPP BT900

Application Note v1.0

INTRODUCTION

Serial Port Profile (SPP) for Classic Bluetooth and Virtual Serial Port (vSP) for Bluetooth Low Energy are two means of sharing serial data between Bluetooth devices. This guide explains possible SPP and vSP scenarios using a Laird BT900 module and describes how to connect devices in each possible scenario. The guide is divided into the following sections:

Setup Preparation If using a DVK board (BT900/BL620/BL600) ensure that the current measurement track is not cut at point

SB9, or if it is then ensure a jumper is fitted across the CON1 junction. Connection Scenarios

– vSP – SPP

Detailed setup instructions

REQUIREMENTS

PC running Windows XP or later UwTerminal 7.0 or later (available from the software downloads tab of the BT900 product page) Laird Bluetooth development kits (BT900, BL600, BL620) Android device with BLE support (for vSP, device required Android 4.3 Jelly Bean or higher) and Laird Toolkit

4.18.1.12 or later (available on the Google Play Store) iOS device with BLE support and Laird Toolkit (available on the App Store) FTDI Drivers http://www.ftdichip.com/Drivers/VCP.htm (if not included with the OS)

SETUP PREPARATION FOR ALL SCENARIOS

1. To prepare your setup, follow these steps: 2. Plug in the BT900 DVK to a PC using the provided USB-to-Mini USB cable. The DVK has an FTDI USB-UART

chip on board. When connected, Windows 7 or later should install the driver automatically. The driver is also available from the FTDI website.

3. Locate and note the COM port in Windows Device Manager. The COM port number varies on each computer (Figure 1).

Page 2: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

2 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 1: Device manager

4. Visit the Laird BT900 Github website (and the BL620 Github website if required) to download the sample applications

5. On the Github pages, scroll down and click the ‘Download as zip’ button on the right, and unzip it to a folder on your computer (such as C:\Laird\BT900).

Figure 2: Github download link

6. Download the X-Compiler and UwTerminal from the Laird website for BT900 (and BL620 if needed). 7. Place the XComp file and UwTerminal utility in the same smartBASIC sample application folder.

Note: UwTerminal looks for the matching XComp file in the UwTerminal folder or the sample apps folder. Using the wrong XComp file for your firmware version will result in errors.

Figure 3: UwTerminal and XComp file in the same folder

8. Open UwTerminal. Set the COM port number found in Step 2. Set the BT900 to the default settings of 115200 bps, none, 1, 8, CTS/RTS.

Page 3: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

3 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 4: UwTerminal configuration page

9. Type AT I 3 and press Enter to confirm the module is accessible. Module will return the firmware version as shown in Figure 5 if it is accessible.

Figure 5: BT900 firmware version

10. If using a DVK board (BT900/BL620/BL600) ensure that the current measurement track is not cut at point SB9, or if it is then ensure a jumper is fitted across the CON1 junction.

CONNECTION SCENARIOS

The following sections are a summary of what connection scenarios are available for both vSP and SPP. Available connection types are listed, as well as links to instructions for each available type.

vSP

vSP (Virtual Serial Port) is a method of sending data over BLE (Bluetooth Low Energy), similar to how SPP works in Classic Bluetooth. Laird developed vSP as a proprietary feature enhancement at the request of our customers. vSP is relatively low throughput and does not take advantage of the low power features of BLE. For further details about vSP, please see the vSP smartBASIC Application Note.

Possible vSP scenarios are listed below. Click the links in the table to see specific instructions for each scenario:

Page 4: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

4 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 6: vSP Support

Note: Windows Phone does not support Bluetooth Low Energy.

Table 1: vSP Scenarios

# Scenario Device 1 and required software / script Device 2 and required software / script Supported

A vSP server on BT900, vSP

client on BT900

DVK-BT900

$autorun$.vSP.UART.bridge.incoming

DVK-BT900

$autorun$.vSP.UART.bridge.outgoing

B Hardware vSP mode on

BL600, vSP client on BT900

DVK-BT900

$autorun$.vSP.UART.bridge.outgoing

DVK-BL600

C vSP server on BT900, vSP

client on BL620

DVK-BT900

$autorun$.vSP.UART.bridge.incoming

DVK-BL620 or BL620-US

$autorun$.vSP.UART.bridge.outgoing

D vSP server on BT900, vSP

client on Android

DVK-BT900

$autorun$.vSP.UART.bridge.incoming

Android

Laird Toolkit

E vSP server on BT900, vSP

client on iOS

DVK-BT900

$autorun$.vSP.UART.bridge.incoming

iOS

Laird Toolkit

F vSP server on BT900, vSP

client on Windows Phone

DVK-BT900 Windows Phone

SPP

SPP (Serial Port Profile) is a method of sending data over classic Bluetooth with fast throughput, and was designed for wireless UART cable replacement.

Possible SPP scenarios are listed below. Click the links in the table to see specific instructions for each scenario.

Page 5: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

5 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 7: SPP Support

Note: Windows Phone does not support Bluetooth Low Energy. iOS requires iAP for Bluetooth Classic support.

Table 2: SPP Scenarios # Scenario Device 1 and required software / script Device 2 and required software / script Supported

G SPP server on BT900, SPP client on BT900

DVK-BT900 $autorun$.SPP.UART.bridge.incoming

DVK-BT900 $autorun$.SPP.UART.bridge.outgoing

H SPP from BT900 to PC DVK-BT900 $autorun$.SPP.UART.bridge.incoming

PC

I SPP server on BT900, SPP client on BTM443

DVK-BT900 $autorun$.SPP.UART.bridge.incoming

BTM443

J SPP server on BT900, SPP client on Android

DVK-BT900 $autorun$.SPP.UART.bridge.incoming

Android Laird Toolkit

K SPP server on BT900, SPP client on iOS

DVK-BT900 iOS

L SPP server on BT900, SPP client on Windows Phone

DVK-BT900 Windows Phone

DETAILED SETUP INSTRUCTIONS

Scenario A: vSP from BT900 to BT900

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the first BT900, at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Page 6: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

6 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 8: Module's BLE addess (note the leading 00)

3. Open $autorun$.vSP.UART.bridge.outgoing.sb from the previously downloaded smartBASIC sample apps. 4. Find and edit the ‘#define BTAddr’ line to have the Bluetooth address in from step 2 (Bluetooth low energy

addresses are 7 bytes, not 6 bytes as Bluetooth classic device addresses are, the 00 with a space above is prepended to the displayed Bluetooth classic address, which is the module’s BLE address), also adjust ‘#define CONNECT_ON_STARTUP 0’ to ‘#define CONNECT_ON_STARTUP 1’. Save and close the file.

Figure 9: Adding Module's BLE Address (with leading 00)

5. On the first module window, right click the console area and select XCompile + Load + Run. 6. Select the $autorun$.vSP.UART.bridge.incoming.sb file.

Figure 10: XCompile+Load+Run

7. Open another instance of UwTerminal and connect Device 2, the second BT900, at 115200 baud. 8. Type AT and press Enter. The module should respond with 00, confirming it is in command mode. 9. On the second module window, right click the console area and select XCompile + Load + Run. 10. Select the $autorun$.vSP.UART.bridge.outgoing.sb file.

Figure 11: XCompile+Load+Run

11. Once both files have downloaded, Device 2 should show that it is connected and data can be exchanged between the two devices.

Page 7: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

7 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 12: Console shows BT900 is connected and ready

Scenario B: vSP from BL600 to BT900

The BL600 has hardware vSP mode built into the firmware, for details on how to enable this, please see the vSP smartBASIC Application Note. Please note that there is a known issue with the BL600 in bridged VSP mode when lots of data is exchanged that can cause the BL600 to stop accepting data in the current production firmware version 1.5.70.0.

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 2, the BL600, at 9600 baud. Ensure vSP mode is disabled (no jumper between SIO_7 and Vcc).

2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Figure 13: Module’s BT Address

3. Open $autorun$.vSP.UART.bridge.outgoing.sb from the previously downloaded smartBASIC sample apps. 4. Find and edit the #define BTAddr line to have the Bluetooth address in from step 2. Note that Bluetooth

Low Energy addresses are 7 bytes, not 6 bytes as Bluetooth classic device addresses are. The 01 with a space above is prepended to the displayed Bluetooth classic address, which is the module’s BLE address).

5. Change ‘#define CONNECT_ON_STARTUP 0’ to ‘#define CONNECT_ON_STARTUP 1’. Save and close the file.

Figure 14: Changing BT Address definition in script

6. Place a jumper so that SIO7 is pulled high (short pins 8 and 10). See Figure 15. 7. Check that there is a jumper on J6 so that develop is selected for vSP bridge mode, or select nAutoRUN for

vSP command mode. See Figure 15.

Page 8: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

8 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 15: Jumper setting for cable replacement mode operation

8. Ensure on CON12 that the USB_DTR – nAutoRun DIP switch is set to OFF (left position).

Figure 16: nAutoRun switch set to OFF

9. Open another instance of UwTerminal and connect Device 1, the BT900, at 115200 baud. 10. Type AT and press Enter. The module should respond with 00, confirming it is in command mode. 11. On the BT900 module window, right click in the console area and select XCompile + Load. 12. Select the $autorun$.vSP.UART.bridge.outgoing.sb file.

Figure 17: XCompile+Load+Run

13. Once the download has completed, press the reset button on the BL600. 14. On the BT900, type AT+RUN “$autorun$” and press Enter. The BT900 should show that it is connected and

data can be exchanged between the two devices.

Figure 18: Console shows BT900 is connected and ready

Scenario C: vSP from BT900 to BL620

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the BT900, at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Page 9: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

9 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 19: Module’s BT Address

3. Open $autorun$.vSP.UART.bridge.outgoing.sb from the previously downloaded smartBASIC sample apps. 4. Find and edit the #define BTAddr line to have the Bluetooth address in from step 2. Note that Bluetooth

low energy addresses are 7 bytes, not 6 bytes as Bluetooth classic device addresses are. The 00 with a space above is prepended to the displayed Bluetooth classic address, which is the module’s BLE address),

5. Change ‘#define CONNECT_ON_STARTUP 0’ to ‘#define CONNECT_ON_STARTUP 1’. Save and close the file.

Figure 20: Changing BT Address definition in script

6. On the BT900 module window, right click in the console area and select XCompile + Load + Run. 7. Select the $autorun$.vSP.UART.bridge.incoming.sb file.

Figure 21: XCompile+Load+Run

8. Open another instance of UwTerminal and connect Device 2, the BL620, at 9600 baud. 9. Type AT and press Enter. The module should respond with 00, confirming it is in command mode. 10. On the second module window, right click the console area and select XCompile + Load + Run.

Figure 22: XCompile+Load+Run

11. Select the $autorun$.vSP.UART.bridge.outgoing.sb file. 12. Once both files have downloaded, the BT900 should show that it is connected and data can be exchanged

between the two devices.

Page 10: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

10 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 23: Console shows BT900 is connected and ready

Scenario D: vSP from BT900 to Android

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the BT900, at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address

Figure 24: Module’s BT Address

3. On the BT900 module window, right click in the console area and select XCompile + Load + Run.

Figure 25: XCompile+Load+Run

4. Select the $autorun$.vSP.UART.bridge.incoming.sb file from the previously downloaded smartBASIC sample apps.

5. Launch the Laird Toolkit application on the Android device and tap the Serial (vSP) icon.

Page 11: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

11 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 26: Laird Toolkit application with Serial (vSP) menu option

6. Tap Scan.

Figure 27: Serial (vSP) window with Scan button

7. In the device list that appears, tap the Laird BT900 device that appears in the list with a corresponding Bluetooth address from step 2.

Figure 28: Laird BT900 discovered in Laird Toolkit app

8. The Android device will connect to the BT900 and data can be exchanged between the two devices.

Page 12: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

12 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 29: Connected to Laird BT900

Scenario E: vSP from BT900 to iOS

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect to the BT900 device at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Figure 30: Module’s BT Address

3. On the BT900 module window, right click the console area and select XCompile + Load + Run. 4. Select the $autorun$.vSP.UART.bridge.incoming.sb file from the previously downloaded smartBASIC sample

apps.

Figure 31: XCompile+Load+Run

5. On the iOS device, tap the Laird Toolkit icon to launch the application.

Figure 32: Laird Toolkit icon

Page 13: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

13 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

6. From the main menu, tap Serial to enter vSP mode.

Figure 33: Laird Toolkit app

7. From the Serial window, tap Scan. A list of advertising vSP servers appears.

Figure 34: Serial window

Page 14: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

14 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

8. Tap Laird BT900 to connect.

Figure 35: Finding Laird BT900 with Serial scan

9. The iOS device connects to the vSP server and data can exchanged between the devices.

Figure 36: Connected to Laird BT900

Scenario F: vSP from BT900 to Windows Phone / Tablet

At this time, vSP from BT900 to Windows Phone / Tablet is unsupported.

Scenario G: SPP from BT900 to BT900

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the first BT900, at 115200 baud.

Page 15: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

15 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Figure 37: Module’s BT Address

3. Open $autorun$.SPP.UART.bridge.outgoing.sb from the previously downloaded smartBASIC sample apps. 4. Find and edit the #define BTAddr line to have the Bluetooth address in from step 2. 5. Change ‘#define CONNECT_ON_STARTUP 0’ to ‘#define CONNECT_ON_STARTUP 1’. Save and close the file. 6. Open another instance of UwTerminal and connect Device 2, the second BT900, at 115200 baud. 7. Type AT and press Enter. The module should respond with 00, confirming it is in command mode. 8. On the Device 1 window, right click the console area and select XCompile + Load + Run. 9. Select the $autorun$.SPP.UART.bridge.incoming.sb file.

Figure 38: XCompile+Load+Run

10. On the Device 2 window, right click the console area. Select XCompile + Load + Run. 11. Select the $autorun$.SPP.UART.bridge.outgoing.sb file. 12. When both applications have loaded, Device 1 will start hosting an SPP server and Device 2 will connect to

the first. The two devices should ask for a pairing response, type Y and press Enter in both module windows.

Figure 39: Pairing the devices via terminal

13. Data can now be exchanged between the two devices.

Page 16: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

16 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Scenario H: SPP from BT900 to PC

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the BT900, at 115200 baud. 2. On the BT900 module window, right click the console area and select XCompile + Load + Run.

Figure 40: XCompile+Load+Run

3. Select the $autorun$.SPP.UART.bridge.incoming.sb file from the previously downloaded smartBASIC sample apps.

4. From Windows, right click on the Bluetooth icon in the notification area and select Add a Device.

Figure 41: “Add a Device” context menu selection

5. Select the BT900 device in the list of available devices and click Next.

Figure 42: BT900 in list of available devices

Page 17: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

17 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

6. The computer attempts to pair with the BT900. When the event comes through on the BT900, type Y and press Enter to accept the pairing request.

Figure 43: Pairing devices via terminal

7. Windows shows a successful pairing response and begins installing drivers.

Figure 44: Pairing successful

8. Double click Installing device drivers in the system tray and wait for the drivers to install. Take note of the first COM port in the list, this is the outgoing SPP port to the BT900.

Figure 45: Driver Software Installation window

9. Open a new instance of UwTerminal and select the COM port discovered in the previous step and connect to it. Data can now be exchanged between the devices. If the port fails to open or opens but all status lights

Page 18: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

18 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

remain red, this could be caused by selecting the wrong COM port, retry the process with the other COM port.

Figure 46: Devices connected and ready

Scenario I: SPP from BT900 to BTM443

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the first BT900, at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Figure 47: Module's BT Address

3. Note down the module’s Bluetooth address to enter on the BTM443 later 4. Right click the console area of UwTerminal and select XCompile + Load + Run. 5. Select the $autorun$.SPP.UART.bridge.incoming.sb file. 6. Open another instance of UwTerminal and connect Device 2, the BTM443, at the configured baud

(default is 9600).

Page 19: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

19 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

7. In the BTM443 UwTerminal window; type AT and press Enter to ensure the baud rate is correct. The module should respond ‘OK’.

Figure 48: Checking communication with BTM443

8. In the BTM443 UwTerminal window; type ATD followed by the Bluetooth address of the BT900 from step 2, without a space, and press Enter. In this exmple, the address is ATD0016A4093D8A. This step might need to be repeated if the first connection attempt fails.

9. A pair request should appear on the BT900s UwTerminal instance, press y and Enter and the devices will pair, the BTM443 will then connect to the BT900s SPP server. Data can now be exchanged between the devices.

Figure 49: Accepting pair request on the BT900

Scenario J: SPP from BT900 to Android

After performing the Setup Preparation for All Scenarios, complete the following steps.

1. With UwTerminal, connect Device 1, the BT900, at 115200 baud. 2. Type AT I 4 and press Enter to get the module’s Bluetooth address.

Page 20: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

20 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 50: Module’s BT Address

3. On the BT900 module window, right click the console area and select XCompile + Load + Run. 4. Select the $autorun$.SPP.UART.bridge.incoming.sb file from the previously downloaded smartBASIC

sample apps.

Figure 51: XCompile+Load+Run

5. Launch the Laird Toolkit application on the Android device and tap SPP.

Figure 52: Laird Toolkit app with SPP option

6. Tap Scan.

Page 21: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

21 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 53: SPP Window with Scan button

7. A list of Bluetooth classic devices appears. Tap the Laird BT900 device that appears in the list with a corresponding Bluetooth address from Step 2.

Figure 54: Laird BT900 in list of found devices

8. A popup appears asking to pair with the BT900. Tap Pair.

Page 22: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

22 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 55: Pairing with Laird BT900

9. At the same time, a pair request appears on the BT900 UwTerminal window. Type Y and press Enter in the Laird BT900 module window to accept the pairing.

Figure 56: Pairing the devices via terminal

10. After this the SPP connection is be established and data can be exchanged between the devices.

Page 23: How to Set Up vSP and SPP - Laird Techcdn.lairdtech.com › home › brandworld › files › Application... · folder. Using the wrong XComp file for your firmware version will result

SPP and vSP Communication (BT900) Application Note

Embedded Wireless Solutions Support Center: http://ews-support.lairdtech.com www.lairdtech.com/wireless

23 Americas: +1-800-492-2320 Europe: +44-1628-858-940

Hong Kong: +852 2923 0610

Figure 57: Connected to Laird BT900

Scenario K: SPP from BT900 to iOS

SSP from BT900 to iOS is unsupported as it requires IAP.

Scenario L: SPP from BT900 to Windows Phone / Tablet

At this time, SSP from BT900 to Windows Phone / Tablet is unsupported.

REVISION HISTORY Version Date Notes Approver

1.0 1 July 2015 Initial Release Jonathan Kaye