Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shairport-sync configuration #98

Closed
wants to merge 1 commit into from
Closed

Conversation

firedevel
Copy link
Contributor

No description provided.

@firedevel
Copy link
Contributor Author

//	airplay_device_id_offset = 0; // (AirPlay 2 only) add this to the default airplay_device_id calculated from one of the device's MAC address
//	airplay_device_id = 0x<six-digit_hexadecimal_number>L; // (AirPlay 2 only) use this as the airplay_device_id e.g. 0xDCA632D4E8F3L -- remember the "L" at the end as it's a 64-bit quantity!

airplay_device_id is set by deafult, adding this will cause a problem.

@duhow
Copy link
Owner

duhow commented Dec 29, 2024

This was added on purpose to mitigate future issues with different MAC address appearing, as this would create multiple, different AirPlay devices, each time the speaker reboots.

MAC_ADDRESS=$(micocfg_mac | tr -d ':' | tr 'a-f' 'A-F')
sed -i "s/%MAC%/${MAC_ADDRESS}/g" ${CONF}

Can you provide details in what device and firmware base version are you having issues?

@firedevel
Copy link
Contributor Author

firedevel commented Dec 29, 2024

LX01
rootfs: 1.32.6
kernel: 3.4.39 from 1.62.2

/# uname -a
Linux LX01-2982 3.4.39 #1 SMP PREEMPT Tue Nov 28 14:33:17 UTC 2023 armv7l GNU/Linux
/# shairport-sync 
fatal error: Line 3 of the configuration file "/etc/shairport-sync.conf":
syntax error
/# cat /etc/shairport-sync.conf
general =
{
  airplay_device_id = 0x%MAC%L;
  run_this_when_volume_is_set = "/bin/volume color -q";
  dbus_service_bus = "system";
};
...

I guess this is because /etc is read-only and I think that airplay_device_id is calculated using the MAC address by default, and this configuration is not needed.

@duhow
Copy link
Owner

duhow commented Dec 29, 2024

Gotcha, then the issue is expected and I'm working on a fix.

Basically, LX01 old version 1.32.6 does not have micocfg_mac, command returns error, and config is not properly rendered, which causes this problem.

I'm working to upgrade to latest version available for LX01 1.62.6 which does include this, but meanwhile I can hotfix this for the time being.

@duhow duhow closed this Dec 29, 2024
@duhow duhow added bug Something isn't working LX01 packages labels Dec 29, 2024
@duhow
Copy link
Owner

duhow commented Dec 29, 2024

PS: you can fix this entry locally in the copied file to /data/shairport-sync.conf .

@duhow
Copy link
Owner

duhow commented Dec 29, 2024

Fixed in 45b49ea .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working LX01 packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants