3.1 Putting in Operation

Operational state is 2N® SmartCom PRO's main function. In this state, periodic data readouts from input circuits are made. 2N® SmartCom PRO responds to queries from the superior data concentrator, which can be the 2N® SmartCom server, monitors events on the RS 232 / RS 485 / M-Bus interfaces and sends the acquired data to the server via GPRS or Ethernet in the case of the PRO ETH version.

Initialisation

Insert the PIN–disabled data SIM card in 2N® SmartCom  PRO  and connect the GSM antenna and power supply as instructed in Subs. 2.3., Mounting. 

When the 2N® SmartCom  PRO  power supply is connected, the LED indicator on the upper side of the module flashes three times quickly and then starts flashing in longer intervals. Refer to Subs. 3.2. for LED status details. The GPRS module starts communicating with the provider in about 10 seconds trying to log in and obtain the IP address. The LED starts shining constantly to indicate a successful login. 

Tip

  • 2N® SmartCom PRO  is working if the LED indicator is shining, thus indicating a successful mobile provider connection and IP address assignment.

To identify the 2N® SmartCom  PRO  IP address assigned by the mobile provider or perform the basic configuration upon power up, get connected via the serial port (RS 232). The port is in the data mode upon power up, retransmitting all data from the input to the GPRS network. Use the +++ sequence preceded and followed by a 1–second delay to switch into the configuration mode. When your 2N® SmartCom  PRO  replies OK, start configuring using the AT commands as listed below.

Restart the serial port to return to the data mode. To do so, you can either send the ATO command or disconnect 2N® SmartCom  PRO  from the power supply. 

Tip

  • 2N® SmartCom PRO can also be configured via Terminal Config. Refer to Sub. 4.1.
  • If you cannot use a PC, make the basic settings using SMS messages.
    Refer to Sub 4.2 for details.

When your 2N® SmartCom  PRO  has been programmed as required, connect the device to the available serial ports RS 232 / RS 485 / M-Bus. Launch the hyperterminal and get connected to the 2N® SmartCom  PRO  public IP address via port 10000, which, together with the serial port, can be used for configuring. Use port 10001 for retransmitting data to RS 232 and port 10002 for retransmitting data to RS 485 / M-Bus. 

Basic Configuration by SCCFG Command

Enter the SCCFG command via the AT interface to make basic configuration of the GSM/UMTS module, access to the server and listening ports of  2N® SmartCom PRO.  If you do not have access to a PC, you can control the terminal via SMS to a certain extent. Refer to Subs. 4.2

at^sccfg?

The command displays the currently set interface values.

  • ^SCCFG: "MODE","STANDALONE"
  • ^SCCFG: "GPRS_APN","publicip.t-mobile.cz"
  • ^SCCFG: "GPRS_USER",""
  • ^SCCFG: "GPRS_PASS",""
  • ^SCCFG: "LOCAL_IP","0.0.0.0"
  • ^SCCFG: "SERVER_IP","90.182.112.70"
  • ^SCCFG: "SERVER_PORT",1730
  • ^SCCFG: "AUTH_PASS","12345"
  • ^SCCFG: "SIM_PIN",""
  • ^SCCFG: "AUTH_IP",0
  • ^SCCFG: "ENCRYPT",0
  • ^SCCFG: "ENCRYPT_KEY",31313233353637383934353631353634
  • ^SCCFG: "LISTEN_PORTCMD",10000
  • ^SCCFG: "LISTEN_PORT1",10001
  • ^SCCFG: "LISTEN_PORT2",10002 
at^sccfg=?

The command displays the interface setting options.

  • ^SCCFG: "MODE","TCPCLIENT"|"STANDALONE"|"DATA_OFF"
  • ^SCCFG: "GPRS_APN","0-32"
  • ^SCCFG: "GPRS_USER","0-32"
  • ^SCCFG: "GPRS_PASS","0-32"
  • ^SCCFG: "LOCAL_IP"
  • ^SCCFG: "SERVER_IP","7-15"
  • ^SCCFG: "SERVER_PORT",0-65535
  • ^SCCFG: "AUTH_PASS","5-64"
  • ^SCCFG: "SIM_PIN","0-8"
  • ^SCCFG: "AUTH_IP",0-1
  • ^SCCFG: "ENCRYPT",0-1
  • ^SCCFG: "ENCRYPT_KEY","16"|<32 HEX>
  • ^SCCFG: "LISTEN_PORTCMD",1-65535
  • ^SCCFG: "LISTEN_PORT1",1-65535
  • ^SCCFG: "LISTEN_PORT2",1-65535
  • ^SCCFG: "SAVE"
  • ^SCCFG: "RESTART"
  • ^SCCFG: "SRESTART"  
