Thank you for your donation!


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


Problem: BlueZ loses connection & pairing on restart
#1
I'm running 7.6.1 on a Pi Zero W

Streaming from radio to MPD to Bluetooth amp. All works ok when setup via BlueZ, pairing and connection without issue.

Problem is that when I restart from the power menu, the BT connection is lost as is the BT pairing. It has to be restored via the BlueZ config, then all works ok again. 

Is this the expected way for things to work or am I missing a setting somewhere?

Thanks
Reply
#2
Currently there is no code for reconnecting Bluetooth device at startup but maybe its something that could be done for moOde 8 series providing the reconnection can be reliably automated.

You will need to do some command line testing to see what works for your situation then report back.

Below is the utility that needs to be used (bt.sh).

Code:
pi@rp1:~ $ sudo /var/www/command/bt.sh --help
** 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
pi@rp1:~ $

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Not exactly sure what you want me to test, but it seems to work fine.

1, Scan & Trust
2, Connect
3, All devices removed via -R
4, repeat 1&2

After connection, streaming via BT works fine.
Reply
#4
I would try the following:

- First pair and connect via BlueZ Config
- Note the Mac address of the device being connected
- Reboot

From command line

bt.sh -C MAC_ADDRESS

Thats all that should be needed since the paring would already have been established and stored.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
Thanks for the suggestions, it seems to work mostly as you expected I'll take a bit more time to test.

A couple of observations so far:
1, The -R option removes the discovered device list as well as pairings
2, I could not get my Pi Zero to pair with my Anker Soundcore, it would discover ok, but pairing would hang both the command line & GUI. The soundcore works fine with my phone.
Reply


Forum Jump: