joerg-krause writes

How about starting the Songcast Sender mode using scctl?

This way, the Sender mode can be enabled on the command line. Of course, I can start the Sender mode by calling the scmakesender script or an external script by hand, but I would appreciate to use scctl as I’m about to write a [luvit](https://luvit.io)-powered command line tool which is communicating with scctl running as server (started with the -S option) over the socket.

medoc92 writes

Starting the sender is just a normal Source select call actually. I wonder if adding stuff to scctl is the right approach. It was mostly written to support scweb.

Have you taken a look at this script: https://github.com/medoc92/upcmd/blob/master/upcmd.sh ?

I could add an option for upexplorer -l (or scctl for that matter, any libupnpp-based c++ program will do) to print out the IP and port for the renderers (because the shell script does not do discovery), and then it’s really easy to send upnp commands using the script (or any script language actually. If it can be done in /bin/sh…). You could probably do it directly from lua.

Actually, there is already a setSourceIndex sample with upcmd

joerg-krause writes

I did not know about upcmd.sh. It’s a handy tool for configuring a remote device. For setting up a local device, I prefer the scctl approach using a socket. Local meaning in the sense of upmpdcli, scctl, and the HTTP server are running on the same machine.

The command line tool I mentioned above is more like a helper tool for testing. The actual tool is an HTTP server providing an abstraction for the user. The user can uses simple commands like "list songcast devices", "enable sender mode", "connect to sender …", "disable sender mode", etc.

For this, the HTTP server is communicating with scctl using the socket.

For now, I’ve extendend libupnpp and scctl with a new option -i/-I (i for index) so I can use something like: scctl -i <renderer > <source index > or scctl -I <renderer > <source name > to enable/disable the Sender service.

In my opinion scctl is a nice tool to set up all Songcast related stuff…

medoc92 writes

No problem, I’ll gladly merge your scctl code when you are ready.

I’m surprised that you had to modify libupnpp ?

joerg-krause writes

> No problem, I'll gladly merge your scctl code when you are ready.

Thanks!

> I'm surprised that you had to modify libupnpp ?

I’ve added something like setSourceIndexByName(render_name, source_name) function to linnsongcast.

medoc92 writes

setSourceIndexByName() would rather belong in ohProduct.cxx if we are to modify the lib. Or leave it in scctl for now maybe. No worries, I’ll think of the best way when merging.

joerg-krause writes

Sorry for the long delay!

I’ve opened two PRs to allow setting the source index with scctl:

medoc92 writes

Now in current git code (needs branch 0.16 of the lib)

joerg-krause writes

Thanks!