2

I am trying to connect a HC-05 Bluetooth Module (connected to Arduino Uno) to my Raspberry Pi 3 in the hopes of achieving bluetooth communication between the two to send data from the Uno to the Pi.

Trying to use Bluetoothctl to pair, connect and trust the HC-05 device seems to fail for me.

[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# scan on
[CHG] Device 98:D3:31:FB:6F:F1 LegacyPairing: yes
[CHG] Device 98:D3:31:FB:6F:F1 RSSI: -43

[bluetooth]# pair 98:D3:31:FB:6F:F1
Attempting to pair with 98:D3:31:FB:6F:F1
[CHG] Device 98:D3:31:FB:6F:F1 Connected: yes
Request PIN code
[agent] Enter PIN code: 1234
[CHG] Device 98:D3:31:FB:6F:F1 Paired: yes
Pairing successful
[CHG] Device 98:D3:31:FB:6F:F1 Connected: no

[bluetooth]# connect 98:D3:31:FB:6F:F1
Attempting to connect to 98:D3:31:FB:6F:F1
[CHG] Device 98:D3:31:FB:6F:F1 Connected: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 98:D3:31:FB:6F:F1 Connected: no

[bluetooth]# trust 98:D3:31:FB:6F:F1
[CHG] Device 98:D3:31:FB:6F:F1 Trusted: yes
Changing 98:D3:31:FB:6F:F1 trust succeeded

Here is the info prompt.

[bluetooth]# info 98:D3:31:FB:6F:F1
Device 98:D3:31:FB:6F:F1
        Name: HC-05
        Alias: HC-05
        Class: 0x001f00
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: yes
        UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)

Specifically the error I am getting is "Failed to connect: org.bluez.Error.NotAvailable"

I am not sure how to get pass this error and I am unable to complete my project without confirming a linked bluetooth signal between the two microprocessors.

Thanks, Aditya

2

Try to install the blueman pack using sudo apt-get install blueman, or, if you have it installed, try

sudo apt remove blueman
sudo apt update
sudo apt upgrade
sudo apt-get install blueman

After one of this processes, run blueman or go to the Menu > Preferences > Bluetooth Mananger, then, search HC-05, add it to the Trust List, insert the password (normally 1234 or 0000) and connect it by clicking Configure.

If the problem persists, the problem is with the HC-05 module, try to connect it to an Android, if it doesn't connect, you will need to buy a new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.