Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: Bluetooth never pairs
#1
Hello. Pairing with 6 digit PIN never success. Phone keep asking pin again and again. 
Pairing with None suceeds, but then fails to connect second time. Read some info about sspmode and just gave up, seems like just protocol incompatibility in rpi bt software.
How to manually pair my phone and turn off discovery and guard with pin so just my already paired devices are trusted and listed as auto-connect?
#2
Doesn't work from my iPhone either but when this option was introduced in the initial 9.0.0 release back in May some users reported it was working for their Android phone.

The pairing agent being used is bt-agent from the bluez-tools package
https://packages.debian.org/bookworm/bluez-tools
https://github.com/khvzak/bluez-tools

There is also another custom developed pairing agent in the source tree that was used prior to 9.0.0 and the switch to bt-agent. The file is  /var/www/daemon/blu-agent.py. It didn't work for PIN code pairing either when I tested it.

I don't have much bluetooth expertise but maybe another dev that knows the bluetooth stack and pairing protocols can provide some insights.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#3
(07-27-2024, 12:51 PM)Tim Curtis Wrote: Doesn't work from my iPhone either but when this option was introduced in the initial 9.0.0 release back in May some users reported it was working for their Android phone.

The pairing agent being used is bt-agent from the bluez-tools package
https://packages.debian.org/bookworm/bluez-tools
https://github.com/khvzak/bluez-tools

There is also another custom developed pairing agent in the source tree that was used prior to 9.0.0 and the switch to bt-agent. The file is  /var/www/daemon/blu-agent.py. It didn't work for PIN code pairing either when I tested it.

I don't have much bluetooth expertise but maybe another dev that knows the bluetooth stack and pairing protocols can provide some insights.

I don't have much bluetooth expertise either so take the following for what it's worth.

- Pixel 6a, Android 14 - connects when I enter the 6-diit PIN I preset in moOde.

- iPhone SE, iOS 17.5.1 - does not connect when I enter the 6-digit PIN

- iPad 9.7, iPadOS 17.5.1 - does not connect when I enter the 6-digit PIN

All three show up in moOde's Bluetooth Control screen when I ask to "LIST paired" devices.

Same result if I delete all devices, start the BT process over, and try to connect only the iPhone SE: no connection.

Regards,
Kent
#4
Hello, did you manage to find any solution? I can't pair anything actually: I have a Raspberry Pi 3B, but impossible to pair (failure) and then Moode Audio is stuck. I can't do anything but rebooting the Pi.

I managed to use bluetooth in the past with my laptop, not anymore with Moode 9.
#5
(11-18-2024, 03:37 PM)sisim Wrote: Hello, did you manage to find any solution? I can't pair anything actually: I have a Raspberry Pi 3B, but impossible to pair (failure) and then Moode Audio is stuck. I can't do anything but rebooting the Pi.

I managed to use bluetooth in the past with my laptop, not anymore with Moode 9.


You haven't given any details. I feel like I'm missing something since I don't know how one could make moOde become "stuck" after a failed attempt to pair with a Bluetooth device.

Are you trying to use a Bluetooth PIN code for authentication of the connecting device? Did you try connecting without setting a PIN (displayed in the webUI as "None")? Works for me with 64-bit moOde 9.1.4 on Zero 2W, 3A+, 3B, 3B+, 4B, 5B.


As an aside, its always better to start a new thread rather than tailgate on a zombie one. If necessary you can include links to old threads.


Regards,
Kent
#6
Hello, 
I have faced the same problem as you using the MoOde version 9.1.5 on a raspberry pi 4.
My observation is that in version 9.1.5 the PA can not be enabled/disabled from the UI.
My approach was to comment out the line : #ExecStart=/usr/bin/bt-agent -c NoInputNoOutput inside /etc/systemd/system/bt-agent.service file.
Also in file: /var/www/daemon/worker.php I have commented out the same line that calls bt-agent.

My workaround is to start the bt-agent from command line whenever I need to add a new bluetooth device. Luckly for me should not happen often.

But adding the PairingAgent enable/disable in the web-ui would help a lot.

Thank you and best regards.
#7
(12-05-2024, 06:08 PM)radu022003 Wrote: Hello, 
I have faced the same problem as you using the MoOde version 9.1.5 on a raspberry pi 4.
My observation is that in version 9.1.5 the PA can not be enabled/disabled from the UI.
My approach was to comment out the line : #ExecStart=/usr/bin/bt-agent -c NoInputNoOutput inside /etc/systemd/system/bt-agent.service file.
Also in file: /var/www/daemon/worker.php I have commented out the same line that calls bt-agent.

My workaround is to start the bt-agent from command line whenever I need to add a new bluetooth device. Luckly for me should not happen often.

But adding the PairingAgent enable/disable in the web-ui would help a lot.

Thank you and best regards.

If the agent is stopped your your client may connect but Moode "Bluetooth Active" screen won't appear and bluealsa won't play any audio because bt-agent is needed to complete the client connection setup which results in bluealsa-aplay (the audio player) being started.

IIRC @TheOldPresbyope successfully tested PIN code pairing on his Android devices. My tests with IOS failed.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#8
Yup. See post 3 in this thread.
#9
(12-05-2024, 08:10 PM)TheOldPresbyope Wrote: Yup. See post 3 in this thread.

lol, too lazy to scroll up ;-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
#10
(12-05-2024, 08:02 PM)Tim Curtis Wrote:
(12-05-2024, 06:08 PM)radu022003 Wrote: Hello, 
I have faced the same problem as you using the MoOde version 9.1.5 on a raspberry pi 4.
My observation is that in version 9.1.5 the PA can not be enabled/disabled from the UI.
My approach was to comment out the line : #ExecStart=/usr/bin/bt-agent -c NoInputNoOutput inside /etc/systemd/system/bt-agent.service file.
Also in file: /var/www/daemon/worker.php I have commented out the same line that calls bt-agent.

My workaround is to start the bt-agent from command line whenever I need to add a new bluetooth device. Luckly for me should not happen often.

But adding the PairingAgent enable/disable in the web-ui would help a lot.

Thank you and best regards.

If the agent is stopped your your client may connect but Moode "Bluetooth Active" screen won't appear and bluealsa won't play any audio because bt-agent is needed to complete the client connection setup which results in bluealsa-aplay (the audio player) being started.

IIRC @TheOldPresbyope successfully tested PIN code pairing on his Android devices. My tests with IOS failed.

I totally believe you, but I tested this "process" with 3 different devices and it works. Today I tested with the fourth device (Android) and the android was not connecting to MoOde over bluetooth when connection was initiated from Android. When connection was initiated from MoOde, connection was successful. The previously paired devices are still working, when bt-agent is stopped.
Perhaps I have forgotten some steps ...


Forum Jump: