Control robot via serial port

Bluetooth-to-UART module

Bluetooth-to-UART module provides wireless connection between a computer and a device or between two devices emulating serial communication. Such module can be found on eBay for $5-$10.


hint Fatal Error, System crashed when a bluetooth adapter is disconnected

On Ubuntu 12.04, 13.04 the system is crashed when the bluetooth adapter is disconnected from the computer – either when connection is interrupted by hitting Ctrl+C for the command “rfcomm connect” or when the adapter is turned off. This is known bug, it is most likely fixed in the Linux Kernel version 3.10. Ubuntu 13.10 has the Kernel version 3.11. This issue also does not exist on the pcDuino board running Ubuntu 12.07.

The bug diagnostics first line starts with: “kernel BUG at /build/buildd” and ends with “workqueue.c:610!”

Kernel version can be found by following command

uname -r


Board on the picture above was soldered with wires (TX, RX, +3.3V, GND) and glued in a box. This way it can be only temporary connected to an Arduino board with a risk to damage the bluetooth module because actually its RX, TX pins require 3.3V logic but an Arduino board has 5V logic. So the logic level converter is required.

Bluetooth2UARTAdapterCSR41C6LevelConverterDCConverterDisassembled Bluetooth2UARTAdapterCSR41C6LevelConverterDCConverterAssembled

Hand made level converter with 5V to 3.3V DC regulator and two LEDs required skills in soldering. Q1 can be any general purpose transistor (e.g. BC547). LED connected to a pin 24 blinks when the module is not connected and it does not blink when connection is established.

LevelConverterAndDCRegulatorCirquit  Bluetooth2UARTAdapterSCRSchema

There are also $2 more expensive bluetooth modules with a board containing level converters and pins (e.g. “Bluetooth UART Module Development Board”) or adapters for bluetooth modules (e.g. “Adapter Board for Bluetooth UART Converter Module”).

“Slave” and “Master” modes can be switchable (by a command or by an external hardware switch) or can be prebuilt without possibility to change. “Slave” mode allows the module connecting with computer’s bluetooth devices or modules with a “Master” mode. “Master” mode allows the module connecting to modules with “Slave” mode, which address is send to the “Master” module with AT-command. E.g. when an Arduino board need to be connected with UART to a computer via a bluetooth module – the module should be in a  “Slave” mode.