at^sccfg="mode",1
  • Select one of the following three 2N® SmartCom PRO  working modes:
    • TCPCLIENT (1) – 2N® SmartCom PRO  connects to the selected server for interface data resending.
    • STANDALONE (3) – 2N® SmartCom PRO  works as a server to which clients get connected (transparent transmission between TCP and serial interfaces).
    • DATA_OFF - the 2N® SmartCom PRO GSM/UMTS module is not logged in to the data network but waits for an SMS.

Tip

  •  Set the mode number or enter the mode name to select a mode. The AT command is as follows:
at^sccfg="mode","tcpclient"

Upozornění

  • The ETH port is visible in the network in the DATA_OFF mode and PING can be used. But no outgoing connections are set up and all incoming connections are rejected.
at^sccfg="gprs_apn","internet.open"
  • This command sets the access APN to the mobile provider. O2 CZ configuration is used as an example. 
at^sccfg="gprs_user","internet" at^sccfg="gprs_pass","hfsdj515d"
  • These two commands set the user name and password for provider authentication. Most providers use no authentication. If your provider requires authentication, ask for necessary access data.
at^sccfg="local_ip"
  • This command makes 2N® SmartCom PRO  return the IP address assigned to it by the provider.
at^sccfg="server_ip","90.182.112.54"
  • The command sets the IPv4 address of the server to which 2N® SmartCom PRO  connects in mode 1.
at^sccfg="server_port",1564
  • The command sets the server port to which 2N® SmartCom PRO  connects in mode 1.
at^sccfg="auth_pass","xJ32ppp_v1"
  • The command sets the authorisation password for the above mentioned server.
at^sccfg="sim_pin","1156"
  • The command sets the PIN to be entered into the SIM card upon power up.
at^sccfg="auth_ip",1
  • The command enables/disables IP address access authorisation. Refer to S. 3 for details. 
at^sccfg="encrypt",1
  • Select one of the following 2N® SmartCom PRO  server communication encryption modes:
    • Mode 0 DISABLED – 2N® SmartCom PRO  shall not encrypt any data itself.
    • Mode 1 OPTIONAL – 2N® SmartCom PRO  shall encrypt data if the counterparty requires so.
    • Mode 2 FORCED – 2N® SmartCom PRO  shall encrypt all outgoing data.
at^sccfg="encrypt_key","E2978FE2978FE2978FE2978FE2978F20"
  • Use the parameter to specify the encryption key. Set 32 valid (hexa) characters only, i.e. 16 ASCII characters altogether via the 2N® SmartCom  Control Panel.
at^sccfg="listenportcmd",10000
  • Use the parameter to specify the listening port for IP access to configuration. The default value is 10000.
at^sccfg="listen_port1",10001
  • Use the parameter to specify the listening port for IP access to port1. The default value is 10001.
at^sccfg="listen_port2",10002
  • Use the parameter to specify the listening port for IP access to port2. The default value is 10002. 
at^sccfg="save"
  • The command saves the changes.
at^sccfg="restart"
  • The command restarts 2N® SmartCom  PRO .
at^sccfg="srestart"
  • The command saves the changes and restarts 2N® SmartCom  PRO. 

Ethernet Port Setting (2N® SmartCom PRO ETH only)

These commands are only implemented in 2N® SmartCom  PRO  ETH, which includes an Ethernet port.

at^sceth="ip_method","DHCP"
  • The command selects the IP address setting mode:
    • DHCP – automatic IP address setting from the DHCP server.
    • FIXED – manual IP address setting.
at^sceth="local_mac"
  • The command writes out the MAC address currently used on the Ethernet port.
at^sceth="local_ip"
  • The command writes out the IPv4 address currently used on the Ethernet port.
at^sceth="fixed_ip","192.168.1.1"
  • The command is used for manual IP address setting.
at^sceth="mask","255.255.255.0"
  • The command is used for manual network mask setting.
at^sceth="gateway","192.168.1.254"
  • The command is used for manual default gateway setting.
at^sceth="dns1","0.0.0.0"
  • The command is used for manual primary DNS setting.
at^sceth="dns2","0.0.0.0"
  • The command is used for manual secondary DNS setting.
at^sceth="save"
  • The command saves the changes.
at^sceth="restart"
  • The command restarts the Ethernet port.
