• Linked Applications
    Loading…

Serial Bluetooth Telemetry

Content

Serial Bluetooth RF Transceiver Module RS232


Description:

This small size Bluetooth TTL transceiver module allows your target device to both send or receive the TTL data via Bluetooth technology without connecting a serial cable to your computer. It's easy to use and completely encapsulated.

  • Chipset CSR BC417143
  • Bluetooth version V2.0+EDR (Enhanced Data Rate)
  • Output power Class II (±2.5mW range ±10m)
  • Flash 8Mbit
  • Power Supply 3.3V (5VDC via breakout board)
  • Interface UART

This configuration guide covers the displayed serial Bluetooth module. It's available in many different internet shops (e.g. Ebay, Goodluckbuy, BlueSkyRC or pre configured from the European OpenPilot store and uAViation) The boards ship mostly around 10$ - 20$. Although the hardware is the same, several software or firmware revisions exist.

Different input voltage versions

Icon

Please note:
There are different versions available; 3VDC or 5VDC.  You want the 5VDC version in order to connect directly to CopterControl. This module has an on-board voltage regulator.

 Tell me more about this ...

The voltage input must be clearly mentioned; typically these boards can handle a power supply between 3.6VDC ~ 6.0VDC when an on-board voltage regulator is available.

Check for the input & output voltage which is mostly mentioned on the module diagram.

Configuration

 The unit comes with a default baud rate of 9600, 8 data bits, 1 stop bit & no parity. It must be adapted to suit the needs of the GCS telemetry.

In order to reconfigure the Bluetooth adapter, one needs a standard TTL serial port and a terminal program such as Hyper Terminal. As an example, a Basic 5V Sparkfun FTDI breakout board  will be used as a USB to serial port converter to configure the module. Any USB to serial TTL port should work.

 

CopterControl as TTL converter

Icon

If you don't have a dedicated USB to Serial converter needed to configure the adapter, don't worry. The OpenPilot team has developed a special CopterControl Firmware that turns the CopterControl into a converter.

You can convert your CopterControl board to a TTL adapter, configure your Bluetooth module and then convert the CopterControl board right back to its original purpose. No settings will be lost so you don't need to configure your board again after you're done. Check this wiki page on how to convert your board into a Virtual Com Port adapter.

(star) If you connect your Bluetooth module directly to CopterControl, it will only be powered if CopterControl is powered through the servo headers. If you only supply the board via USB then the telemetry ports are not powered and you should supply your Bluetooth module externally.

There's even better news, the next release of CopterControl firmware allows the use of the virtual com port without flashing new firmware. If you build your own version of the software you can already use this new feature.

Alternative terminal programs for Hyper Terminal

Icon
  • For Linux & Windows 7 users: an alternative to Hyper Terminal, a free open source program called PuTTY can be used. PuTTY is a stand alone program and perfectly capable of replacing Hyper Terminal. On Linux, "screen" can also be used, see the mac section below.
  • A developer from the OpenPilot team has made an easy configuration application for these Bluetooth modules, see further down for a complete description.
  • For Mac users: a free terminal application Coolterm can be used, or simply use the built-in terminal command "screen":
    1. Start Terminal.app
    2. type screen /dev/tty.<devicename> <speed>
    3. i.e. screen /dev/tty.usbmodemXX 9600
    4. Use tab to find the correct usbdevice (after you write "tty." - press "tab" to autocomplete).
    5. When you change speed from 9600 to 115200 you need to force disconnect of screen. Hold down "CTRL+a" and press "k" (i.e. kill)
    6. Connect again with new terminal speed: screen /dev/tty.usbmodemXX 115200.

Module configuration connection

Connect the serial Bluetooth module to your comm port as in the diagram below. Make sure the RX & TX lines are crossed between both devices.

Module configuration settings

A: Manual configuration

 

Open your terminal program and connect to the module with the default settings 9600,8,1,N

 Show me how to do this ...

In Hyper Terminal, make a new connection with your comport and set the baud rate to 9600, the data bits to 1, No parity & 1 Stop bit. Note that these are mostly default settings. Furthermore, switch the flow control to None.

 In the example below, the serial USB comport is located at COM16

Check if the unit responds to the AT command (use capital letters). The unit should answer OK

Icon

The entered text is not visible in Hyper Terminal, if you are unable or unsure that you sent the right command, then copy the letters AT and use the paste to host function from the Edit menu.

Icon

Bluetooth modules are sensitive to how quickly (or slowly) you enter AT commands. The best way to avoid problems is to type all of your commands into a simple text editor. Then copy the command you wish to run into the terminal emulator window as an entire string.

When you established a connection with the module, use the following commands to configure the module:

  • Set the module speed with the command AT+BAUD8 The Bluetooth module is now configured to work on a serial speed of 115200kbps. This is the serial speed which you must set in the GCS telemetry panel as Telemetry speed.

     Show me where to set this ...
    The page Telemetry Panel could not be found.
  • Optionally, set the module name with the command AT+NAMEOpenPilot

Note: The commands below can be used with the module but only with software version Linvor v1.5.

Command

Description

Options

Response

AT+VERSION

Returns the software version of the module

 

OKlinvorV1.5

AT+BAUDx

Sets the baud rate of the module
The command AT+BAUD8 sets the
baud rate to 115200

1 >> 1200
2 >> 2400
3 >> 4800
4 >> 9600 (Default)
5 >> 19200
6 >> 38400
7 >> 57600
8 >> 115200
9 >> 230400

OK115200

AT+NAMEOpenPilot

Sets the name of the module

Any name can be specified up to 20 characters

OKsetname

AT+PINxxxx

Sets the pairing password of the device

Any 4 digit number can be used, the default
pincode is 1234

OKsetPIN

AT+PN

Sets the parity of the module

AT+PN >> No parity check

OK None

B: Using the configuration software

This Bluetooth configurator application enables you to quickly and easily configure a standard module. This handy app is written by PT_Dreamer (Forum Link)

Bluetooth configurator (download)

Icon

The application is not completely stand alone and it needs to be copied into the GCS station executable folder. This is the bin directory in your OpenPilot installation folder. (Hint: the openpilotgcs.exe executable file is also located in the bin directory.)

  • The app is very much self-explanatory; initially you must specify the connection settings and click on the Connect button. If you don't know the connection settings, you can use the find button. The program will then scan all your available serial ports at different speeds to find the module.
     


     

  • If you are successfully connected with the module, you can enter the new configuration settings and store the values with the button Write Values.

Speed: This is the serial speed which you must set in the GCS telemetry panel as Telemetry speed.
Name:  Any module name can be specified up to 20 characters.
Pin:      Sets the pairing password of the device; any 4 digit number can be used.

  • In the event log area you can follow the connection & configuration changes.

C: Using an Arduino

Bluetooth programming sketch for Arduino enables you to quickly and easily configure bluetooth modules with your Arduino. No interaction is required it will do everything for you, this handy sketch is written by nayr (Forum Link)

Bluetooth Programming Sketch for Arduino (download)

Optional Configuration Settings

Icon

There is a configuration section at the top of the sketch if you wish to modify any of the default values.. This was tested/developed on an Arduino UNO

This is a rundown on how it operates:

  • Initializes the standard serial port for debug output.
  • Initializes pins 10 & 11 as a serial port to connect to the Bluetooth Module.
  • Turns LED on to signal programming has started.
  • Sends all the commands needed in at a very specific rate while updating status.
  • Verifies the output from the BT module matches what is expected.
  • If Verification passes - enter a test mode where LED flashes and a string is sent to the BT module in an infinite loop.
  • If Verification fails - LED is turned off & it shows the returned output before entering a command mode where you can attempt direct configuration.
  • (optional) When done testing you can plugin another module then reset the Arduino to repeat the process.

Instructions:

  1. Open the included file with Arduino App
  2. Make any configuration changes you like
  3. Verify and upload to your device.
  4. Then hookup the module as shown below
  5. Power up or reset the Arduino.
  6. Wait for LED's to start flashing to indicate success. (L in the diagram below)

