Fix Bluetooth bonding and record verified headphone relay fix
One-shot bluetoothctl pairing exited before SSP finished, leaving the headphone paired but not bonded, so it was lost on reboot. Pair inside a single bluetoothctl session with a persistent agent, and clear temporary pairings first. Document that SBC medium + 500 ms buffer removed the iPhone -> Radxa -> headphone dropouts, verified by listening and logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,8 +69,11 @@ class ManagerTests(unittest.TestCase):
|
||||
def test_bond_request_must_not_report_temporary_pair_as_success(self):
|
||||
def fake(*args, **kwargs):
|
||||
return subprocess.CompletedProcess(args,0,stdout='Paired: yes\nBonded: no')
|
||||
with patch.object(m,'root'),patch.object(m,'run',side_effect=fake) as run:
|
||||
with patch.object(m,'root'),patch.object(m,'run',side_effect=fake) as run, \
|
||||
patch.object(m,'agent_pair') as agent:
|
||||
with self.assertRaises(ValueError):m.pair('AA:BB:CC:DD:EE:FF',output=True,bond=True)
|
||||
agent.assert_called_once_with('AA:BB:CC:DD:EE:FF')
|
||||
self.assertTrue(any('remove' in call.args for call in run.call_args_list))
|
||||
self.assertFalse(any('trust' in call.args for call in run.call_args_list))
|
||||
|
||||
def test_bond_request_keeps_existing_bond(self):
|
||||
|
||||
Reference in New Issue
Block a user