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.
![](https://f6czv.fr/wp-content/uploads/2021/03/image-12-1024x252.png)
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
![](https://f6czv.fr/wp-content/uploads/2021/03/image.png)
Select “Make Discoverable
“Select “Add Device”
![](https://f6czv.fr/wp-content/uploads/2021/03/image-1.png)
Select the HC06 module (here ft857) and then enter the pin code
![](https://f6czv.fr/wp-content/uploads/2021/03/image-2.png)
![](https://f6czv.fr/wp-content/uploads/2021/03/image-3.png)
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
![](https://f6czv.fr/wp-content/uploads/2021/03/image-4.png)
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
![](https://f6czv.fr/wp-content/uploads/2021/03/image-5.png)
Commands were placed in the Other item
![](https://f6czv.fr/wp-content/uploads/2021/03/image-6.png)
Click On New Element
![](https://f6czv.fr/wp-content/uploads/2021/03/image-7.png)
Give a name, click Browse to select the command file and Validate
After those actions the orders will appear in the menu
![](https://f6czv.fr/wp-content/uploads/2021/03/image-8.png)
73 by Philippe F6CZV