![]() |
[PROBLEM] BlueZ loses connection & pairing on restart - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [PROBLEM] BlueZ loses connection & pairing on restart (/showthread.php?tid=4645) |
BlueZ loses connection & pairing on restart - cancunia - 01-08-2022 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 RE: BlueZ loses connection & pairing on restart - Tim Curtis - 01-08-2022 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 -Tim RE: BlueZ loses connection & pairing on restart - cancunia - 01-08-2022 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. RE: BlueZ loses connection & pairing on restart - Tim Curtis - 01-08-2022 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. RE: BlueZ loses connection & pairing on restart - cancunia - 01-09-2022 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. |