Rotate Node Connections

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Rotate Node Connections

Fever Havannah
HI guys,

I have a (quite long) list of nodes I connect to based on the time of
day every day ... at the moment I am doing it manually ...

Is there a way I SvxLink can do this automatically instead?

Thank You
Danny
ZS6XOX

------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rotate Node Connections

Fever Havannah
HI,

I think I have to expand on the question a little better ...

Every day I manually connect or disconnect to different nodes all over
the world depending on the time of day ... at the moment I am doing it
either via RF (DTMF) or I stop svxlink (via ssh if I am too far from my
QTH) ... edit ModuleEcholink.conf ... and start svxlink again ...

Is there a way svxlink can do this for me automatically?

I hope this is a better explanation ... ;) ...

Danny

On 30/12/2015 21:46, Danny wrote:

> HI guys,
>
> I have a (quite long) list of nodes I connect to based on the time of
> day every day ... at the moment I am doing it manually ...
>
> Is there a way I SvxLink can do this automatically instead?
>
> Thank You
> Danny
> ZS6XOX


------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rotate Node Connections

Rob Janssen
Danny wrote:

> HI,
>
> I think I have to expand on the question a little better ...
>
> Every day I manually connect or disconnect to different nodes all over
> the world depending on the time of day ... at the moment I am doing it
> either via RF (DTMF) or I stop svxlink (via ssh if I am too far from my
> QTH) ... edit ModuleEcholink.conf ... and start svxlink again ...
>
> Is there a way svxlink can do this for me automatically?
>
> I hope this is a better explanation ... ;) ...
>
> Danny
>
>
When you start svxlink not as a daemon, it will read from stdin and interpret the
input in the same way as it interprets DTMF keys.
So when you write a small program or script that outputs the proper DTMF sequences
for making and breaking the connections you like at the proper time of day, you can
start it and provide output to svxlink:

yourprogram | svxlink --the usual svxlink options except --daemon &

It is a bit of a hack.  It would be very useful when svxlink got some API that allows
control commands to be sent to it when it is running in daemon mode.  This is discussed
on github in issue #136.

Rob

------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rotate Node Connections

Martin Burkhardt
Hi Danny,

A few month ago I have done exactly what you want to do. I use screen since that day. But one big disadvantage is that you loose the svxlink logging capebility. Anyway screen can also write a log. But I don't know how and I don't use or need a log. For debuging purposes I run svxlink right in the terminal.

First thing you have to do is make your repeater (assuming that you want to control a repeater) open on DTMF *.

That woul be all regarding your configuration.

On my Debian system I had to modify /etc/rc.local to start svxlink in screen (wich of course has to be installed before).

The code to start svxlink in screen is the following:
#####################################
screen -Smd svxlink
screen -S svxlink -X stuff $'su svxlink\n'
screen -S svxlink -X stuff $'svxlink\n'
#####################################

The first creates a screen named svxlink.
The second command changes the username to svxlink (executing as root is not helpful nor recommened, but it would work).
The third command starts svxlink.

If you now would like to check what is going on on your repeater do "screen -r svxlink".
That will resume the svxlink session running in backgroud. Now you can interact with svxlink as if it is running on console mode.

Executing a command on a special day and time I use cron.

Do "crontab -e" and add the commands you would like to execute in the following manner.

#######################################
minute hour dom mon dow command
0,30 8,16 * * 1-5 /usr/bin/screen -S svxlink -X stuff $'*2#255411#'
#######################################

For googleing purposes I will explain how what the lines above are doing.

0,30 Executes the command at minutes 0 and 30. I there is no hour dom mon or dow is given the command ist executet every 30 minutes. By the way */15 will execute the command every 15 minutes.

8,16 makes the command beeing executet at 8 am and 4 pm the rest ist the same as for the minutes.

dom is only used if you would like to execute the command only on a specific day of month

mon same as dom but here you specify the month its self.

dow is the day of the week. 1 is monday 7 is sunday (at least on my system, but I have seen other systems where the week starts with 0 and ends with 6). In my example the command is only executed from Monday (1) till Friday (5).

Last thing is regarding the command as you can see I have put an asterisk before the 2#. That is verry important since the repeater might be down when the command is executed and in down state the repeater is does not execute the given DTMF commands.

If you have any further questions feel free to ask.
--
Mit freundlichen Grüßen

Martin Burkhardt

> Am 01.01.2016 um 10:22 schrieb Rob Janssen <[hidden email]>:
>
> Danny wrote:
>> HI,
>>
>> I think I have to expand on the question a little better ...
>>
>> Every day I manually connect or disconnect to different nodes all over
>> the world depending on the time of day ... at the moment I am doing it
>> either via RF (DTMF) or I stop svxlink (via ssh if I am too far from my
>> QTH) ... edit ModuleEcholink.conf ... and start svxlink again ...
>>
>> Is there a way svxlink can do this for me automatically?
>>
>> I hope this is a better explanation ... ;) ...
>>
>> Danny
>>
>>
> When you start svxlink not as a daemon, it will read from stdin and interpret the
> input in the same way as it interprets DTMF keys.
> So when you write a small program or script that outputs the proper DTMF sequences
> for making and breaking the connections you like at the proper time of day, you can
> start it and provide output to svxlink:
>
> yourprogram | svxlink --the usual svxlink options except --daemon &
>
> It is a bit of a hack.  It would be very useful when svxlink got some API that allows
> control commands to be sent to it when it is running in daemon mode.  This is discussed
> on github in issue #136.
>
> Rob
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Svxlink-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel

------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rotate Node Connections

Fever Havannah
Hi Martin,

Just for interest sake I tried it the way you explained ... it works
like a charm ... thank you

Problem is however that I need the log files ... I have scripts parsing
svxlink's log files which I use do other things with ..

The way Rob suggested looks feasible ... I am going to try that next ...

Thank you for your effort ...

Danny

On 01/01/2016 15:15, Martin Burkhardt wrote:

> Hi Danny,
>
> A few month ago I have done exactly what you want to do. I use screen since that day. But one big disadvantage is that you loose the svxlink logging capebility. Anyway screen can also write a log. But I don't know how and I don't use or need a log. For debuging purposes I run svxlink right in the terminal.
>
> First thing you have to do is make your repeater (assuming that you want to control a repeater) open on DTMF *.
>
> That woul be all regarding your configuration.
>
> On my Debian system I had to modify /etc/rc.local to start svxlink in screen (wich of course has to be installed before).
>
> The code to start svxlink in screen is the following:
> #####################################
> screen -Smd svxlink
> screen -S svxlink -X stuff $'su svxlink\n'
> screen -S svxlink -X stuff $'svxlink\n'
> #####################################
>
> The first creates a screen named svxlink.
> The second command changes the username to svxlink (executing as root is not helpful nor recommened, but it would work).
> The third command starts svxlink.
>
> If you now would like to check what is going on on your repeater do "screen -r svxlink".
> That will resume the svxlink session running in backgroud. Now you can interact with svxlink as if it is running on console mode.
>
> Executing a command on a special day and time I use cron.
>
> Do "crontab -e" and add the commands you would like to execute in the following manner.
>
> #######################################
> minute hour dom mon dow command
> 0,30 8,16 * * 1-5 /usr/bin/screen -S svxlink -X stuff $'*2#255411#'
> #######################################
>
> For googleing purposes I will explain how what the lines above are doing.
>
> 0,30 Executes the command at minutes 0 and 30. I there is no hour dom mon or dow is given the command ist executet every 30 minutes. By the way */15 will execute the command every 15 minutes.
>
> 8,16 makes the command beeing executet at 8 am and 4 pm the rest ist the same as for the minutes.
>
> dom is only used if you would like to execute the command only on a specific day of month
>
> mon same as dom but here you specify the month its self.
>
> dow is the day of the week. 1 is monday 7 is sunday (at least on my system, but I have seen other systems where the week starts with 0 and ends with 6). In my example the command is only executed from Monday (1) till Friday (5).
>
> Last thing is regarding the command as you can see I have put an asterisk before the 2#. That is verry important since the repeater might be down when the command is executed and in down state the repeater is does not execute the given DTMF commands.
>
> If you have any further questions feel free to ask.
> --
> Mit freundlichen Grüßen
>
> Martin Burkhardt
>
>> Am 01.01.2016 um 10:22 schrieb Rob Janssen <[hidden email]>:
>>
>> Danny wrote:
>>> HI,
>>>
>>> I think I have to expand on the question a little better ...
>>>
>>> Every day I manually connect or disconnect to different nodes all over
>>> the world depending on the time of day ... at the moment I am doing it
>>> either via RF (DTMF) or I stop svxlink (via ssh if I am too far from my
>>> QTH) ... edit ModuleEcholink.conf ... and start svxlink again ...
>>>
>>> Is there a way svxlink can do this for me automatically?
>>>
>>> I hope this is a better explanation ... ;) ...
>>>
>>> Danny
>>>
>>>
>> When you start svxlink not as a daemon, it will read from stdin and interpret the
>> input in the same way as it interprets DTMF keys.
>> So when you write a small program or script that outputs the proper DTMF sequences
>> for making and breaking the connections you like at the proper time of day, you can
>> start it and provide output to svxlink:
>>
>> yourprogram | svxlink --the usual svxlink options except --daemon &
>>
>> It is a bit of a hack.  It would be very useful when svxlink got some API that allows
>> control commands to be sent to it when it is running in daemon mode.  This is discussed
>> on github in issue #136.
>>
>> Rob
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Svxlink-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/svxlink-devel
> ------------------------------------------------------------------------------
> _______________________________________________
> Svxlink-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/svxlink-devel


------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel
Reply | Threaded
Open this post in threaded view
|

Re: Rotate Node Connections

Rob Janssen
Danny wrote:

> Hi Martin,
>
> Just for interest sake I tried it the way you explained ... it works
> like a charm ... thank you
>
> Problem is however that I need the log files ... I have scripts parsing
> svxlink's log files which I use do other things with ..
>
> The way Rob suggested looks feasible ... I am going to try that next ...
>
> Thank you for your effort ...
>
> Danny
>

Of course my method is essentially the same as this one but the screen solution is
elegant because you don't have to write a special program like I suggested.

When you want the logfile, you can start svxlink with the --logfile= parameter that is
also passed when starting it from /etc/init.d/svxlink.   Just do not pass the --daemon
option.

Rob

------------------------------------------------------------------------------
_______________________________________________
Svxlink-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/svxlink-devel