Thank you for your donation!


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


Problem: Can't connect SPDIF/BT transmitter to moOde
#1
Hello,

I have an UGREEN CM150 BT transmitter to connect the optical output of my smart TV to moOde via BT. When I scan BT devices with moOde, CM150 appears in the list, I can click the pair button then connect but it also immediately disconnects. Could it be something like a compatibility problem with supported BT codecs ?

I have tested the CM150 with the embedded BT of my Airpulse A100 and Edifier S880DB active speakers and it works well, both support AptX. Any advice please ?

Thanks,
Romain
Reply
#2
Suffice it to say that Bluetooth issues are difficult to troubleshoot.

Maybe once it's paired but before its connected try the command below to see if it shows something interesting.

Code:
bluealsa-aplay -l
bluealsa-aplay -L

pi@moode:~ $ bluealsa-aplay --help
Usage:
 bluealsa-aplay [OPTION]... [BT-ADDR]...

Options:
 -h, --help            print this help and exit
 -V, --version         print version and exit
 -v, --verbose         make output more verbose
 -l, --list-devices    list available BT audio devices
 -L, --list-pcms       list available BT audio PCMs
 -B, --dbus=NAME       BlueALSA service name suffix
 -D, --pcm=NAME        playback PCM device to use
 --pcm-buffer-time=INT playback PCM buffer time
 --pcm-period-time=INT playback PCM period time
 --profile-a2dp        use A2DP profile (default)
 --profile-sco         use SCO profile
 --single-audio        single audio mode

Note:
If one wants to receive audio from more than one Bluetooth device, it is
possible to specify more than one MAC address. By specifying any/empty MAC
address (00:00:00:00:00:00), one will allow connections from any Bluetooth
device. Without given explicit MAC address any/empty MAC is assumed.
pi@moode:~ $

Other thoughts:

- Try a different Class or Controller mode in /etc/bluetooth/main.conf.
- Try the btmon command
- Try a full manual pair/connect using bluetoothctl
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
That’s a clever little device I could press into use here too. If you ever get it working with moOde please let us know what kind of latency you experience.

As for debugging, the mfr’s website is poorly documented but from one of its partially-in-English images I infer the device supports A2DP1.3 and AVRCP1.6 as well as SBC/AAC and aptX. That should work. I think I’d start at the bottom of Tim’s list with bluetoothctl and work my way up as needed.

Regards,
Kent

PS Amazon says it’s out of stock indefinitely, sigh. I’m not eager to deal directly with overseas orders.
Reply
#4
(01-09-2023, 01:05 PM)TheOldPresbyope Wrote: That’s a clever little device I could press into use here too. If you ever get it working with moOde please let us know what kind of latency you experience.

As for debugging, the mfr’s website is poorly documented but from one of its partially-in-English images I infer the device supports A2DP1.3 and AVRCP1.6 as well as SBC/AAC and aptX. That should work. I think I’d start at the bottom of Tim’s list with bluetoothctl and work my way up as needed.

Regards,
Kent

PS Amazon says it’s out of stock indefinitely, sigh. I’m not eager to deal directly with overseas orders.

Sure I'll let you know, thanks !
Reply
#5
(01-09-2023, 12:20 PM)Tim Curtis Wrote: Suffice it to say that Bluetooth issues are difficult to troubleshoot.

Maybe once it's paired but before its connected try the command below to see if it shows something interesting.

Code:
bluealsa-aplay -l
bluealsa-aplay -L

pi@moode:~ $ bluealsa-aplay --help
Usage:
 bluealsa-aplay [OPTION]... [BT-ADDR]...

Options:
 -h, --help            print this help and exit
 -V, --version         print version and exit
 -v, --verbose         make output more verbose
 -l, --list-devices    list available BT audio devices
 -L, --list-pcms       list available BT audio PCMs
 -B, --dbus=NAME       BlueALSA service name suffix
 -D, --pcm=NAME        playback PCM device to use
 --pcm-buffer-time=INT playback PCM buffer time
 --pcm-period-time=INT playback PCM period time
 --profile-a2dp        use A2DP profile (default)
 --profile-sco         use SCO profile
 --single-audio        single audio mode

Note:
If one wants to receive audio from more than one Bluetooth device, it is
possible to specify more than one MAC address. By specifying any/empty MAC
address (00:00:00:00:00:00), one will allow connections from any Bluetooth
device. Without given explicit MAC address any/empty MAC is assumed.
pi@moode:~ $

Other thoughts:

- Try a different Class or Controller mode in /etc/bluetooth/main.conf.
- Try the btmon command
- Try a full manual pair/connect using bluetoothctl

Hello Tim,

I can pair and connect manually the CM150 with bluetoothctl and the btmon shows traffic between the transmitter and moOde BT however I can't hear anything :\
I've changed the BT CoD too in /etc/bluetooth/main.conf to 0x200408 (HiFi Audio Device), 0x200414 (Loudspeaker) and 0x200418 (Headphones) without success.

