Skip to main content

HC-05 Config Tool

GitHub Workflow Status GitHub release PyPI PyPI - Downloads PyPI - Python Version Licence

A python terminal tool for configuring HC-05 bluetooth module with AT mode

Table of content

Installation

Install with pip

$ pip3 install HC-05-ConfigTool

Manual Install (latest, but maybe unstable)

$ git clone https://github.com/Doma1204/HC-05-ConfigTool.git
$ cd HC-05-ConfigTool
$ python3 setup.py install

Run

To run the terminal tool, type the following command

$ python -m hc05config

If your computer have both Python2 and Python3, use python3

$ python3 -m hc05config

Usage

After typing the command above, you should see a panel and you are prompted to select one of the job.

Please select the following job:
1. Get basic Information of the HC-05
2. Config a HC-05
3. Set up a pair of master and slave HC-05
4. Manage preset
Please enter 1-4, or press enter to exit: 

1. Get basic Information of the HC-05

The tool retrieves and displays all the basic information of the HC-05 module. The following is a sample output.

Information of the HC-05 bluetooth module
-----------------------------------------
Name: HC-05 Bluetooth
Baud rate: 9600
Stop bit: 0
Parity bit: 0
Password: 1234
Address: ABCD:2B:1234
Version: 3.0-20170601
Role: Slave(0)
Connection mode: 1
Bind address: 0:0:0
-----------------------------------------

If the HC-05 module has not entered AT mode, the following warning message will be recieved. You should set the module to AT mode before pressing enter.

The bluetooth module have not entered AT mode yet, please fix your module and then press enter

2. Config a HC-05

The tool retrieves all the basic information of the HC-05 module and asks for item(s) to configure. The following is a sample output.

Please select the item you want to change:
1. Name: HC-05 Bluetooth
2. Baud Rate: 9600
3. Stop Bit: 0
4. Parity Bit: 0
5. Password: 1234
6. Role: 0
7. Connection Mode: 1
8. Bind Address: 0:0:0
Please enter 1-8, or press enter to exit: 

Press enter to start writing changes to the module. The configuration can be saved to a preset for later use if multiple modules are needed to be configure with same or similar configuration.

3. Set up a pair of master and slave HC-05

The tool can help set up a pair of master and slave. It can be done by using one serial port or two serial ports. You need to plug and remove the master module and slave module multiple times during the set up process if you choose to set up with one serial port.

You are prompted to enter the name of the two modules, baud rate, stop bit and parity bit for setting the pair. Follow the instructions on the display to set up the pair. Presets can also be used in the mode.

4. Manage Preset

There are serval features for managing presets.

Sample output:

Please select the following job:
1. View preset
2. Edit preset
3. Rename preset
4. Copy preset
5. Delete preset
6. Export preset
7. Import preset
Please enter 1-7, or press enter to exit: 

Follow the instructions after selecting the job to manage preset.

Sample Preset for configuring HC-05:

{
    "Name": "HC-05 Bluetooth",
    "Baud Rate": 9600,
    "Stop Bit": 0,
    "Parity Bit": 0,
    "Password": "1234",
    "Role": 0,
    "Connection Mode": 1,
    "Bind Address": "0:0:0"
}

Sample Preset for configuring master and slave pair:

{
    "Master Name": "Master",
    "Slave Name": "Slave",
    "Baud Rate": 9600,
    "Stop Bit": 0,
    "Parity Bit": 0
}

Presets are saved on the user home directory(~/.hc05config_preset). Note that uninstall the package by using pip uninstall HC-05_ConfigTool does not delete the preset file.

About HC-05 AT Mode

AT mode is the main way to config the HC-05 Bluetooth module. For the details of AT mode, please refer to the document that I found in the Internet.

This package does not fully support all HC-05 AT mode commands. The supported commands are listed below:

  • AT+VERSION
  • AT+ADDR
  • AT+NAME
  • AT+ROLE
  • AT+PSWD
  • AT+UART
  • AT+CMODE
  • AT+BIND

Change Log

For the complete changelog, please refer to CHANGELOG.md.

Version 0.1.1 - 2020-03-29

Better Preset management

Added

  • If preset is changed during HC-05 set up process, it first ask if you want to save changes to the preset.

Fixed

  • Fix Infinite loop when attempting to retrieve the name of HC-05 module with firmware version 2.x.
  • Add notification about decoding error instead of fatal error. This error usually happen when the connection between the HC-05 module and computer is unstable.

Dependencies

The tool is built on top of pyserial.

Licence

MIT Licence

Metadata

Release files for HC-05-ConfigTool 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for HC-05-ConfigTool 0.1.1
File Size Uploaded
HC-05-ConfigTool-0.1.1.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HC-05-ConfigTool 0.1.1
File Interpreter ABI Platform
HC_05_ConfigTool-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / HC-05-ConfigTool-0.1.1.tar.gz

Download URL HC-05-ConfigTool-0.1.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bcc923abc10c76cd0b1828d017b0362650094178a2677178d1a5a9232cca630e
BLAKE2b-256 checksum
How to use checksums
4bfd3ebc19e3fcfc981ce9790a9839bf5be3be881cc9af81f47aa4aa2b9dd1f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.7

Release files / HC_05_ConfigTool-0.1.1-py3-none-any.whl

Download URL HC_05_ConfigTool-0.1.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd588c6e4bc2d08de2ca792d0b37a18542569daa1a2b5d4486c14a111a9c3ea4
BLAKE2b-256 checksum
How to use checksums
ea4ee77849b36f06245400011bbd3009abb2adf8debfa0028f90f6a0fd62816c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page