User manual

set gpio
Chapter 2 Command Descriptions 113
set gpio
Devices
supported
This command is supported in the following products:
Connect Family: Digi Connect EM, Digi Connect Wi-EM, Digi Connect
ME, Digi Connect Wi-ME.
Digi Cellular Family: Digi Connect WAN, and Digi Connect RG devices.
Not supported in ConnectPort Display.
Purpose Used to:
Configure General Purpose I/O (GPIO) pins. In normal operation, the
GPIO pins are used for the serial CTS, DCD, DSR, DTR, and RTS pins.
The set gpio command allows these GPIO pins to be used for different
purposes.
Display current GPIO pin settings.
Required
permissions
For Digi Connect products with two or more users, permissions must be set
to “set permissions s-gpio=read” to display GPIO pin settings, and “set
permissions s-ethernet=rw” to display and configure GPIO pins. See
"set permissions" on page 157 for details on setting user permissions for
commands.
Syntax Configure GPIO pins
set gpio range={1-n} mode={serial|input|output}
Display current GPIO pin settings
set gpio [range={1-n}]
Options range={1-n}
Used to specify the index of the GPIO pin to manipulate, where n is the
maximum number of GPIO pins on the device.
mode={serial|input|output}
The mode of operation of the GPIO serial pin.
serial
Indicates normal serial operation.
input
Allows input of GPIO signals. This is used in conjunction with alarms
to trigger emails or SNMP traps indicating a particular signal change.
output
Allows output of GPIO signals. Currently, output of GPIO signals is not
supported in the command-line interface. The web user interface can
be used to toggle the output of GPIO signals between high and low.
The default is “serial” for all pins.