*BUT* if I connect my smartphone to moOde BT simultaneously to the CM150 I can hear the sound of my TV !?
Reply
#6
(01-10-2023, 07:58 AM)romain Wrote:
(01-09-2023, 12:20 PM)Tim Curtis Wrote: Suffice it to say that Bluetooth issues are difficult to troubleshoot.

Maybe once it's paired but before its connected try the command below to see if it shows something interesting.

Code:
bluealsa-aplay -l
bluealsa-aplay -L

pi@moode:~ $ bluealsa-aplay --help
Usage:
 bluealsa-aplay [OPTION]... [BT-ADDR]...

Options:
 -h, --help            print this help and exit
 -V, --version         print version and exit
 -v, --verbose         make output more verbose
 -l, --list-devices    list available BT audio devices
 -L, --list-pcms       list available BT audio PCMs
 -B, --dbus=NAME       BlueALSA service name suffix
 -D, --pcm=NAME        playback PCM device to use
 --pcm-buffer-time=INT playback PCM buffer time
 --pcm-period-time=INT playback PCM period time
 --profile-a2dp        use A2DP profile (default)
 --profile-sco         use SCO profile
 --single-audio        single audio mode

Note:
If one wants to receive audio from more than one Bluetooth device, it is
possible to specify more than one MAC address. By specifying any/empty MAC
address (00:00:00:00:00:00), one will allow connections from any Bluetooth
device. Without given explicit MAC address any/empty MAC is assumed.
pi@moode:~ $

Other thoughts:

- Try a different Class or Controller mode in /etc/bluetooth/main.conf.
- Try the btmon command
- Try a full manual pair/connect using bluetoothctl

Hello Tim,

I can pair and connect manually the CM150 with bluetoothctl and the btmon shows traffic between the transmitter and moOde BT however I can't hear anything :\
I've changed the BT CoD too in /etc/bluetooth/main.conf to 0x200408 (HiFi Audio Device), 0x200414 (Loudspeaker) and 0x200418 (Headphones) without success.

*BUT* if I connect my smartphone to moOde BT simultaneously to the CM150 I can hear the sound of my TV !?

Very odd.

You could also try the script that's used by the UI.

Code:
pi@moode:~ $ sudo /var/www/util/blu-control.sh --help
** blu-control.sh version 1.6
**
** Bluetooth has a range of around 30 feet (10 meters) but range
** will vary depending on obstacles (metal, wall, etc.), device signal
** strength and quality, and level of electromagnetic interferrence.
**
** Usage: blu-control.sh [OPTION]
**
** -i Initialize/reset controller
** -s Scan (BR/EDR only) and trust devices
** -S Scan (LE and BR/EDR) and trust devices
** -p List paired devices
** -c List connected devices
** -l List trusted 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 devices
** -h Help
pi@moode:~ $

I assume that you are trying to send audio from your TV to moOde. In that case verify that the Pairing Agent is on in the Bluetooth section of Renderers and that Audio output is set to "Local audio" in Bluetooth Control.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
(01-10-2023, 12:42 PM)Tim Curtis Wrote:
(01-10-2023, 07:58 AM)romain Wrote:
(01-09-2023, 12:20 PM)Tim Curtis Wrote: Suffice it to say that Bluetooth issues are difficult to troubleshoot.

Maybe once it's paired but before its connected try the command below to see if it shows something interesting.

Code:
bluealsa-aplay -l
bluealsa-aplay -L

pi@moode:~ $ bluealsa-aplay --help
Usage:
 bluealsa-aplay [OPTION]... [BT-ADDR]...

Options:
 -h, --help            print this help and exit
 -V, --version         print version and exit
 -v, --verbose         make output more verbose
 -l, --list-devices    list available BT audio devices
 -L, --list-pcms       list available BT audio PCMs
 -B, --dbus=NAME       BlueALSA service name suffix
 -D, --pcm=NAME        playback PCM device to use
 --pcm-buffer-time=INT playback PCM buffer time
 --pcm-period-time=INT playback PCM period time
 --profile-a2dp        use A2DP profile (default)
 --profile-sco         use SCO profile
 --single-audio        single audio mode

Note:
If one wants to receive audio from more than one Bluetooth device, it is
possible to specify more than one MAC address. By specifying any/empty MAC
address (00:00:00:00:00:00), one will allow connections from any Bluetooth
device. Without given explicit MAC address any/empty MAC is assumed.
pi@moode:~ $

Other thoughts:

- Try a different Class or Controller mode in /etc/bluetooth/main.conf.
- Try the btmon command
- Try a full manual pair/connect using bluetoothctl

Hello Tim,

I can pair and connect manually the CM150 with bluetoothctl and the btmon shows traffic between the transmitter and moOde BT however I can't hear anything :\
I've changed the BT CoD too in /etc/bluetooth/main.conf to 0x200408 (HiFi Audio Device), 0x200414 (Loudspeaker) and 0x200418 (Headphones) without success.

*BUT* if I connect my smartphone to moOde BT simultaneously to the CM150 I can hear the sound of my TV !?

Very odd.

You could also try the script that's used by the UI.

