mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-19 09:06:14 +00:00
The speaker's GroupService state machine uses the presence of <senderIPAddress> in the addGroup payload to decide whether it should form the group as master or join as slave: "SenderIp is provided, I am the slave". Sending the same XML to both speakers (with senderIP set to the master's IP) made the master also conclude it was the slave, enter AddingSlave, time out after 5 s waiting for a master that never confirmed, and revert. The slave briefly showed GROUP_OK before following the master back to NoGroup -- the "stereo pair appears for a few seconds, then disappears" symptom reported in #252. Send two distinct payloads from propagateAddGroup: the master receives the base request with no senderIPAddress, the slave receives a copy with senderIPAddress set to the master's IP. The base request built by createGroup no longer carries senderIPAddress; the per-role injection is contained inside propagateAddGroup where the master/slave roles are unambiguous. Update TestPropagateAddGroup_BothSucceed to assert the master's body has no <senderIPAddress> while the slave's body does, so any future regression on either side fails the test. Refs #252 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>