Failed to pair: org.bluez.Error.AlreadyExists [closed] - bluetooth

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed last year.
Improve this question
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

I have Linux Mint 2020. I faced with the same Failed to pair: org.bluez.Error.AlreadyExists message.
Solution:
Uninstall the basic bluetooth (bluez) software in linux, then reboot
Install 'blueman-applet', then voila
https://www.maketecheasier.com/setup-bluetooth-in-linux/
It solved my BT sound system issue.
Kind regards,
Balázs

Related

HFP/HSP profile in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have Ubuntu 16.04 and already installed BlueZ 5.37, PulseAudio 10.0, and ofono 1.20 (clone from github).
And I need to use phone like modem for transmitting my phone calls to computer. I paired my telephone with PC, made device trust and connect (all actions are successfully). I think problem with ofono, because I can play music (which use the A2DP) but if i want use hends free or headset profile - I have no sound on PC.
In pacmd (PulseAudio console tool) list-cards I see my bluetooth device, but Headset Audio Gateway HFP/HSP is not avalible. Also I tested it on different devices and computers.
Thank you in advice.
I've solved in this way:
Install ofono
In /etc/pulse/default.pa find the line load-module module-bluetooth-discover and change it to load-module module-bluetooth-discover headset=ofono.
If the user pulse is not a member of group bluetooth, then add it: sudo useradd -g bluetooth pulse
VERY IMPORTANT: add this to /etc/dbus-1/system.d/ofono.conf before </busconfig>:
<policy user="pulse">
<allow send_destination="org.ofono"/>
</policy>
See: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/
The good news: Now in pavucontrol I can see that the profile changes automatically from A2DP to HSP / HFP if I make a phone call, and then it magically returns to A2DP!
The bad news: it works only one time per booting (and checking if ofonod is running), then I have to reboot my Debian system.
My Solution:
I just found my solution in Fedora 26, using Plantronics Legend and Pluggable Bluetooth USB, after a lot of searching.
I am going back through my history, and updating threads with my solution where I can. This worked for me, direct from Plugable (which is the USB module I am using).
See this post: plugable-usb-bluetooth-adapter-solving-hfphsp-profile-issues-on-linux
Command Summary per Above Link:
wget https://s3.amazonaws.com/plugable/bin/fw-0a5c_21e8.hcd
sudo mkdir /lib/firmware/brcm
sudo mv fw-0a5c_21e8.hcd /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd
sudo cp /lib/firmware/brcm/BCM20702A0-0a5c-21e8.hcd /lib/firmware/brcm/BCM20702A1-0a5c-21e8.hcd
Then reboot.
HSP/HFP Profile not available for Bluetooth headset in Fedora 20, was available in Fedora 19 change the device and test it again
SOLVING HFP/HSP AND A2DP PROFILE ISSUES ON LINUX

Can one connect an USB-hub to the ethernet port? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
My system:
2x USB 2.0
1x 1000MBit Ethernet
Wifi
OS: Linux
I want to connect an usb-hub, but plugging it into the usb 2.0 is super slow. Is there a possibility to connect the usb-hub to the ethernet port? I am anyway only using Wifi for Internet. I don't care which Linux distribution to use as long as I can write images to sd-cards with it.
Google-"Research" only gives me "usb -> to -> ethernet" adapters but no usb-hubs pluggable into ethernet.
Thank you very much for any help :-)
is not possible because of the structure of USB protocol. USB requires a host device (normally the pc) and in an ethernet driver can never be implemented USB host functionality with reasonable effort. A USB hub is a device
ethernet-over-USB uses the USB CDC class and emulates an ethernet port (eth0,...) to the os. From the viewpoint of USB protocol in this case the structure is clear. pc is USB host Ethernet-over-USB adapter is USB device.
An ethernet port does not even know what an USB device is (protocol structure) and it does not even have the physical interface...

Setting up Bluetooth automatic pairing on Linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I want to use any mobile phone to connect to a IoT device via Bluetooth Classic with the serial port protocol (SPP). The IoT device has no screen and no keyboard, and it's supposed to accept connections automatically as long as the connecting phone knows a secret PIN (ie, I don't want to be forced to ssh into the IoT device to set up pairing every time a new mobile phone tries to connect).
These are the commands that I've run so far on the IoT device:
# Make the device discoverable:
hciconfig hci0 piscan
# Register SPP:
sdptool add --channel=22 SP
# Start rfcomm:
rfcomm -r watch /dev/rfcomm0 22
Unfortunately, I couldn't find any way to set up a PIN, and pairing fails when I try to connect with a mobile phone. In addition, the device is only discoverable for a short interval.
How do I configure the IoT device's Bluetooth stack (running a recent Bluez) to auto pair with any phone that knows a given PIN, and how do I make the discovery period eternal?
If anyone happens upon this question, to use (much of) the BlueZ "BT Management Sockets" C API directly from bash, try:
btmgmt --help
btmgmt add-device, btmgmt find, btmgmt discov, etc.
You can run an application which implements BlueZ DBus API. I recommands BlueZ >= 5.42.
Use the agent interface and implements your own PIN code.
After registring your agent, bluez will automaticaly call and use you own agent when a pairing is asked.
Moreover, you can set the DiscoverableTimeout to 0 through DBus with org.bluez.Adapter1 interface.
"A value of zero
means that the timeout is disabled and it will stay in
discoverable/limited mode forever."
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt (dbus adapter object doc)
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/agent-api.txt (dbus agent object doc)
https://kernel.googlesource.com/pub/scm/bluetooth/bluez/+/5.44/test/simple-agent (sample)
http://www.bluez.org/bluez-5-api-introduction-and-porting-guide/ (read at the bottom)

How to force Wi-Fi adapter to use specific channel [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am trying to force the Wi-Fi adapter to use a specific channel while connecting to the access point which supports both 2.4 GHz and 5 GHz (WPA authentication).
I am using the following configuration:
OS: Raspbian
Model: Raspberry Pi 2 Model B
Wi-Fi Adapter: Edimax EW-7811UTC
Driver: 8812au
I also tried with a different Wi-Fi adapter: Asus USB-N53 using driver rt2800.
Tried with iwconfig which is giving SET failed on device wlan0 ; Operation not supported.
Also tried wpa_supplicant.
What extra arguments need to be given to the wpa_cli or wpa_supplicant utility so that the Wi-Fi adapter will connect only to the specific band?
look for your interface
sudo iwconfig
look at your channels
sudo iwlist {interface} channel
turn off wifi
sudo iwconfig {interface} power off
set your desired channel
sudo iwconfig {interface} channel {channel, ex. "23"}
set your desired frequency
sudo iwconfig {interface} freq {frequency, ex. "5.00G"}
turn on wifi
sudo iwconfig {interface} power on
You can't do that. The channel is selected automatically in the 2.4 or 5GHz band because the channel depends on your router: The router selects a channel and your client simply uses it. There is no way for the client to tell the router "please switch to band 13".
The 2.4 and 5GHz bands are usually selected by the network name; your router should offer two WLAN names.

Arduino Uno Bluetooth Communication with Mac [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm trying to create an Arduino bluetooth remote that can connect with my Mac (and potentially other devices) and basically transmit a few distinct signals back and forth at the push of a button (or Arduino pushbutton). I want to create a remote to control a web app I've built, basically a controller for a game.
I have an Arduino Uno Rev3 starter kit, an RN-42 bluetooth module & a 1sheeld from Google Play, and a Macbook Pro.
Could anyone suggest good guides or online tutorials that can help me set up the communication from Arduino to my computer? Or does anyone have experience with this and would be able to give me some tips?
It's relatively straightforward.
bind the arduino bluetooth to your mac bluetooth.
use Serial.* print commands. Normally these go to your computer via USB, but if you have the Bluetooth connected it will go over the Bluetooth connection.
the default baud rate of most bluetooth devices is 9600 baud.
So, develop your code the same way as if you were connected via Serial over USB, and it will work without change when you attach the Bluetooth.
Note: Typically USB and Bluetooth will use the same pins, so you can only use one or the other, not both at the same time.

Resources