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