User Tools

Site Tools


Sidebar

Kerlink Wiki Home Page

Home

Setups

General information

Wirnet™ iBTS information

Wirnet™ iFemtoCell information

Wirnet™ iFemtoCell-evolution information

Wirnet™ iStation information

System management

Network management

LoRa Features

KerOS customization

Support and resources



www.kerlink.com

wiki:sms

This is an old revision of the document!


SMS

Use of integrated SMS commands

Wirnet iBTS and Wirnet iFemtoCell can be configured using SMS commands. Most features available from the web interface and the REST API can be used o SMS.

Command syntax

All SMS command will follow the same syntax:

[login:password] [sms_command_id] sms_command sms_field sms_value
  • login: The login used for the board configuration. This value is always admin.
  • password: The password is the same as the web interface password (pwd4admin by default)
  • sms_command_id: ID defined by the customer to identify the SMS command. There is no default value. This ID is mandatory and must be 6 characters long.
  • sms_command: The command to be executed with / separated fields.
  • sms_field: The configuration field to be set/get (Optional).
  • sms_value: The value that as to be set to a configuration field (Optional).

SMS response syntax

All SMS reponses use the same syntax:

[sms_command_id:sms_command_status] sms_error_info
  • sms_command_id: The value of this field is equal to the value of the sms_command_id field used in the command. The purpose of this field is to match the command with the reponse.
  • sms_command_status: ok or error.
  • sms_error_info: SMS error information (Optional).

System command

System command Description sms_command sms_field sms_value
Halt Halt the board system/halt N/A N/A
Reboot Reboot the board system/reboot N/A N/A
Update Request a board update system/update N/A N/A
Restore Backup Request a backup restore system/restore/backup N/A N/A
Restore Stock Request a stock restore system/restore/stock N/A N/A

Sending update, restore stock and restore backup SMS commands will only set up a flag used to record the request.
The action will only be triggered only after a board reboot. Reboot the board manually or by sending a reboot SMS command.

Examples:

Reboot command:

#SMS sent to the gateway
[admin:pwd4admin] [reboot] system/reboot
#SMS response from the gateway
[reboot:ok]

Restore stock command with wrong password:

#SMS sent to the gateway
[admin:badpassword] [rstock] system/restore/stock
#SMS response from the gateway
[rstock:error] login/password

Configuration commands

There are two kinds of configuration commands: get_value commands and set_value commands.

Get commands

Command Description sms_command sms_field sms_value
Get CPU usage configuration/get_value statm.cpu N/A
Get RAM usage configuration/get_value statm.ram N/A
Get userdisk usage configuration/get_value statm.userdisk N/A
Get board temperature configuration/get_value statm.temperature N/A
Get ethernet connectivity state configuration/get_value statm.lan.state N/A
Get ethernet hardware address configuration/get_value statm.lan.hardware.address N/A
Get ethernet IP address configuration/get_value statm.lan.address N/A
Get ethernet broadcast IP address configuration/get_value statm.lan.broadcast N/A
Get ethernet netmask configuration/get_value statm.lan.netmask N/A
Get GSM connectivity state configuration/get_value statm.gsm.state N/A
Get GSM IP address configuration/get_value statm.gsm.address N/A
Get GSM netmask configuration/get_value statm.gsm.netmask N/A
Get CPU board serial number configuration/get_value statm.serialnumber N/A
Get Keros firmware version configuration/get_value statm.version N/A
Get board platform type (ibts or ifemto) configuration/get_value statm.platform N/A
Get ethernet connectivity state configuration/get_value sysma.lan.enable N/A
Get ethernet connectivity mode: off,dhcp or static address_ip netmask gateway_ip dns_ip1,dns_ip2 (dns optionnal) configuration/get_value sysma.lan.ipv4 N/A
Get ethernet IP address (only for static connectivity mode) configuration/get_value sysma.lan.ipv4_address N/A
Get ethernet netmask (only for static connectivity mode) configuration/get_value sysma.lan.ipv4_netmask N/A
Get ethernet gateway IP (only for static connectivity mode) configuration/get_value sysma.lan.ipv4_gateway N/A
Get list of ethernet DNS IP (only for static connectivity mode) configuration/get_value sysma.lan.ipv4_dns N/A
Get GSM connectivity state (true or false) configuration/get_value sysma.gsm.enable N/A
Get GSM operator list (MNC,MCC,APN,login,user) configuration/get_value sysma.gsm.operators N/A
Get time synchronization mode (auto or manual) configuration/get_value timem.mode N/A
Get list of NTP address configuration/get_value timem.ntp N/A
Get timezone use on the board configuration/get_value timem.timezone N/A
Get current date (yyyymmddHHMMSS) configuration/get_value timem.date N/A

Example:

Get GSM IP address:

#SMS sent to the gateway
[admin:pwd4admin] [getgsm] configuration/get_value statm.gsm.address 
#SMS response from the gateway
[getgsm:ok] "10.172.108.48"

Set commands

Command Description sms_command sms_field sms_value
Set admin user password configuration/set_value sysma.password New password. ex:“mynewpassword”
Set ethernet connectivity state configuration/set_value sysma.lan.enable true or false
Set ethernet connectivity mode configuration/set_value sysma.lan.ipv4 “off”,“dhcp” or “static address_ip netmask gateway_ip dns_ip1,dns_ip2” (dns optionnal)
Set ethernet IP address configuration/set_value sysma.lan.ipv4_address IP address. ex:“192.168.4.10”
Set ethernet netmask configuration/set_value sysma.lan.ipv4_netmask Mask value. ex:“255.255.254.0”
Set ethernet gateway IP configuration/set_value sysma.lan.ipv4_gateway IP address. ex:“192.168.4.1”
Set list of ethernet DNS IP configuration/set_value sysma.lan.ipv4_dns IP addresses. ex:“192.168.1.1,192.168.1.2”
Set GSM connectivity state configuration/set_value sysma.gsm.enable true or false
Add a GSM operator configuration/set_value sysma.gsm.add_operator MNC,MCC,APN,login,user. ex:“124,10,myapn,user,pass” or “123,10,,,”
Remove a GSM operator configuration/set_value sysma.gsm.remove_operator MNC,MCC. ex:“124,10”
Update a GSM operator configuration/set_value sysma.gsm.update_operator MNC,MCC,APN,login,user. ex:“124,10,myapn2,,”
Time synchronization mode configuration/set_value timem.mode “auto” or “manual”
Set List of NTP address configuration/set_value timem.ntp List of NTP address. ex:“0.pool.ntp.org,1.pool.ntp.org”
Set Timezone use on the board configuration/set_value timem.timezone Timezone. ex:“Europe/Paris”
Set a date (yyyymmddHHMMSS) configuration/set_value timem.date Date. ex:“20180710192000”

Examples:

Set admin user password:

#SMS sent to the gateway
[admin:pwd4admin] [newpwd] configuration/set_value sysma.password "mynewpassword" 
#SMS response from the gateway
[newpwd:ok]

Use of customs SMS

Wirnet iBTS and Wirnet iFemtoCell are able to send and receive SMS if the mobile network is properly configured. Modems are identified by manufacturer_X where X is a number. This number can vary when a Wirnet iBTS embeds a dual-SIM board. It always is 0 for Wirnet iFemtoCell. The manufacturer is always sierra for Wirnet iBTS.

To retrieve the identifier, use the gsmdiag.py command.

Here is an output of /tmp/gsmdiag.txt. Two modems are displayed, and only one has a SIM card present. Its identifier is /sierra_0.

Content - gsmdiag.py output

Send

To send an SMS using the modem /sierra_0 (Wirnet iBTS):

dbus-send --system --print-reply --dest=org.ofono /sierra_0 org.ofono.MessageManager.SendMessage string:"+33XXXXXXXXXX" string:"test sms"

To send an SMS using the modem /huawei_0 (Wirnet iFemtoCell):

dbus-send --system --print-reply --dest=org.ofono /huawei_0 org.ofono.MessageManager.SendMessage string:"+33XXXXXXXXXX" string:"test sms"

Receive

Receive an SMS using a python test script :

File - receive SMS python script

wiki/sms.1548923696.txt.gz · Last modified: 2019/01/31 09:34 by hch