Code:
pi@moode:~ $ sudo /var/www/util/blu-control.sh --help
** blu-control.sh version 1.6
**
** Bluetooth has a range of around 30 feet (10 meters) but range
** will vary depending on obstacles (metal, wall, etc.), device signal
** strength and quality, and level of electromagnetic interferrence.
**
** Usage: blu-control.sh [OPTION]
**
** -i Initialize/reset controller
** -s Scan (BR/EDR only) and trust devices
** -S Scan (LE and BR/EDR) and trust devices
** -p List paired devices
** -c List connected devices
** -l List trusted 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 devices
** -h Help
pi@moode:~ $

I assume that you are trying to send audio from your TV to moOde. In that case verify that the Pairing Agent is on in the Bluetooth section of Renderers and that Audio output is set to "Local audio" in Bluetooth Control.

Yes Tim that's it. Pairing agent is on and audio output is well set to "Local Audio". I'll try the script, thanks
Reply
#8
(01-10-2023, 12:42 PM)Tim Curtis Wrote:
(01-10-2023, 07:58 AM)romain Wrote:
(01-09-2023, 12:20 PM)Tim Curtis Wrote: Suffice it to say that Bluetooth issues are difficult to troubleshoot.

Maybe once it's paired but before its connected try the command below to see if it shows something interesting.

Code:
bluealsa-aplay -l
bluealsa-aplay -L

pi@moode:~ $ bluealsa-aplay --help
Usage:
 bluealsa-aplay [OPTION]... [BT-ADDR]...

Options:
 -h, --help            print this help and exit
 -V, --version         print version and exit
 -v, --verbose         make output more verbose
 -l, --list-devices    list available BT audio devices
 -L, --list-pcms       list available BT audio PCMs
 -B, --dbus=NAME       BlueALSA service name suffix
 -D, --pcm=NAME        playback PCM device to use
 --pcm-buffer-time=INT playback PCM buffer time
 --pcm-period-time=INT playback PCM period time
 --profile-a2dp        use A2DP profile (default)
 --profile-sco         use SCO profile
 --single-audio        single audio mode

Note:
If one wants to receive audio from more than one Bluetooth device, it is
possible to specify more than one MAC address. By specifying any/empty MAC
address (00:00:00:00:00:00), one will allow connections from any Bluetooth
device. Without given explicit MAC address any/empty MAC is assumed.
pi@moode:~ $

Other thoughts:

- Try a different Class or Controller mode in /etc/bluetooth/main.conf.
- Try the btmon command
- Try a full manual pair/connect using bluetoothctl

Hello Tim,

I can pair and connect manually the CM150 with bluetoothctl and the btmon shows traffic between the transmitter and moOde BT however I can't hear anything :\
I've changed the BT CoD too in /etc/bluetooth/main.conf to 0x200408 (HiFi Audio Device), 0x200414 (Loudspeaker) and 0x200418 (Headphones) without success.

*BUT* if I connect my smartphone to moOde BT simultaneously to the CM150 I can hear the sound of my TV !?

Very odd.

You could also try the script that's used by the UI.

Code:
pi@moode:~ $ sudo /var/www/util/blu-control.sh --help
** blu-control.sh version 1.6
**
** Bluetooth has a range of around 30 feet (10 meters) but range
** will vary depending on obstacles (metal, wall, etc.), device signal
** strength and quality, and level of electromagnetic interferrence.
**
** Usage: blu-control.sh [OPTION]
**
** -i Initialize/reset controller
** -s Scan (BR/EDR only) and trust devices
** -S Scan (LE and BR/EDR) and trust devices
** -p List paired devices
** -c List connected devices
** -l List trusted 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 devices
** -h Help
pi@moode:~ $

I assume that you are trying to send audio from your TV to moOde. In that case verify that the Pairing Agent is on in the Bluetooth section of Renderers and that Audio output is set to "Local audio" in Bluetooth Control.

Hello,

here are the results of the tests I've made with the blu-control.sh script.

1. CM150 successfully pairs and connects according to the script (-p, -c and -l) but there's no sound from my moOde device and no BT overlay when I connect to moOde's web interface as if there were no BT source connected

2. If I connect another BT source, computer or smartphone, script output (-p, -c and -l) shows the CM150 and the other source, I can see the BT overlay with CM150 and the other device listed when I go to moOde's web interface and I can listen to the TV

3. If I disconnect the other BT source, sound stops and BT overlay disappears in moOde's interface whereas the CM150 is still connected according to the script

I hope my explanations are clear enough.

Thanks,
Romain

P.S. the CM150 is detected as UG-SPDIF-TX in moOde, I hope the dashes in the device name are not a problem
Reply
#9
The result of step 1 suggests that bluealsa-aplay has not been started by Bluetooth or has crashed. It's the player that Bluetooth launches when a client connection is successfully established and is what moOde looks for to trigger displaying the BT overlay screen.

After step 1 you can try:
bluealsa-aplay -l or --help for more options.

Also if it's not running (pgrep bluealsa-aplay = blank) you can try to run it manually using the MAC address of the CM150 to see if it prints any errors.
sudo systemctl start bluealsa-aplay@MAC_ADDR
systemctl status ...
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
Probably ought to repeat the blueasla-aplay -l command after step 2 also.
Reply


Forum Jump: