minisatip
minisatip copied to clipboard
[BUG] Master/Slave doesn't work with SAT>IP servers (satipc module)
Hi @catalinii ,
When using the parameter -S --slave with the satipc module (with the -s --satip-servers) the control of the SLAVE tuners doesn't work. In fact, no control is running, so with a simple -S 1:0 and two different SAT>IP servers, the parameter has no action.
As I've discovered, that the problem appears when the adapter is initialized. The code seems to require that the attributes old_pol, old_hiband and old_diseqc of the adapter/master are set. However, these values are only initialized in the function dvb_tune(). So for satipc adapters these values have the default -1 value. And then all checks of the function compare_slave_parameters() fail.
Any idea to fix this?
Hi @catalinii ,
From my point of view the function satipc_tune(): https://github.com/catalinii/minisatip/blob/8560d85492ec0da56d0c33456dd818a7b2adee0d/src/satipc.c#L1438
requires to add some MASTER/SLAVE checks, like you do in the function dvb_tune() when call to setup_switch() like here:
https://github.com/catalinii/minisatip/blob/261069a4bc7daaaac768a66926bf75ac87bf77c8/src/dvb.c#L640
However, as this code is yours I prefer you provide a solution. My environment is using more than one E2 boxes running minisatip as the SAT>IP server connected to the same wire. So I'm running another central minisatip instance in my Linux server to drive all of them at the same time. So, I need to control the MASTER/SLAVE mode over the satipc module.
Please, can you help to fix this miss implementation? Thank you.