User Manual

Table Of Contents
SARA-R4 series-AT commands manual
UBX-17003787 - R16
16GPIO
Page 194 of 401
Parameter Type Description
25: LwM2M pulse
26: hardware flow control (RTS, CTS)
27: antenna dynamic tuning
28: external GNSS time pulse
29: external GNSS time stamp of external interrupt
30: DTR mode for power saving control
32: 32.768 kHz output
255: pad disabled
<gpio_out_val> Number GPIO output value (for output function <gpio_mode>=0 only):
0 (default value): low
1: high
<gpio_in_pull> Number GPIO input value (for input function <gpio_mode>=1 only):
0 (default value): no resistor activated
1: pull up resistor active
2: pull down resistor active
16.3GPIO read command +UGPIOR
+UGPIOR
Modules All products
Syntax PIN required Settings saved Can be aborted Response time Error referenceAttributes
full No No No < 10 s +CME Error
16.3.1Description
Reads the current value of the specified GPIO pin, no matter whether it is configured as input or output (see
the +UGPIOC AT command to define the GPIO function). The parameters range is shown in the information
text response to the test command.
16.3.2Syntax
Type Syntax Response Example
Set AT+UGPIOR=<gpio_id> +UGPIOR: <gpio_id>,<gpio_val>
OK
AT+UGPIOR=20
+UGPIOR: 20,0
OK
Test AT+UGPIOR=? +UGPIOR: (list of supported <gpio_
id>s)
OK
+UGPIOR: (20, 21)
OK
16.3.3Defined values
Parameter Type Description
<gpio_id> Number GPIO pin identifier: pin number
See the GPIO mapping for the available GPIO pins, their mapping and factory-
programmed values on different u-blox cellular modules series and version.
<gpio_val> Number GPIO value. Allowed values are 0 and 1.
16.3.4Notes
The command works only if the parameter <gpio_mode> of the +UGPIOC AT command is set to 0 or 1.