Thank you for your donation!


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


Problem: Issue with Blutooth in 4.1
#11
(04-16-2018, 08:48 PM)Tim Curtis Wrote:
(04-16-2018, 08:09 PM)Tim Curtis Wrote: Hi Kent,

For reference, I just ran a clean-slate test using iPhone, iPad and an ANKER SoundCore speaker with release 4.1 on Pi-3B, 3B+ and a 0W. The only issue I ran into was that I had to turn Bluetooth OFF/ON on my iPhone in order for it to see the 0W, otherwise no issues with discovery, pairing, connecting and playing music.

Email me if you run into issues tonight :-)

-Tim

Hey Kent,

Bluetoothctl util can be used to see what Bluetooth profiles a particular paired device supports. The device needs to be paired but not connected.

Examples showing support for "Advanced Audio Distribu.." (A2DP) profile for both Anker SoundCore Speaker and iPhone.

Code:
pi@rp3:~ $ sudo bluetoothctl
Agent registered
[bluetooth]# info XX:XX:XX:XX:XX:XX
Device XX:XX:XX:XX:XX:XX (public)
        Name: Anker SoundCore
        Alias: Anker SoundCore
        Class: 0x00240404
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
[bluetooth]# 

[bluetooth]# info YY:YY:YY:YY:YY:YY
Device YY:YY:YY:YY:YY:YY (public)
        Name: Tim's iPhone
        Alias: Tim's iPhone
        Class: 0x007a020c
        Icon: phone
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: no
        LegacyPairing: no
        UUID: Vendor specific           (00000000-deca-fade-deca-deafdecacafe)
        UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
        UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
        UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v004Cp6D00d0A30
[bluetooth]# 

-Tim

Thanks. I emailed you some test results before I saw this. Expect an addendum.
Reply
#12
Hi moOde fans,
 :@
Reply
#13
(04-16-2018, 05:57 PM)TheOldPresbyope Wrote:
(04-16-2018, 04:54 PM)dbrgn Wrote: I also just tried it with the Nexus 10 Android tablet - same result.

...

@dbrgn

Running the app "Bluetooth Profiles Scanner" on my Nexus 9 tablet (Android 7.1.1), I see the two moOde r41 players I currently have running are advertising both the Advanced Audio Distribution Audio Profile (A2DP) and the Audio/Video Remote Control Profile (AVRCP). In the Bluetooth devices screen on the tablet, I see (under the gear icons) the paired players can be used for media audio.

Having said this, using the same Bluetooth source and settings, my installation of the released version of r41 doesn't seem to be playing the Bluetooth stream while an earlier r41beta version does, so I think you may be on to something.

...

Regards,
Kent

@dbrgn

So I went through several cycles of clearing and configuring moOde r4.1 and my Nexus 6P phone (Android 8.1.1) while generating test data to send to Tim. 

At some point, I discovered moOde was now playing the music being streamed over Bluetooth. However, I don't seem to be able to do this repeatedly and I broke it again trying several different Android devices (a Nexus 9 tablet running Android 7.1.1 and a Nexus 7 tablet running Android 6.0.1 over a third-party rom).

I believe the basic Bluetooth audio stack is working properly (e.g., A2DP is working as it should) but the pairing-connecting mechanism is brittle.

Regards,
Kent
Reply
#14
(04-17-2018, 01:52 AM)TheOldPresbyope Wrote:
(04-16-2018, 05:57 PM)TheOldPresbyope Wrote:
(04-16-2018, 04:54 PM)dbrgn Wrote: I also just tried it with the Nexus 10 Android tablet - same result.

...

@dbrgn

Running the app "Bluetooth Profiles Scanner" on my Nexus 9 tablet (Android 7.1.1), I see the two moOde r41 players I currently have running are advertising both the Advanced Audio Distribution Audio Profile (A2DP) and the Audio/Video Remote Control Profile (AVRCP). In the Bluetooth devices screen on the tablet, I see (under the gear icons) the paired players can be used for media audio.

Having said this, using the same Bluetooth source and settings, my installation of the released version of r41 doesn't seem to be playing the Bluetooth stream while an earlier r41beta version does, so I think you may be on to something.

...

Regards,
Kent

@dbrgn

So I went through several cycles of clearing and configuring moOde r4.1 and my Nexus 6P phone (Android 8.1.1) while generating test data to send to Tim. 

At some point, I discovered moOde was now playing the music being streamed over Bluetooth. However, I don't seem to be able to do this repeatedly and I broke it again trying several different Android devices (a Nexus 9 tablet running Android 7.1.1 and a Nexus 7 tablet running Android 6.0.1 over a third-party rom).

I believe the basic Bluetooth audio stack is working properly (e.g., A2DP is working as it should) but the pairing-connecting mechanism is brittle.

Regards,
Kent

Just to add a coda to my story.

I've now got all three Android devices connected to my moOde r41 player via BT. I can play music from any of them, and two of them, or even all three of them at the same time.

