I've now configured the 4B to replicate my 3B+, ready to switch it over into my amplifier enclosure. I have 9 buttons, each with a short and long press, so I have quite a long string to define all the button commands in sbpd:
Code: -------------------- sbpd -v -d -f /home/tc/sbpd_commands.cfg b,27,POWR,2,0,RSRT,2000 b,23,PREV,2,0,PLAY,500 b,22,MIX-,2,0,MUTE,500 b,24,PAUS,2,0,STOP,500 b,25,MIX+,2,0,VMAX,500 b,12,NEXT,2,0 b,19,PRE1,2,0,PRE4,500 b,13,PRE2,2,0,PRE5,500 b,16,PRE3,2,0,PRE6,500 -------------------- This turns out to be close to the maximum length of string (255) that can be accommodated in the User Commands section of pCP. So it doesn't allow me enough characters to define the player's MAC address for instance (which I'd like to do to guarantee that the buttons on the front of the amplifier only affect the player connected to the amplifier's DAC). I've tried to get around this by putting the sbpd command string into a script file and then executing that script file from the user commands section, but I haven't been able to get that to work. I'd like it to run as a daemon, exactly as the above code, but I found I needed to add an ampersand to the end of the command in the script file (otherwise pCP/LMS ran very slowly), and even after doing that the buttons did not seem to work, even with a 'sudo' before the command. The command configuration seemed to be set up correctly according to the on-screen messages, but the buttons didn't work. So two questions. 1) How can I put that string into a script file? Or, 2) Is there any chance that the limit of 255 characters could be raised a bit? I guess that's coming from the pCP interface, but is there any limit to the length of the sbpd parameter string? ------------------------------------------------------------------------ chill's Profile: http://forums.slimdevices.com/member.php?userid=10839 View this thread: http://forums.slimdevices.com/showthread.php?t=110727 _______________________________________________ unix mailing list unix@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/unix