Bluetooth module HC04/HC06 configuration tool

HC04 bluetooth moduleThese small and cheap CSR BC417143 based wireless Bluetooth transceiver modules are widely used in all kind of embedded projects. They are intended for serial communication and preloaded with serial port profile (SPP) firmware.

The module has user configurable parameters like Device name, Pairing PIN and Serial speed. In most cases the default values of these parameters should be changed (at least Pairing PIN code) to suit your application. It is done by entering special AT commands when the module it is not remotely connected to any other bluetooth device.

Late in 2013 I've created this bluetooth module configuration tool to simplify bluetooth module configuration by avoid dealing with AT commands. So it's fairly old but still useful.
 

Bluetooth module configuration tool

Bluetooth module configuration tool (hc04conf) is a command line utility for quick an easy configuration of Bluetooth transceiver modules connected to the serial port (or USB to serial converter) of your machine. It works on Windows, Linux and Mac OS X systems. 

Supported bluetooth modules are HC04/HC06, permanently programmed as a slave devices (aka "linvor"), possibly HC-07 and HC-09.

Using hc04conf, you can configure pairing PIN, bluetooth device name, and serial baud rate of the connected bluetooth module.

Another useful feature of the hc04conf program is the ability to automatically detect serial baud rate of the connected module. It helps when dealing with unknown or misconfigured modules.

 

Examples

1. Detect serial baud rate and print hardware version of the module connected to /dev/ttyUSB0.

bash-4.2$ hc04conf --port /dev/ttyUSB0
No baud rate given. Autodetecting... 9600
Version: linvorV1.5

bash-4.2$

 

2.  Set pairing PIN (4455) and device name ("bluetooth device") of the module connected to /dev/ttyUSB0. Autodetect serial baud rate.

bash-4.2$ hc04conf --port /dev/ttyUSB0 --set-name "bluetooth module" --set-pin 4455
No baud rate given. Autodetecting... 9600
Version: linvorV1.5
Setting name... done.
Setting PIN... done.
bash-4.2$

 

3. Set new serial baud rate (115200) of the module connected  to COM12 at 9600 baud.

C:\hcconf-1.0-1>hc04conf.exe -p com12 -b 9600 --set-baud 115200
Version: linvorV1.5
Setting baud rate... done.

C:\hcconf-1.0-1>

 

Usage

Download

Download and install the appropriate package for your system.

Windows

Supported all Windows versions from XP to 10, including servers (x86/x64). Statically linked binary, no dependencies.

hcconf-1.0-1.zip md5 hash: 5eefcc784b93e3c9c2480070ef401ecf

Debian/Ubuntu packages (.deb)

32bit (x86) hcconf-1.0-1_i386.deb md5 hash: d9a3e03feafcb73d29532ec85c466d05

64bit (amd64) hcconf-1.0-1_amd64.deb md5 hash: 31560623594131063fa5538bbad644dd

Raspberry pi (armhf) hcconf-1.0-1_armhf.deb md5 hash: 342006123c6b5d626f7399883dd6d131

Generic statically linked linux builds

32bit (x86) hcconf-1.0-1_i386.tar.gz md5 hash: b8202841105be76b79452fcefc39b527

64bit (amd64) hcconf-1.0-1_amd64.tar.gz md5 hash: d2b1d4039b91c99bf6f66838962b28f6

Raspberry pi (armhf) hcconf-1.0-1_armhf.tar.gz md5 hash: d78018a0304500076b87340348f461b9

Mac OS X

Supported Mac OS X 10.5 or a later. Universal i386 and x86_64 binary.

hcconf-1.0-1_mpkg.zip md5 hash: 2fd3bc30e97e06c4047bf5cd345e35ef
 

Known issues

Support for unicode characters in bluetooth name is broken on Windows.
 

Source code

Not available so far. Probably I will publish the sources as soon as I find free time to clean-up them.
 

License and Disclaimer

This software is freeware. Permission is granted to use this software for personal and commercial purposes.

DISCLAIMER
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 

Credits

hcconf is written in C++ and uses the following third party libraries:

 

Add new comment