This is an old revision of the document!


How to Auto-Connect 2 PmodBT2's Together

Introduction

The PmodBT2's can be configured to auto connect with one another in order to provide an instant bidirectional serial cable replacement. Below is a simple guide to show you how this is done.


Required Materials

  • x2 PmodBT2
  • Host computer with bluetooth and general purpose Terminal program (e.g. TeraTerm or Hyperterminal) or a serial terminal app on your non IOS mobile device.
  • A means to provide power to the BT2's

Terminology

  • <cr> - When you see this you will need to add a carriage return in your terminal.

Instructions

The general setup just needs the user to be able to connect and enter setup mode on the BT2's therefore this tutorial can be performed either using a Bluetooth compatible PC with a terminal program or a Bluetooth compatible smartphone (non IOS) with a terminal app.

1. Initial Setup

1.1) First make sure that both of the PmodBT2's have been reset to their factory defaults. To do this short the JP1 jumper on the BT2, apply power and remove/replace the jumper twice. On the second jumper replacement you should see both the red and green leds flash momentarily, this is how you know that you successfully reset your BT2. It is important to note that the jumper on JP1 needs to be on before the BT2 is powered on in order to take effect.
1.2) Once the BT2's are reset, remove the jumper on JP1 and power cycle.

2. BT2 Configuration

2.1) At this point you will need to decide which BT2 you would like to be the slave and master.

3. Slave Configuration

3.1) Connect to your designated slave BT2 with your preferred device and send the command “$$$” through the terminal. If receive “CMD” back from the BT2 and the BT2's green led will begin flashing more rapidly you know that you have successfully entered “Command Mode”.
3.2) Next enter “D<cr>” to display the BT2's basic settings and verify that “Mode =Slav”. If the mode is set to anything other than the slave then set the mode to slave by entering the command “SM,0<cr>”.
3.3) Next we need to disable the authentication. To do this send the command “SA,0<cr>” and verify that “Authen=0” in the basic settings.
3.4) In order for these changes to take effect the device must be rebooted. Use the “R,1<cr>” command to reboot.

4. Master Configuration

4.1) Next up is to configure your master device. Using the same process to enter command mode as you did to the slave enter command mode of the master BT2.
4.2) Send the commands “SA,0<cr>” and “Sm,3<cr>”. These commands will disable authentication and set the BT2 into “Auto-Connect” mode.
4.3) Check to make sure that the device is in auto connect code and has no authentication. Send “D<cr>” and verify “Mode =DTR” and “Authen=0”.
4.4) Reboot the device using the “R,1<cr>” command.

5. Test!

5.1) Connect the BT2's to a power source close enough that they are within range of each other and power them up at the same time (plugging them both into one of our Digilent boards is an easy way to do this). Within few seconds you should see the green lights turn off on both of the BT2's. This means that you have successfully configured your PmodBT2's to auto connect with each other!