If you connect to the Debug Port (USB or Pins 0-1) with the Arduino Serial Monitor you can watch progress and program manually incase of failure.. Here is the expected output:

Serial Monitor Output

Icon

Configuring bluetooth module for use with OpenPilot, please wait.
Setting PIN : 4242
Setting NAME: OpenPilot-BT
Setting BAUD: 57600
Configuration verified, entering test mode..
To do another module plug it in and then hit reset

Module connection with CopterControl

The module is now set up and can be connected to the telemetry port of CopterControl.

The connection of the Bluetooth module with CopterControl is actually the same as the serial port module. Make sure that RX & TX are crossed and that Gnd & Pwr match.

If you want to extend the Bluetooth range by means of radio modules, such as the APC220 transceiver, you can connect the module like in the diagram below.

Disconnect USB when using your Bluetooth connection

Icon

When the USB port is connected, all the telemetry is routed through the USB port. You must disconnect the USB cable in order to use your telemetry.

Step by step video by Dacat & Tom.

The video guides you through a complete configuration of a Bluetooth module. The configuration is done on a Macintosh.
CopterControl is used as a TTL converter; the firmware used and referred to in the video can be downloaded on the bottom of the Virtual Com Port page (NO_FSM_USB_To_Serial.bin).

 

Get Adobe Flash player

The  video is made by Dacat & Tom, more info can be found in the forums here & here.

 

FAQ's

 I'm using PuTTY, show me how to set up and connect.

The connection details are the same. After you have started PuTTY, follow the steps in the screen shots below.

Once the Open button is clicked, PuTTY opens the terminal window.

 

Icon

When entering values in the terminal window, PuTTY does not show the entered values unless you force the echo local.

 After changing the baud rate, I'm unable to connect to the module.

Make sure you disconnect from your comport, then change the connection speed in your terminal program and reconnect again to your module using the correct baud rate.

 The Bluetooth module LED burns solid red but I cannot configure the module

Make sure you don't try to configure the module using the Bluetooth port. The module can only be configured through the serial connection.

 I've connected the module to the serial port of my PC but cannot establish a connection.

A standard serial port uses different and inverted voltage levels to transmit a binary 1 or 0. The module can only be configured through a serial port using TTL voltage levels. In case you want to configure your module with a standard serial port from your PC or with an USB to RS-232 converter, then you need an additional RS-232 to TTL converter. For more details on the differences between the standard RS-232 & TTL levels, see this article.
Note that most modern USB to serial converters are TTL and suitable for use in TTL compatible digital logic circuits like this Bluetooth module.

 I've never used Hyper Terminal and cannot open the comm port as described

If you never used Hyper Terminal before, it's important to know that you have to make a new connection through a comm port and give the connection a name. Any connection name will do as it's not used any further.

If you didn't set-up your current location in Windows, prior using Hyper Terminal, Windows may guide you through the location wizard. You only have to do this once and the location you set is not important. 

 Everything is configured as mentioned but the connection doesn't seem to work.

In some cases the Toshiba Bluetooth stack is the only one which seems to work. You may want to upgrade to the Toshiba Bluetooth stack. Unfortunately, this stack is not freeware.

 I cannot get any sort of reliable connection

Several users were unable to get a reliable connection at a speed of 115200kbps. Dropping the speed to 57600kbps on the module and the GCS solved this problem.

 I'm using PuTTY on Linux. How do I find my serial port with an USB plugin module?

If your Bluetooth module on the Linux side is a USB plug in, then what you want to do is open up a terminal window and do a "tail -f /far/log/messages", and then plug in the USB Bluetooth module. Watch the output in the terminal and you should see the discovery of the module take place. Somewhere in that output, you should see a /dev/tty<something> go by. That is the port associated with the Bluetooth module. You can kill the term window at this point.

Now fire up PuTTY. You should get the configuration screen when it opens. Select the serial connection type first, and then edit the serial line field (/dev/ttyXXX that you discovered above) and baud rate as appropriate. You should now be talking to the module.