GSM

From HSYCO
Revision as of 12:06, 23 December 2013 by Hsyco (talk | contribs) (→‎UISET Actions)
Jump to navigation Jump to search

This I/O Server provides services for sending and receiving SMSs and events generation for incoming calls via serial GSM modem.

The employed protocol complies with the AT commands set specified by the GSM standard set. It has been tested on the GenPro 16e and GenPro 18e modems by Erco&Gener and on the AirLink FXT009 modem by Sierra Wireless.

Communication

Employ a RS-232 straight cable to connect the modem directly to HSYCO or to an Ethernet/RS-232 gateway.

RS-232 parameters:

Baud rate 9600 (GenPro modems)
115200 (default on AirLink FXT009 modems)
Data bits 8
Stop bit 1
Parity none
Flow control RTS/CTS

HSYCO Configuration

Options

ID Default Values Description
pin <code> 4-digits PIN code of the SIM card (if used)
gui true true enable support for the UI object, UISET actions and USER commands
false disable UI support
inboxsize 10 n ≥ 0 the number of incoming messages to display in the UI object
countrycode <code> the default country code (e.g. “39”, for Italy) to be used when not otherwise specified. If omitted all provided numbers shall include the country code


srvc <number> phone number of the SMS service center (use the international format, e.g. +393492000200). If not specified, the default number saved on the SIM card will be used. If not available, the driver will not be able to sent SMS messages
resend 4 n ≥ 0 number of sending attempts on an outgoing SMS in case of error

Datapoints

ID Value R/W Description
connection online R connection established
offline R HSYCO can't connect to the modem
sms.<num> <text> R an SMS message has been received form the number <num>[Note 2] with <text> as body
W send an SMS message to the number <num>[Note 1] with <text> as body
call <num> R incoming call from number <num>[Note 2] in progress. An event is generated for each “ring” during the call
unknown R incoming call from an unknown number in progress
sms.<num>.sent <mr> R a message has been successfully sent to the number <num> and the message reference number is <mr>
sms.<num>.errors <val> R an error occurred while sending a message to number <num>. The value <val> is an increasing counter of the occurred errors since the I/O Server started
signal {0 ... 31} R the GSM signal level has the reported value (ranging from 0 to 31)
unknown R the GSM signal level is unknown

Note 1 
If the option 'countrycode' is used, then the country code will be automatically added to the specified numbers, unless the latter begins with a '+' character. For instance, assuming the option 'countrycode' is set to “39”, the addressee number “3480077000” will be automatically changed to “+393480077000”, while the number “+46765007700” will remain unchanged. If, on the other hand, no default country code has been specified, then the addressee numbers must always be provided prepending the country code.

Note 2 
The numbers are reported as sent from the modem and the format may vary depending on the number itself and the modem settings. If the reported number is an international number, then a '+' will be prepended to it, unless the country code is equal to the value of the 'countrycode' option. In the last case the country code will be omitted. In some cases, the sender number field might also be replaced by an alphanumeric string.

User Interface

GSM Object

GSM (UI Object)

UISET Actions

ID Attribute Set to
inbox value latest incoming SMS messages (as many as specified by the 'inboxsize' option)
connection.label.online visible true when datapoint connection = online
false when datapoint connection = offline
connection.label.offline visible true when datapoint connection = offline
false when datapoint connection = online
signal.label.0 visible true when the GSM signal level is equal to 0
false when the GSM signal level is not 0
signal.label.1 visible true when the GSM signal level is between 1 and 8
false when the GSM signal level is not between 1 and 8
signal.label.2 visible true when the GSM signal level is between 9 and 16
false when the GSM signal level is not between 9 and 16
signal.label.3 visible true when the GSM signal level is between 17 and 24
false when the GSM signal level is not between 17 and 24
signal.label.4 visible true when the GSM signal level is above 24
false when the GSM signal level is below 25
signal.label.unknown visible true when the GSM signal level is unknown
false when the GSM signal level is known
sending.label visible true when the modem is sending a message
false when the modem is not sending a message
error.label visible
blink
true for 5 seconds after there’s been an error sending a message
false default value

USER Commands

Name Param Action
armed 0 disarm all groups
1 arm all groups
g<n>.armed 0 disarm group <n>
1 arm group <n>
c<n>.bypassed 0 unbypass zone <n>
1 bypass zone <n>
c<n>.isolated 0 un-isolate zone <n>
1 isolate zone <n>
c<n>.soaked 0 un-soak zone <n>
1 soak zone <n>
system reset reset alarms

PUK-locked SIM