The magic seemed to be to go through the pairing and connecting process with one Android device. Then turn off the BT on that device and turn it on again, followed by reconnecting it to moOde (it's already paired at this point). After that, I could play music from it. Even better, I could now go on to pair and connect more devices and play from them immediately (e.g., without having to cycle their BT off/on).

I'll have to start again with a fresh install to see if this off/on cycling of the BT connection is reproducible. Meanwhile, all my Android devices are working fine with this moOde player.

Regards,
Kent
Reply
#15
Hi guys,
hello to everyone on this new forum.
I will tell you my story on bluetooth stack.
By default I was not able to pair any device iOS, Android or Windows devices.
On iOS I could pair but I couldn't connect, when I tried it failed and then it removed the devices.
On Windows devices I could connect but it disconnected after a while.
On Android it refuses to pair
So I did some tries starting the bluetooth stack manually and everything works flawlessy.
When I started the bluealsa service everything stops working.
So I tried to download version 1.2.0 instead of the master and everything started working.
Those are the step I used to build this version:

cd /tmp
git clone -b v1.2.0 --single-branch https://github.com/Arkq/bluez-alsa.git
cd bluez-alsa
autoreconf --install
mkdir build
cd build
../configure --disable-hcitop --with-alsaplugindir=/usr/lib/arm-linux-gnueabihf/alsa-lib
make
sudo make install
cd ~
rm -rf /tmp/bluez-alsa


Now I have a problem with the volume. When I connect to the Moode sink volume go to maximum.
Anyone has some suggestions? (I don't know if it is strictly related to the process bluealsa-aplay. In the same moment it started the volume go to 100%)
The rPi is a Pi rev B with an hifiberry amp card. The volume is set to hardware.
Reply
#16
Hi,

Automatic volume management between MPD volume (Software, Hardware, disabled) and Bluetooth inbound and outbound needs some work to get it right.

What version of moOde are u using?

Do you have time to participate in a test of release 4.2 Bluetooth?

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#17
(04-24-2018, 01:19 AM)Tim Curtis Wrote: Hi,

Automatic volume management between MPD volume (Software, Hardware, disabled) and Bluetooth inbound and outbound needs some work to get it right.

What version of moOde are u using?

Do you have time to participate in a test of release 4.2 Bluetooth?

-Tim

Hi Tim,
I'm currently using version 4.1.

O.T. I'm using a custom pipeline to build faster Moode images in order to test them easier you can retrieve from here https://github.com/badbat75/rpi_moode_build. If you want I can create a dedicated topic to explain what I did. Anyway I would be happy if you give me the opportunity to test the beta version, I don't have much time to spend, but now I'm spending my spare in that. Thank you
Reply
#18
(04-24-2018, 12:11 AM)badbat75 Wrote: Hi guys,
hello to everyone on this new forum.
I will tell you my story on bluetooth stack.
By default I was not able to pair any device iOS, Android or Windows devices.
On iOS I could pair but I couldn't connect, when I tried it failed and then it removed the devices.
On Windows devices I could connect but it disconnected after a while.
On Android it refuses to pair
So I did some tries starting the bluetooth stack manually and everything works flawlessy.
When I started the bluealsa service everything stops working.
So I tried to download version 1.2.0 instead of the master and everything started working.
Those are the step I used to build this version:
...
@badbat75
Haven't seen anyone else report this level of BT difficulty with r4.1. Tim's been using his iOS devices. I've never had a problem getting my Android (Marshmallow, Nougat, Oreo) devices to pair. I have had an issue with my Android devices then connecting with moOde but not streaming audio to it until I've disconnected and connected again. Not nearly as severe a problem as you report.
Are you running vanilla r4.1?
What was the basis for your decision to revert to a year-old release of bluez-alsa?
Inquiring minds want to know Smile
Regards,
Kent
Reply
#19
(04-24-2018, 12:15 PM)TheOldPresbyope Wrote:
(04-24-2018, 12:11 AM)badbat75 Wrote: Hi guys,
hello to everyone on this new forum.
I will tell you my story on bluetooth stack.
By default I was not able to pair any device iOS, Android or Windows devices.
On iOS I could pair but I couldn't connect, when I tried it failed and then it removed the devices.
On Windows devices I could connect but it disconnected after a while.
On Android it refuses to pair
So I did some tries starting the bluetooth stack manually and everything works flawlessy.
When I started the bluealsa service everything stops working.
So I tried to download version 1.2.0 instead of the master and everything started working.
Those are the step I used to build this version:
...
@badbat75
Haven't seen anyone else report this level of BT difficulty with r4.1. Tim's been using his iOS devices. I've never had a problem getting my Android (Marshmallow, Nougat, Oreo) devices to pair. I have had an issue with my Android devices then connecting with moOde but not streaming audio to it until I've disconnected and connected again. Not nearly as severe a problem as you report.
Are you running vanilla r4.1?
What was the basis for your decision to revert to a year-old release of bluez-alsa?
Inquiring minds want to know Smile
Regards,
Kent
Hi Kent,
yes it was vanilla r4.1.
When I saw the problems raised during the startup of the bluezalsa service I tried to understand where was the problem, but I was not able to find it.
With moode r4.0 everything was working fine, so I tried first the standard bluez package provided with raspbian (same results), then I tried the bluez 5.49 and the latest stable version of bluezalsa (1.2.0) and it worked!!! I also saw that master branch of bluezalsa is very lively: the last change is 7 hours ago now in the src folder (for example) so probably the package change at every build and probably if I generate a new build now perhaps could work...
Stability is the main reason I decided to stay stuck to 1.2.0.
Let me know what you think.
Reply
#20
(04-24-2018, 10:43 AM)badbat75 Wrote:
(04-24-2018, 01:19 AM)Tim Curtis Wrote: Hi,

Automatic volume management between MPD volume (Software, Hardware, disabled) and Bluetooth inbound and outbound needs some work to get it right.

What version of moOde are u using?

Do you have time to participate in a test of release 4.2 Bluetooth?

-Tim

Hi Tim,
I'm currently using version 4.1.

O.T. I'm using a custom pipeline to build faster Moode images in order to test them easier you can retrieve from here https://github.com/badbat75/rpi_moode_build. If you want I can create a dedicated topic to explain what I did. Anyway I would be happy if you give me the opportunity to test the beta version, I don't have much time to spend, but now I'm spending my spare in that. Thank you

Hi,

Yes, please create a dedicated thread so we can understand your nice approach to Building moOde :-)

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: