Raspberry Pi
Bluetooth serial link with an HC05

This article describes the solution adopted to set up a Bluetooth serial link between a Raspberry Pi and an HC05 module. This allows me to connect the FT857 radio via Bluetooth to the Raspberry Pi.

The different steps:

  • Pair the HC05 module,
  • Get the module’s MAC address,
  • Declare a series link on Bluetooth,
  • Create connection/disconnection commands from the module,
  • Install those commands in the raspberry Pi’s Main Menu.

1 HC06 module pairing

This step is done from the Raspberry Pi taskbar

Select “Make Discoverable
“Select “Add Device”

Select the HC06 module (here ft857) and then enter the pin code

The module is paired but the serial link interface is not a standard service.

2 Get the module’s MAC address

Open a command window and type

The module address (98:D3:32:11:28:DD) is recovered

The series link service is declared on Channel 1. (I’m not sure it’s necessary)

sdptool add –channel-1 SP

3 Creating login/disconnection commands

Two command files were created in the directory /etc/systemd/user:
– connectFT857BT,
– disconnectFT857BT.

connectFT857BT contains:
sudo rfcomm connect rfcomm0 98:D3:32:11:28:DD 1 > /dev/null 2>&1 &

1 is the channel number.
The device created is /dev/rfcomm0. It will have to be selected in a CAT software like Flrig for example.

connectFT857BT contains:
sudo rfcomm release 0

For each file we execute the command sudo chmod 777 file_nane

4 Inserting commands into the Raspberry Pi OS menu

Select Main Menu Editor

Commands were placed in the Other item

Click On New Element

Give a name, click Browse to select the command file and Validate

After those actions the orders will appear in the menu

73 by Philippe F6CZV

Leave a Reply

Your email address will not be published. Required fields are marked *