We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

How to manually pair with a Bluetooth device?

asked 2019-03-23 11:11:12 +0200

Alex gravatar image

updated 2019-03-25 10:53:53 +0200

jovirkku gravatar image

I am unable to pair a Bluetooth gadget with my Sony Xperia XA2 running SFOS 3.0.2. I will receive the message that the pairing failed due to a failed authentification because SFOS does not give me the option to type in the needed pin/password for the pairing.

Is there a way to pair the device via terminal or by writing a config file?

The bluetooth gadget does support the option to initiate the pairing from itself so I have to initiate it from my SFOS device.

edit retag flag offensive close delete

4 Answers

Sort by » oldest newest most voted
4

answered 2019-03-26 01:41:19 +0200

Alex gravatar image

@peterleinchen Thanks, I just didn't find anywhere the info which package I have to install to get the bluetooth command line tool. :)

So I was able to manually pair to the Bluetooth device the following way:

devel-su
pkcon install bluez5-tools

# First activate Bluetooth in the device settings/menu and then execute:

bluetoothctl

# Activate the authentication agent to handle the PIN entry (requires root to work)
agent on

# List all available devices
scan on

# Disable the scan again
scan off

# Display the information about a device
info 00:00:00:00:00:00

# Pair with the device (wait until you can type in the pin)
pair 00:00:00:00:00:00

# Trust the device for automatic connection
trust 00:00:00:00:00:00

# Try to connect to the device
connect 00:00:00:00:00:00

# Exit the bluetooth console
exit
edit flag offensive delete publish link more

Comments

Funny, ran against the exact same problem this morning while setting up my Xa2: neither bluetoothctl nor hciconfig are installed by default anymore.

(BTW, as a reference: my post about manual parigin also using hciconfig. I've also updated with explanations how to install missing packages)

To find which package contains what, some distribution include tools to search for missing commands (e.g.: cnf from package command-not-found in openSUSE).

In Sailfish, there is a (not install by default either) package called PackageKit-command-not-found. You can then /usr/libexec/pk-command-not-found{missing command} and it will suggest packages to install.

DrYak ( 2019-03-29 14:52:16 +0200 )edit
1

answered 2019-03-23 12:26:34 +0200

tbellemb gravatar image

Hello, this happens this some bluethooth devices. Just use the bluethoothctl command line program that will ask for your pin.

edit flag offensive delete publish link more
1

answered 2019-03-23 12:37:02 +0200

g gravatar image

The receiving device must have the option to start a connection, otherwise you will not be able to establish the connection. First, I would try to find the intructions of the reciving device to identify how to start tge pairing process. I had the same error message as you on a soundlink mini. However, in my case I had already set the receiving device to start the pairing process. The way I succeded was to make my xa2 discoverable and tried a couple of additionnal attempts. Despite the error message I successfully paired the two devices. I hope this helps. Good luck!

edit flag offensive delete publish link more
1

answered 2019-03-23 12:55:15 +0200

Did you not find any of the already existing Bluetooth pairing related questions during creation lf this one?

I would start reading here https://together.jolla.com/question/200340/unable-to-pair-with-bluetooth-headphones-authenticationpasscode-error/ and continue with the provided link. Maybe you need to install package bluez5-tools manually (I had to).

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-03-23 11:11:12 +0200

Seen: 1,583 times

Last updated: Mar 26 '19