[arm-allstar] Switching controlstate

Doug Crompton wa3dsp at gmail.com
Tue Jan 14 14:25:28 EST 2020


Unfortunately Allstar has revamped their documentation and is using new
URL's that are complicated to find by searching. It use to be you could
Google search for topics very easily but now most lead to broken URL's.
Anyhow here is the info...

controlstates allows you to combine a number of commands into one and
assign a number to the action that you would then use a cop command to
change to that state. You need the

controlstates=controlstates

command in your node definition.  Also the definition can be to a specific
node number so you can have multiple controlstate stanzas like

controlstates=controlstates50000

In this case you would need a controlstates stanza of that name -

[controlstates50000]

Below is the data - each state has a COP command but also a mnemonic that
can be combine in the controlstate statement and then controlled as a whole
by switching states with cop 14 change system state. So you could have a
function defined like

880=cop,14,0    to set control state 0
881=cop,14,1    to set control state 1

DTMF *880 or *881  would then change to those states.

See all below....


*73 Doug*

*WA3DSP*

*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
Controlstates=

This setting defines the name of the variable named
<https://wiki.allstarlink.org/wiki/Structure_of_Config_Files> control state
stanza. Control states are an optional feature which allows groups of
control operator commands to be executed all at once. To use control
states, define an entry in your node stanzas to point to a dedicated
control state stanza like this:

controlstates = controlstates   ; points to control state stanza


[controlstates]
0 = rptena,lnkena,apena,totena,ufena,noicd  ; Normal operation
1 = rptena,lnkena,apdis,totdis,ufena,noice  ; Net and news operation
2 = rptena,lnkdis,apdis,totena,ufdis,noice  ; Repeater only operation

Control States Stanza

There are several predefined nmemonics (keywords) used in the control state
stanza to enable and disable the various features of the controller. These
nmemonics correspond to the control operator command to be executed and
most of these are the same groups of letters sent back when a single
control operator command is executed on the controller.
Nmemonic Description COP Method
rptena Repeater Enable 2
rptdis Repeater Disable 3
totena Timeout Timer Enable 7
totdis Timeout Timer Disable 8
apena Autopatch Enable 9
apdis Autopatch Disable 10
lnkena Link Enable 11
lnkdis Link Disable 12
skena Scheduler Enable 15
skdis Scheduler Disable 16
ufena User Functions Enable 17
ufdis User Functions Disable 18
atena Alternate Hangtime Enable 19
atdis Alternate Hangtime Disable 20
noice No Incoming Connections Enable 49
noicd No Incoming Connections Disable 50
slpen Sleep Mode Enable 51
slpds Sleep Mode Disable 52


COP Commands

Control operator (functionclass 'cop') commands are privileged commands.
Node admins may provide some of these to their user community based on
personal preference.

Sample:

99 = cop,7   ; enable timeout timer

Some COP commands can take multiple parameters. For example this COP 48
would send #3#607 on command.

900 = cop,48,#,3,#,6,0,7

COP Description
1 System warm boot
2 System enable
3 System disable
4 Test Tone On/Off
5 Dump System Variables on Console (debug)
6 PTT (phone mode only)
7 Time out timer enable
8 Time out timer disable
9 Autopatch enable
10 Autopatch disable
11 Link enable
12 Link disable
13 Query System State
14 Change System State
15 Scheduler Enable
16 Scheduler Disable
17 User functions (time, id, etc) enable
18 User functions (time, id, etc) disable
19 Select alternate hang timer
20 Select standard hang timer
21 Enable Parrot Mode
22 Disable Parrot Mode
23 Birdbath (Current Parrot Cleanup/Flush)
24 Flush all telemetry
25 Query last node un-keyed
26 Query all nodes keyed/unkeyed
27 Reset DAQ minimum on a pin
28 Reset DAQ maximum on a pin
30 Recall Memory Setting in Attached Xcvr
31 Channel Selector for Parallel Programmed Xcvr
32 Touchtone pad test: command + Digit string + # to playback all digits
pressed
33 Local Telemetry Output Enable
34 Local Telemetry Output Disable
35 Local Telemetry Output on Demand
36 Foreign Link Local Output Path Enable
37 Foreign Link Local Output Path Disable
38 Foreign Link Local Output Path Follows Local Telemetry
39 Foreign Link Local Output Path on Demand
42 Echolink announce node # only
43 Echolink announce node Callsign only
44 Echolink announce node # & Callsign
45 Link Activity timer enable
46 Link Activity timer disable
47 Reset "Link Config Changed" Flag
48 Send Page Tone (Tone specs separated by parenthesis)
49 Disable incoming connections (control state noice)
50 Enable incoming connections (control state noicd)
51 Enable sleep mode
52 Disable sleep mode
53 Wake up from sleep
54 Go to sleep
55 Parrot Once if parrot mode is disabled
56 Rx CTCSS Enable
57 Rx CTCSS Disable
58 Tx CTCSS On Input only Enable
59 Tx CTCSS On Input only Disable
60 Send MDC-1200 Burst (cop,60,type,UnitID[,DestID,SubCode])

Type is 'I' for PttID, 'E' for Emergency, and 'C' for Call (SelCall or
Alert), or 'SX' for STS (ststus), where X is 0-F. DestID and subcode are
only specified for the 'C' type message. UnitID is the local systems
UnitID. DestID is the MDC1200 ID of the radio being called, and the
subcodes are as follows: Subcode '8205' is Voice Selective Call for Spectra
('Call') Subcode '8015' is Voice Selective Call for Maxtrac ('SC') or
Astro-Saber('Call') Subcode '810D' is Call Alert (like Maxtrac 'CA')
61 Send Message to USB to control GPIO pins (cop,61,GPIO1=0[,GPIO4=1].....)
62 Send Message to USB to control GPIO pins, quietly
(cop,62,GPIO1=0[,GPIO4=1].....)
63 Send pre-configred APRSTT notification (cop,63,CALL[,OVERLAYCHR])
64 Send pre-configred APRSTT notification, quietly
(cop,64,CALL[,OVERLAYCHR])
65 Send POCSAG page (equipped channel types only)


On Tue, Jan 14, 2020 at 2:02 PM "KY220GROUP--- via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> I have searched and can't come up with an answer, at least one my mind can
> understand. I have a control state set up for nets within rpt.conf but
> can't figure out how to implement it. I assume I can change states by
> schedule or cron. I think that cop 14 does the switching but how is the
> command line set up for switching from controlstate 0 to controlstate 2 and
> back? Sorry for an elementary question but I'm a newbie and trying to
> learn. Thanks & 73 Tim - KK4WH
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
>


More information about the ARM-allstar mailing list