SMS Commands
Table of Contents
For the vast majority of SIM cards and networks globally, our devices will typically automatically connect in once a given SIM card is inserted and the device is powered on.
For some specific devices, with private APNs or other - configuring the APN may be required to get online. For our 2G and global range. This can be done over the air.
For Cat-M1/NB-IoT devices - the device needs to be on the network in order to receive an SMS. So a DM Link cable is the preferred method for getting online.
Once a device is on-air on-air. Any other configuration is done over the air via Device Manager.
SMS’s will only be received when the GSM modem is powered on. When the device is in its low power “sleep” mode the GSM modem is off. Cycle the external power or toggle the ignition line to initiate a wakeup and server connection attempt.
NB – the older G50 device uses a different format. This applies to all other DM devices.
Enabling Mobile Terminated (MT) Messages
Ensure that MT (Mobile Terminated) messages are enabled on your SIM card’s platform. This setting allows the device to receive SMS commands. Without this configuration, your device may not accept the necessary commands for proper operation.
Sending SMSes to Devices
SMSes can be typically sent via one of the below methods,
1. Use a mobile phone and SMS the MSIDN
MSISDN stands for Mobile Station International Subscriber Directory Number. It is a unique identifier assigned to each mobile device in a GSM (Global System for Mobile Communications) network. It is the SIM cards ‘phone number’
Generally, the number printed on the SIM is the ICCID - (Integrated Circuit Card Identification number) this is an 18-22-digit number typically printed on the back of a SIM card. No two SIM cards have the same ICCID number. The ICCID is a globally unique serial number – a one-of-a-kind signature that identifies the SIM card itself.
Your SIM provider will generally show the MSISDN in your SIM portal.
2. Use your SIM portal
Most SIM portals allow you to SMS via the SIM portal, for example in Jasper see below. This is generally the simplest and most commonly used method.
Many portals will offer API functionality to facilitate sending in bulk.
3. Digital Matter SMS App:
The commands below can easily be sent from a common cellular phone to the SIM card in the device. The Digital Matter SMS App provides an alternative to using your phone. The app is a windows based executable. Users will need to create a Clickatell account.
4. SMS Providers
Options such as Twilio can be used to generate SMSes programatically.
Format:
The SMS text must start with the following symbols (pound, asterisk, comma)
#*,
The SMS text command takes the following generic form of a command followed by a variable list of comma separated parameters:
#*,<command>
String values are not contained in quotation marks. Example:
#*,RESET
Set the APN:
2G/3G Devices
This command allows you to set the APN name and optionally the user name and password to use in order to allow the device to connect on to the network. The format is:
#*,APN,<apn name>,<user name>,<password>
If the APN details are omitted then the APN will be erased and the device will use auto-APN.
Examples:
#*,APN,telstra.internet
#*,APN,custom.APN,user1,pwd1
#*,APN
LTE-M/NB-IoT Devices
The format for the SMS is: (hash Asterisk comma 4GINIT comma APN comma RAT)
#*,4GINIT,<apn name>,<RAT number>
Where RAT stands for Radio Access Technology. The RAT is set using the following key:
0 - Automatic | (use Cat-M1 and NB-IoT). This is the default setting, but doesn't work in some cases. |
1 - Cat-M1 only | Restricts 4G bands to only CAT-M1(recommended) |
2 - NB-IoT only | Restricts 4G bands to only NB-IoT |
If the APN details are omitted then the default APN and RAT will be saved to the SIM card. The default APN is a blank APN. And the default RAT is 0 (M1 and NB1)
In the Device Logs it will show the command has been received, understood and saved. You can also check your SIM portal to see if it has been saved.
Examples of 4G APN commands
#*,4GINIT,telstra.internet
#*,4GINIT,APN,RAT
#*,4GINIT,apnOnly
#*,4GINIT
GLOBAL Devices
This command allows you to set the APN name and optionally the user name and password to use in order to allow the device to connect on to the network. The format is:
#*,APN,<apn name>,<user name>,<password>
If the APN details are omitted then the APN will be erased and the device will use auto-APN.
Examples:
#*,APN,telstra.m2m
#*,APN,custom.APN,user1,pwd1
#*,APN
SERVER:
This command allows you to set the details of the server that the device will connect to. The format is:
#*,SERVER,<server URL>,<port number>
If <server URL>,<port number> are omitted then the default OEM Server details will be used.
Examples:
#*,SERVER
#*,SERVER,s0.oemserver.com,8964
DSERVER:
This command allows you to set the details of the third party ('data') server that the device will connect to. The format is:
#*,DSERVER,<server URL>,<port number>
If <server URL>,<port number> are omitted, then the third party server will be cleared.
Examples:
#*,DSERVER
#*,DSERVER,remora.my.server.com,8966
OEM:
If the device is using a third party ('data') server, then this SMS will trigger a connection to OEM for configuration, after completing a session with the 'data server'. If the device is not using a third party server, this command does nothing.
#*,OEM
RESET:
this command will cause the device to restart as soon as it is disconnected from the server. This does not cause any parameter changes. The format is:
#*,RESET
POSITION:
This command will cause the device to SMS the last recorded GPS location.
Older Devices
Device | Firmware Version |
---|---|
Dart | v1.17+ |
Other devices - Please enquire about availability |
The format is:
#*,<number to reply to>,POSITION
Example:
#*,+278212345678,POSITION
Newer Devices
Device | Firmware Version |
---|---|
Dart2 | v3.11+ |
Oyster3-Global | v1.7+ |
Oyster3 2G | v1.3+ |
Remora3-Global | v1.4+ |
G150-Global | v1.5+ |
Other devices - Please enquire about availability |
The format is:
#*,POSITION,<number to reply to>
Example:
#*,POSITION,+27821234567
Please note:
- The device will only read the SMS during modem activity, usually at the end of an upload.
- The SIM card in your unit must be able send and receive text messages.
- Include the country code in the cellphone number - eg +27 for South Africa
Result: