Thank you for your donation!


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


Bluetooth - Paired but can't connect
#21
(07-07-2021, 12:22 AM)diist Wrote: Just came here to say I have to same problem with a fresh install of 7.3.0

What device are you connecting with?
----------------
Robert
Reply
#22
Having this same problem connecting to 7.3.0.
Android (Mi A2 - jasmine_sprout - android 10) will pair to Moode Bluetooth but the device only stays in the "Currently Connected" list for a couple of seconds and drops off.
If I try to Connect again, nothing happens - seems to just ignore the request.
I've tried removing the devices so neither know of the other, rebooting both, and repeating the pairing process but it always falls at the same hurdle.
Reply
#23
(08-28-2021, 07:42 PM)daveozzz Wrote: Having this same problem connecting to 7.3.0.
Android (Mi A2 - jasmine_sprout - android 10) will pair to Moode Bluetooth but the device only stays in the "Currently Connected" list for a couple of seconds and drops off.
If I try to Connect again, nothing happens - seems to just ignore the request.
I've tried removing the devices so neither know of the other, rebooting both, and repeating the pairing process but it always falls at the same hurdle.

I made a tiny bit of progress connecting to Moode Bluetooth (on my Pi4 - forgot to mention that bit) from android.
I activated SSH terminal and did a "sudo bluetoothctl"

I was able to pair and connect via the command line - once. 
I did:
scan on
pair XX:XX:XX:XX


It then went through the additional stage of displaying a confirmation on the phone (which it has never done before connecting from the phone or Moode).

And it successfully connected. I played some music from my phone via the Pi. Then I tested if I would still be able to connect after a reboot of the Pi - and, no, no I couldn't. I was back to connecting for a second and then disconnecting.

And now I can't connect via the command line even if I "forget XX:XX:XX:XX" and start from scratch.

After the initial pairing, I get disconnected. The subsequent "connect XX:XX:XX:XX" command return an error "failed to connect: org.bluez.error.failed"
Reply
#24
Problem is that the auto pairing seems to not be working properly. Using bluetoothctl acc. to https://www.raspberrypi.org/forums/viewt...p?t=235519:

pi@moodeaudio:~ $ bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX raspberrypi [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# quit
Agent unregistered

Seems to solve the issue, at least until the bluetooth controller is restarted.
Reply
#25
(08-31-2021, 07:26 AM)robiwan Wrote: Problem is that the auto pairing seems to not be working properly. Using bluetoothctl acc. to https://www.raspberrypi.org/forums/viewt...p?t=235519:

pi@moodeaudio:~ $ bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX raspberrypi [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# quit
Agent unregistered

Seems to solve the issue, at least until the bluetooth controller is restarted.

Ah, but when we read the sources, we find that the script /var/www/command/bt.sh has an INIT() function which executes exactly these commands when invoked with the -i option. Turning to the all-purpose module /var/www/inc/playerlib.php, we find that bt.sh -i is invoked in the function startBt() to initialize the Bluetooth controller.

This leaves me wondering why "the auto pairing seems to not be working properly", especially since it is working with all the Bluetooth-equipped devices I have on hand. So far, the answer for me is "insufficient data."

Regards,
Kent
Reply
#26
Maybe try the connect using the bt.sh command and see if there are any error messages. First make sure the Bluetooth pairing agent is turned On in Audio Config.

Code:
pi@rp1:~ $ sudo /var/www/command/bt.sh -h
** BlueMoode version 1.5
**
** Usage: bt.sh [OPTION]
** -i initialize/reset controller
** -s scan and trust devices
** -l list discovered devices
** -p list paired devices
** -c list connected devices
** -d disconnect device <MAC addr>
** -r remove paired device <MAC addr>
** -P pair with device <MAC addr>
** -C connect to device <MAC addr>
** -D disconnect all devices
** -R remove all pairings
** -h help

ETA: Actually bt.sh is not needed since the connect is initiated on the phone. The other utilities that can be used to try and see Bluetooth error messages are below. I have no idea how to interpret btmon output though.

Code:
sudo systemctl status bluetooth

pi@rp1:~ $ btmon
Bluetooth monitor ver 5.50
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#27
(08-31-2021, 07:26 AM)robiwan Wrote: Problem is that the auto pairing seems to not be working properly. Using bluetoothctl acc. to https://www.raspberrypi.org/forums/viewt...p?t=235519:

pi@moodeaudio:~ $ bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX raspberrypi [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# quit
Agent unregistered

Seems to solve the issue, at least until the bluetooth controller is restarted.

Hmm - didn't make any difference to the issue I'm having connecting - was very hopeful there though!
Reply
#28
(08-31-2021, 12:35 PM)Tim Curtis Wrote: Maybe try the connect using the bt.sh command and see if there are any error messages. First make sure the Bluetooth pairing agent is turned On in Audio Config.

Code:
pi@rp1:~ $ sudo /var/www/command/bt.sh -h
** BlueMoode version 1.5
**
** Usage: bt.sh [OPTION]
** -i initialize/reset controller
** -s scan and trust devices
** -l list discovered devices
** -p list paired devices
** -c list connected devices
** -d disconnect device <MAC addr>
** -r remove paired device <MAC addr>
** -P pair with device <MAC addr>
** -C connect to device <MAC addr>
** -D disconnect all devices
** -R remove all pairings
** -h help

ETA: Actually bt.sh is not needed since the connect is initiated on the phone. The other utilities that can be used to try and see Bluetooth error messages are below. I have no idea how to interpret btmon output though.

Code:
sudo systemctl status bluetooth

pi@rp1:~ $ btmon
Bluetooth monitor ver 5.50

Thanks I tried bt.sh anyway - the device is visible, paired, and bt.sh claims it has connected successfully ("device XX:XX:XX:XX connected") when asked (bt.sh -C), but then doesn't appear in the list of connected devices.
This is similar to what I see when trying to connect from the phone. It appears to think it has worked, but it drops off the "connected" list straight away.

I wish I knew more about bluetooth that I could give some more info on the issue.

The phone connects happily to an array of bluetooth devices (none of which are a RPi4 though)
Reply
#29
Hi!

I just wanted to add that I have the same problem.
RPi 4 (4GB) freshly set up with Moode 7.3.
Trying to connect from Pixel 3a. Pairing works, but it never connects.

Hopefully, I'll find some time to hack around this weekend.
Reply
#30
(09-23-2021, 09:29 AM)Hobbes Wrote: Hi!

I just wanted to add that I have the same problem.
RPi 4 (4GB) freshly set up with Moode 7.3.
Trying to connect from Pixel 3a. Pairing works, but it never connects.

Hopefully, I'll find some time to hack around this weekend.


You'll need to provide more information.

My Pixel 3a (up-to-date Android 11) connects without any issues. 

I did the following steps with a fresh install of moOde 7.3 and using the internal Bluetooth transceiver (this on an RPi3A which was handy but I've never seen any difference on a RPi4B).

In moOde's Audio Config screen

1) enabled Bluetooth renderer
2) enabled Pairing agent

On my Pixel 3a

1) settings -> Connected devices -> "+ Pair new device"
2) selected my moOde player Bluetooth renderer when it showed up
3) in the "Pair with..." popup, selected "Pair" without allowing access to contacts and call history.


Now in the Pixel 3a Connected devices screen I see my moOde player marked as Active under "MEDIA DEVICES". As well, the moOde UI now displays a "Bluetooth active: Pixel 3a"  overlay.

Code:
pi@moode73-3a:~ $ sudo /var/www/command/bt.sh -p
** Paired devices
**
** 58:CB:52:90:F0:74 Pixel 3a
**
pi@moode73-3a:~ $ sudo /var/www/command/bt.sh -c
** Connected devices
**
** 58:CB:52:90:F0:74 Pixel 3a
**

Regards,
Kent
Reply


Forum Jump: