12. Setting up the G-SWITCH-22 commands
Multi-user capability (300 phone numbers)
It is important to note that the memory of the
G-SWITCH-22
GSM
module is limited to 300 phone numbers. In other words a maximum of
300 phone numbers can be registered on the system at any one time.
Each phone number can be configured uniquely with respect to inputs
and outputs, as well as activation and notification messages. Each
phone number can be assigned a limited number of uses for each
output.
When the memory limit is reached, trying to add new phone numbers
will not overwrite or affect the existing numbers stored into the
system. It will just not be possible to add the additional numbers.
p.xxxx.
AP
.08412
34567.OU1.IN2.
”In2 Text“
Adds phone number 0841234567 to the system,
and sets a missed call from this number to trigger
Output 1. It also assigns Input 2 to be monitored.
In the event that Input 2 is triggered, the message
specified in “In2 Text” will be sent to this number.
EP. Editing a phone
Description
Parameters
Phone number (up to 14 digits)
OU1
Activates Output 1
DOU1
Deletes Output 1
OU2
Activates Output 2
DOU2
Deletes Output 2
IN1
Activates Input 1
DIN1
Deletes Input 1
IN2
Activates Input 2
DIN2
Deletes Input 2
DIN1S
Deletes Input 1 string
DIN2S
Deletes Input 2 string
DOU1S
Deletes Output 1 string
DOU2S
Deletes Output 2 string
Sub-Parameters
Output text string (1-50 characters)
Input text string (1-50 characters)
(Edit phone)
Edit phone
EP
This command allows the functionality of a phone to be edited.
It is useful when a number has been added with the wrong
functionality, or when circumstances have changed
This command allows the functionality of a phone in the system
to be queried. Information for that phone, including what
outputs and inputs are active, text strings and limited use
counters will be sent in a text message to the querying phone
QP. Querying a phone
Description
Parameters
Phone number (up to 16 digits)
(Query phone)
Query phone
settings
QP
Examples
(Commands have been highlighted for clarity)
Command
Query
p.xxxx.
QP
.08412
34567
Queries phone number 0841234567. Phone
settings are sent via SMS to the querying device.
CO. Configuring the module
This command allows the functionality of the system to be
configured. Outputs can be set up, states of input/outputs
checked, PINs and passwords managed, etc.
Examples
(Commands have been highlighted for clarity)
Command
Output configuration
p.xxxx.
CO
.OU1PU
.OU1PT.2000
Sets Output 1 as pulsed, and sets Output 1 pulse
time to 2 seconds (2000 milliseconds).
p.xxxx.
CO
.OU1LA
.OU2PU.OU2PT.15
Sets Output 1 as latched, sets Output 2 as pulsed,
and sets Output 2 pulse time to 1.5 seconds (1500
milliseconds).
p.xxxx.
CO
.SS
Sends an SMS to the querying phone with a value
of 10 (strongest) to 1 (weakest) for signal strength.
This command allows an airtime voucher to be loaded, or
remaining airtime to be queried
Description
Parameters
Load airtime (L)
Query airtime (Q)
Sub-Parameters
Airtime voucher number
(Airtime)
Loads or queries
airtime
AT
Examples
(Commands have been highlighted for clarity)
Command
Description
p.xxxx.
AT
.L.1234
567890
Loads airtime voucher number 1234567890 onto
the SIM.
p.xxxx.
AT
.Q
Airtime remaining on the SIM is sent via SMS to
the querying device.
AT. Airtime
13. In a hurry?
15. Command overview
Description
Parameters
14. Command structure
Programming commands are sent to the module using a standard
text message (SMS)
The command structure must always take the following form:
p.xxxx.command1.parameter1.parameter2 command2.
parameter1.parameter2
, etc.
All commands must start with ‘
p.xxxx.
Where
xxxx
is a user
defined four digit password. The default password is
1234
.
For security purposes, this should be changed on commissioning.
&
Each command and parameter must be separated by a
period (.)
&
Commands can be concatenated, and must be separated
by a
space ( )
&
The maximum message length is limited to 160 characters
&
Commands are
not
case sensitive
p.xxxx.
AP
.08412
34567.
IN1
.
”In1 Text“
Adds phone number 0841234567 to the system,
and assigns Input 1 to be monitored. In the event
that Input 1 is triggered, the message specified in
“In1 Text” will be sent to this number. “In1 Text”
is case conscious – the message sent will exactly
reflect the “In1 Text” specified.
In1 Text
must
begin and end with double
quotation marks (“). The quotation marks
(“ ”) are only required when programming
– They will
not
be included in the text
message sent when the input is activated.
A missed call from this number will
not
trigger an output.
Phone number(s) (up to 16 digits each).
Output to be activated by a missed call or
sms (OU1/OU2)
Input to be monitored (IN1/IN2)
Sub Parameters
User Limit UL (1 – 65536 activations)
Output text string (1 - 50 characters)
Input text string (1 - 50 characters)
A user limit restricts the number of times a missed call
will activate the unit. Once the user limit is reached, the
phone number will automatically be deleted from the
system
(Add phone)
Add a phone
number to the
system
AP
Phone number (up to 16 digits)
(Delete phone)
Delete a phone
DP
Phone number (up to 16 digits)
OU1
Activates Output 1
DOU1
Deletes Output 1
OU2
Activates Output 2
DOU2
Deletes Output 2
In1
Activates Input 1
DIN1
Deletes Input 1
IN2
Activates Input 2
DIN2
Deletes Input 2
DIN1S
Deletes Input 1 string
DIN2S
Deletes Input 2 string
DOU1S
Deletes Output 1 string
DOU2S
Deletes Output 2 string
(Edit phone)
Edit phone
EP
Load airtime (L)
Query airtime (Q)
Sub-Parameters
Airtime voucher number
(Airtime)
Loads or queries
AT
(Query phone)
Query phone
settings
Phone number (up to 16 digits)
QP
CO
OU1PU
Sets Output 1 as pulsed
OU1LA
Sets Output 1 as latched
OU1PT
Sets Output 1 pulse time in
milliseconds
OU2PU
Sets Output 2 as pulsed
OU2LA
Sets Output 2 as latched
OU2PT
Sets Output 2 pulse time in
milliseconds
(Configuration)
Configure inputs,
outputs and
system
settings
SS
Requests Signal strength
CS
Change SIM card PIN number
EP
Enable SIM card PIN checking
DP
Disable SIM card PIN checking
SP
Set SIM PIN in memory only
QF
Queries the firmware version
QS
Query the module settings
NP
New system password
BE
Backup EEPROM
RE
Restore EEPROM
IO
Input/Output mappings
Reset.all
Resets all settings on the module
Reset.usr
Resets User Data on the module
Reset.con
Resets Config. data on the module
Sub-Parameters
Pulse time
In milliseconds
New PIN
four digits
New password four digits
IO Mapping
p.xxxx.
AP
.08412
34567.
OU2
Adds phone number 0841234567 to the system,
and assigns Output 2 to be activated by a missed
call from this number.
p.xxxx.
AP
.08412
34567.
OU2
.
”Ou2 Text“
p.xxxx.
AP
.08412
34567.
OU1
.
OU2
Adds phone number 0841234567 to the system,
and assigns both Output 1 and Output 2 to be
activated by a missed call from this number.
p.xxxx.
AP
.08412
34567.08376543
21.
OU1
Adds phone numbers 0841234567
and
0837654321
to the system, and assigns Output 1 to be activated
by a missed call from EITHER of these numbers. The
number of phone numbers that can be added in one
command is limited only by the maximum allowed
message length (160 characters).
Adds phone number 0841234567 to the system,
and assigns Output 2 to be activated by sending an
SMS with the message specified in “Ou2 Text” .
“Ou2 Text” is
not
case sensitive, and MUST
begin and end with double quotation marks
(“). The quotation marks (“ ”)are only
required when programming – They must
not
be included when sending the text
message to activate the output.
Examples
(Commands have been highlighted for clarity)
Command
Description
p.xxxx.
AP
.08412
34567
Adds phone number 0841234567 to the system and,
since no parameters are specified,
by default
assigns Output 1 to be activated by a missed call
from this number. This allows easy addition of new
phones to a basic system.
Description
Parameters
Phone number(s) (up to 16 digits each)
Output to be activated by a missed call or sms
(OU1/OU2)
Input to be monitored (IN1/IN2)
Sub-Parameters
User Limit UL (1 – 65536 activations)
Output text string (1-50 characters)
Input text string (1-50 characters)
(Add phone)
Add a phone
number to the
system
AP
p.xxxx.
AP
.08412
34567.
OU1
.
UL
25.
OU2
Adds phone number 0841234567 to the system,
and assigns both Output 1 and Output 2 to be
activated by a missed call from this number.
Output 1 has a limit of 25 uses. After 25 missed
calls (activations), Output 1 will no longer be
activated by a missed call. However, Output 2 will
continue to function indefinitely.
p.xxxx.
AP
.08412
34567.
OU1
.
UL
25.
OU2
.
UL
100
Adds phone number 0841234567 to the system,
and assigns both Output 1 and Output 2 to be
activated by a missed call from this number. Output
1 has a limit of 25 uses, and Output 2 has a limit of
100 uses. After 25 missed calls (activations),
Output 1 will no longer be activated by a missed
call. However, Output 2 will continue to function for
a further 75 calls. Thereafter, this number will
automatically be deleted from the system.
DP. Deleting a phone
This command allows one or more numbers to be deleted
from the system
Examples
(Commands have been highlighted for clarity)
Command
Description
p.xxxx.
DP
.08412
34567
Deletes phone number 0841234567 from the
system
p.xxxx.
DP
.08412
34567.08376543
21.0827766554
Deletes phone numbers 0841234567, 0837654321
and 0827766554 from the system
Description
Parameters
Phone number(s) (up to 16 digits)
(Delete phone)
from the system
DP
Description
Parameters
(Configuration)
Configure inputs,
outputs and
system settings
CO
OU1PU
Sets Output 1 as pulsed
OU1LA
Sets Output 1 as latched
OU1PT
Sets Output 1 pulse time in ms
OU2PU
Sets Output 2 as pulsed
OU2LA
Sets Output 2 as latched
OU2PT
Sets Output 2 pulse time in
milliseconds
SS
Requests Signal strength
CS
Change SIM card PIN number
EP
Enable SIM card PIN checking
DP
Disable SIM card PIN checking
SP
Set SIM PIN in memory only
QF
Queries the firmware version
QS
Query the module settings
NP
New system password
BE
Backup EEPROM
RE
Restore EEPROM
IO
Input/Output mappings
Reset.all
Resets all settings on the module
Reset.usr
Resets User Data on the module
Reset.con
Resets Config. Data on the
module
Sub-Parameters
Pulse time (milliseconds) 1s = 1000ms
New PIN number (four digits)
New password (four digits)
IO Mapping
Command
Description
p.xxxx.
CO
.CS.
yyyy
SIM card PIN number settings
Change the SIM card PIN number. yyyy is the NEW
PIN number. The old PIN number does not have to
be entered.
p.xxxx.
CO
.EP
Enable checking of the SIM PIN number on startup.
p.xxxx.
CO
.DP
Disable checking of the SIM PIN number on startup.
Setting the new SIM PIN number in memory only
(Useful when a new SIM is going to be inserted in
the future. On startup, the module will
automatically try this PIN if the old PIN does not
work). yyyy is the new PIN number. The old PIN
number does not have to be entered.
p.xxxx.
CO
.SP.
yyyy
To simply add a phone number to the module to trigger Output 1,
default pulse time with a missed call, send the following SMS to the
module: ‘
p.xxxx.ap.yyyyyyyyyy
,
where
xxxx
is the system password
(default is 1234 ), and
yyyyyyyyyy
is the phone number you wish to
add’.
For your own security, it is recommended that the default password be changed
and that SIM PIN checking be enabled (see ‘
CO
. Configuring the module’)
Ensure that a record of your system password is kept in a safe place.
Ensure that a record of the new SIM PIN number is kept in a safe place.
Record system password here
Record new SIM PIN here
four digit password
(Password)
System password
P
p.xxxx.
AP
.08456
32347.
OU1
.
UL
20."Ou1 text"
Adds phone number 0841234567 to the system,
and assigns Output 1 to be activated sending an
SMS with the message specified in “Ou1 Text”, with
a user limit of 20 uses. After 20 SMSs (activations)
this number will automatically be deleted from the
system.
Adds phone number 0841234567 to the system,
and assigns Output 1 to be activated by a missed
call from this number, with a limit of five uses.
After five missed calls (activations), this number will
automatically be deleted from the system.
p.xxxx.
AP
.08412
34567.
OU1
.
UL
5
The following commands require an optional Memory Backup
Module (Product code PCA12201V1.0). See Section 6 for
location of Backup module port
Command
Description
p.xxxx.
CO
.BE
Backup the entire module memory (EEPROM) onto
a CENTSYS Backup Memory Module.
This includes all user information and module
settings. The Memory Backup Module must be in
place before the command is sent to the module.
After sending the command, a confirmation SMS
will be sent back indicating whether the backup
was successful or not.
p.xxxx.
CO
.RE
Restore the entire module memory (EEPROM) from
a CENTSYS Backup Memory Module.
This includes all user information and module
settings. The Memory Backup Module must be in
place before the command is sent to the module.
After sending the command, a confirmation SMS
will be sent back indicating whether the restore was
successful or not.
Backing up and restoring the memory
Query controller status/settings
Command
Description
p.xxxx.
CO
.QS
Sends an SMS to the querying phone with the
following information:
&
Current state of the outputs
&
Current state of the inputs
&
Output configuration (Pulsed/Latched)
&
Output pulse times
&
Input-Output mappings
&
IP address and port of host server
Query Firmware version
Command
Description
p.xxxx.
CO
.QF
Sends an SMS to the querying phone with the
module firmware version.
Command
Description
Clearing memory
p.xxxx.
CO
.reset.
all
Reset the entire module. All user information is
deleted, and all module settings are restored to
factory default.
p.xxxx.
CO
.reset.
usr
Delete all user information on the module.
Module settings are not affected.
p.xxxx.
CO
.reset.
con
Reset all module settings to factory defaults.
User information is not affected.
Alternative SMS activation of outputs
Even though preconfigured SMS text may have been assigned
to outputs when adding a phone to the system, the outputs on
the module can also be explicitly activated by sending an SMS
to the module, from a valid phone (a valid phone is one for
which a number exists in the system, and for which outputs
have been assigned), with one of the commands below:
&
OU1.on
;
OU1.off
;
OU2.on
or
OU2.off
Command
Description
OU1.on
Activates Output 1. If OU1 is set as pulsed, the
output will activate for the configured pulse time
If OU1 is set as latched, it will turn on and
remain on.
OU2.off
Deactivates Output 2. If OU2 is set to pulsed, the
command will have no effect. If OU2 is set to
latched, and currently on, it will turn off.
Examples
&
You can use the text “me” instead of specifying your own number
when adding, deleting, editing or querying your phone i.e.
p.xxxx.
AP
.me
&
If you add a ‘space’ and then the text “
ACK
” to the end of any
command, you’ll receive an SMS back confirming that the
command has been received by the module. For example,
p.xxxx.
DP
.0841234567
ACK
&
If you make a mistake during the programming via a cell phone,
you will receive an “
error
” sms to let you know
Tips and tricks
The module must have sufficient airtime credit to send the
SMS
p.xxxx.
CO
.IO
Mapping inputs to outputs
Allows activation and deactivation of input-output
mappings. If an input is mapped to an output, and
that input is activated, the mapped output will also
activate, responding according to its configuration
settings:
IN1.OU1 : Maps Input 1 to Output 1
IN1.OU2: Maps Input 1 to Output 2
IN2.OU1: Maps Input 2 to Output 1
IN2.OU2: Maps Input 2 to Output 2
DIN1.OU1: Deletes Input 1 to Output 1 mapping
DIN1.OU2: Deletes Input 1 to Output 2 mapping
DIN2.OU1: Deletes Input 2 to Output 1 mapping
DIN2.OU2: Deletes Input 2 to Output 2 mapping
Command
Description
p.xxxx.
CO
.NP.
yyyy
yyyy is the new password.
P. Setting a new system password
Reset to factory default settings
In the event that you forget the system password you will need to
reset the module to the factory default settings. To do this, please
follow the steps below:
1.
Power down the module.
2.
Bridge the following terminals: IN1, IN2 and GND.
3.
Short out the defaulting pads by touching across them with the tip
of a screwdriver.
4.
Power up the module.
5.
Remove the bridges to the terminals as mentioned in point 2 and 3
above, as well as the defaulting pads.
6.
The module will now be reset to the factory default settings.
All of the information on the module will be erased
AP. Adding a phone
This command allows new phone numbers to be added to the system.
When adding a new phone, it is possible to specify which outputs are to
be activated by a missed call from the phone, and which inputs will
cause a message to be sent to the phone. The number of times the
phone can be used to activate the system can also be specified.