You are not logged in.

#1 2014-03-04 20:25:49

emes
Member
Registered: 2014-01-28
Posts: 19

Cannot create serial bluetooth connection

Hi,

I have an Arduino-based device equipped with HC-05 Bluetooth module, which should allow serial communication.
The device is being detected, but connecting attempts always fail:

~:$ bluetoothctl
[NEW] Controller 00:0E:A1:00:A1:77 cortado [default]
[NEW] Device 18:86:AC:D5:0A:32 18-86-AC-D5-0A-32
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:0E:A1:00:A1:77 Discovering: yes
[NEW] Device 00:14:01:14:18:88 HC-05
[bluetooth]# pair 00:14:01:14:18:88
Attempting to pair with 00:14:01:14:18:88
[CHG] Device 00:14:01:14:18:88 Connected: yes
[CHG] Device 00:14:01:14:18:88 UUIDs has unsupported type
Pairing successful
[CHG] Device 00:14:01:14:18:88 Connected: no
[bluetooth]# trust 00:14:01:14:18:88
[CHG] Device 00:14:01:14:18:88 Trusted: yes
Changing 00:14:01:14:18:88 trust succeeded
[bluetooth]# connect 00:14:01:14:18:88
Attempting to connect to 00:14:01:14:18:88
[CHG] Device 00:14:01:14:18:88 Connected: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:14:01:14:18:88 Connected: no
[bluetooth]# info 00:14:01:14:18:88
Device 00:14:01:14:18:88
	Name: HC-05
	Alias: HC-05
	Class: 0x001f00
	Paired: no
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: yes
	UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)

The same happens on two of my Arch machines.
As the tool gives very little information, I have no idea what exactly org.blues.Error.NotAvailable means.
Is there any way to get more verbose info on what is happening there?

Offline

#2 2014-03-05 08:37:41

longcao
Member
Registered: 2013-10-28
Posts: 15

Re: Cannot create serial bluetooth connection

I assume that you need to:

1) Pair the HC-05 module.
2) Create a serial communication to that module.

1)To pair a module using bluetoothctl, follow the wiki's instruction:
Configuration via the CLI
I have a HC-06 module and succeeded pairing it. Maybe you should try "discoverable on" option if your module is configured as master.
And if you prefer automatically pairing for future use, please enter "trust <device's MAC>".

2)To create a serial communication:

sudo modprobe rfcomm
sudo rfcomm bind rfcomm0 <device's MAC>

If there's no problem or error, you would see a device "rfcomm0" under your /dev.

ls /dev |grep rfcomm
rfcomm0

3)Profit!!! big_smile

Note: I suggest using cutecom as a hyperterminal alternative for Arch Linux. You need to add yourself to uucp group to run cutecom without root

sudo gpasswd -a <username> uucp

Last edited by longcao (2014-03-05 08:38:28)

Offline

#3 2014-11-06 20:40:38

Neldar
Member
Registered: 2014-10-23
Posts: 11

Re: Cannot create serial bluetooth connection

Hello,

I have the same issue, I can't get my hands-free kit to work. I want to use it with skype or whatever, but when I try to connect it, i've got:

[bluetooth]# connect 0C:E0:E4:3A:D6:ED 
Attempting to connect to 0C:E0:E4:3A:D6:ED
[CHG] Device 0C:E0:E4:3A:D6:ED Connected: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 0C:E0:E4:3A:D6:ED Connected: no
[bluetooth]# info 0C:E0:E4:3A:D6:ED 
Device 0C:E0:E4:3A:D6:ED
	Name: PLT_ML20
	Alias: PLT_ML20
	Class: 0x200404
	Icon: audio-card
	Paired: yes
	Trusted: yes
	Blocked: no
	Connected: no
	LegacyPairing: no
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)

I did your manipulation, and I have

`--> sudo modprobe rfcomm

`--> sudo rfcomm bind rfcomm0 0C:E0:E4:3A:D6:ED

`--> ls /dev |grep rfcomm
rfcomm0

But I can't get it to work as an audio device, it still make when I try to connect it:

[bluetooth]# connect 0C:E0:E4:3A:D6:ED
[CHG] Device 0C:E0:E4:3A:D6:ED Connected: yes
[CHG] Device 0C:E0:E4:3A:D6:ED Connected: no

what am I doing wrong?

Thanks in advance smile

Offline

#4 2014-11-06 21:15:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Cannot create serial bluetooth connection

Neldar wrote:

what am I doing wrong?

Spamming the boards with your issue, for one. Don't cross post: https://wiki.archlinux.org/index.php/Fo … ss-Posting and don't necrobump: https://wiki.archlinux.org/index.php/Fo … Bumping.27



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB