SARA-R4/N4 series-AT Commands Manual
UBX-17003787 - R09

14System features
Page 161 of 307
14.12î™–î™–î™–î™–Last gasp configuration +ULGASP
+ULGASP
SARA-R410M-52BModules
SARA-N4
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
partial No NVM No < 10 s +CME Error
14.12.1î™–î™–î™–î™–Description
The command enables/disables and configures the last gasp feature. The application is automatically
triggered by a properly configured GPIO (see GPIO Introduction). The feature supports the sending of a
predefined last notification in case of power outage, just before the power goes off. It is assumed that the
cellular module is registered to the network when the alarm is triggered; however the command just configures
the feature so it is possible to issue it also if PIN is not inserted. It is possible to enable/disable the +UULGASP
URC in order to be notified about the operation result.
This AT command must be issued after a proper configuration of the GPIO has been performed via the
+UGPIOC command. Otherwise, if +UGPIOC is issued after +ULGASP, the Last Gasp will work only after
a reboot.
The parameters will be set to the values stored in the NVM in case they are omitted in the set command.
14.12.2î™–î™–î™–î™–Syntax
Type Syntax Response Example
Set AT+ULGASP=<GPIO_mode>,
<text>,<msg_format>,,<profile_id>,
<IP_protocol>,<IP_addr:PORT>[,
[<method>],,[<urc_enable>],[<nv_
upd_freq>],[<tx_count>]]
OK AT+ULGASP=0,"Power_loss",0,,1,17,
"192.168.100.20:8080"
OK
Read AT+ULGASP? +ULGASP: <GPIO_mode>,<text>,
<msg_format>,,<profile_ID>,
<IP_protocol>,<IP_addr:PORT>,
<method>,,<urc_enable>,<nv_upd_
freq>,<tx_count>
OK
+ULGASP: 0,"Power_loss",0,,1,17,
"192.168.100.20:8080",1,,1,0,1
OK
Test AT+ULGASP=? +ULGASP: (list of supported <GPIO_
mode>'s),,(list of supported <msg_
format>'s),,(list of supported
<profile_id>'s),(list of supported
<IP_protocol>'s),,(list of supported
<method>'s),,(list of supported <
urc_enable>'s),(list of supported
<nv_upd_freq>'s),(list of supported
<tx_count>'s)
OK
+ULGASP: (0-2),,(0-1),,(1),(17),,(1),,(0-
1),(0-3600),(1-10)
OK
URC +UULGASP: <result>,<bearer> +UULGASP: 0,1
14.12.3î™–î™–î™–î™–Defined values
Parameter Type Description
<GPIO_mode> Number Select the interrupt trigger. Allowed values:
• 0 (factory-programmed value): trigger disabled; the following arguments will be
ignored.
• 1: falling edge
• 2: rising edge
<text> String The string that will be sent upon GPIO movement. Text or binary format can be
selected with the <msg_format> parameter. When text format is selected, a
maximum of 256 ASCII chars is allowed. When the binary format is selected, a
maximum of 512 chars (0-9,A-F) is allowed. Every 8-bit octet of the message must be
written as two IRA character long hexadecimal numbers, e.g. an octet with integer
value 42 (i.e. 0x2A) must be written as a string of two characters "2A" (IRA 50 and 65).