at^sceth="srestart"
  • The command saves the changes and restarts the Ethernet port.
at^sceth?
  • The command displays the currently set interface values.
  • ^SCETH: "IP_METHOD","FIXED" 
  • ^SCETH: "LOCAL_MAC","7C:1E:B3:00:92:E5"

  • ^SCETH: "LOCAL_IP","192.168.1.1" 
  • ^SCETH: "FIXED_IP","192.168.1.1"
  • ^SCETH: "MASK","255.255.255.0" 
  • ^SCETH: "GATEWAY","192.168.1.254"
  • ^SCETH: "DNS1","192.168.1.1"
  • ^SCETH: "DNS2","0.0.0.0" 
at^sceth=?
  • The command displays the interface setting options.
  • ^SCETH: "IP_METHOD","FIXED"|"DHCP"
  • ^SCETH: "LOCAL_MAC"

  • ^SCETH: "LOCAL_IP"
  • ^SCETH: "FIXED_IP","7–15"
  • ^SCETH: "MASK","7–15"
  • ^SCETH: "GATEWAY","7–15"
  • ^SCETH: "DNS1","7–15"
  • ^SCETH: "DNS2","7–15"
  • ^SCETH: "SAVE"
  • ^SCETH: "RESTART" 
  • ^SCETH: "SRESTART"
at^scchprim="GSM"
  • The command sets the primary channel for connections:
    • GSM – via GPRS/UMTS.
    • ETH – via Ethernet.
 at^scchprim?
  • The command writes out the current primary channel setting.
 at^scchled1="GSM"
  • The command  sets the LED indicating function:
    • GSM – LED indicates the GSM/UMTS connection state.
    • ETH – LED indicates the Ethernet port state.
 at^scchled1?
  • The command  writes out the current LED indication state. 

Gel-Lead-Acid Accumulator Charger

This function is only available in 2N® SmartCom PRO and 2N® SmartCom PRO ETH, which includes an intelligent charger for an external gel-lead-acid accumulator. Charging is automatically controlled and terminated when full charging is achieved. The device is supplied from the accumulator without loss in the case of power outage and the accumulator is automatically recharged upon power recovery. 6 or 12V accumulators can only be used. Make sure while charging that the supply voltage is 1 V at least higher than the maximum accumulator voltage. Use the commands below for configuration.

at^scchg="max_voltage",6800
  • The command sets the maximum accumulator voltage in mV.
at^scchg="max_current",350
  • The command sets the maximum supply current in mA.
at^scchg="state"
  • The command identifies the current charging state:
    • ACTIVE – charging activated, accumulator fully charged.
    • CHARGING – charging activated, accumulator is being charged.
    • STOPPED – charging stopped.
at^scchg="start"
  • The command activates the charging function.
at^scchg="stop"
  • The command deactivates the charging function. 
at^scchg="save"
  • The command saves the changes.
at^scchg="srestart"
  • The command saves the changes and resets the charging parameters immediately.
at^scchg?
  • The command displays the current charger parameters and charging state.
at^scchg=?
  • The command displays the charger setting options.

Warning

  • Remember to set the charger parameters before connecting the accumulator and starting the charging process. Make sure that the settings are in compliance with the catalogue values of the accumulator manufacturer to avoid accumulator damage, fire or even explosion.
  • Never connect an accumulator with a rated voltage higher than the 2N® SmartCom PRO supply voltage. If this happened, 2N® SmartCom PRO would start using a higher voltage supply, i.e. the battery, discharge the accumulator and switch to a lower voltage supply. However, it would be unable to recharge the battery (see the condition below) and you would lose backup during power outage.

Caution

  • Use a 6 or 12V gel-lead-acid accumulator only. Make sure while charging that the supply voltage is 1 V at least higher than the maximum accumulator voltage.

Real Time Clock

This function is only available in 2N® SmartCom PRO and 2N® SmartCom PRO ETH. The real. time clock is backed up with a super capacitor, which keeps the clock going for two days upon disconnection or power failure. Configure the clock via the AT interface or synchronisation from the 2N® SmartCom Server as follows.

at^scclk="RR/MM/DD,hh:mm:ss+ZZzz"
  • The command sets the real time clock. The ZZzz parameter defines the time zone: shift of ZZ hours and zz minutes against GMT.
at^scclk?
  • The command displays the current time as follows:

^SCCLK: "12/04/19,16:00:25+0200"

(April 19, 2012, 16:00:25, 2 hour shift from GMT)