User guide

Part 5 – GPIO Commands Chapter 15 – GPIO Commands
Universal IP AT Commands Reference Guide (Document S000457H) 83
Chapter 15 – GPIO Commands
Note: GPIO Commands apply to iCell modems only.
About GPIO
If the specific hardware allows GPIO (check availability with AT#GPIO=1), then you may specify certain external
events from the GPIOs to trigger specific stack functions; i.e., email, upload files, download files. In order for this
to work, you must configure the specific function first. (Original sentence was: The requirements are the
configuration of the specific function. For instance, if SENDMAIL1 will be called, then all settings pertaining to
SENDMAIL1 must be configured before the #GPIO command is configured.
#GPIO – Enable/Disable and Configure External GPIO Driven Events
Definition: If GPIO is enabled and configured correctly, a specific external trigger (Digital HI/LOW or
Analog value from 0-3.3V) will trigger a specified function from the stack.
Syntax: Set Value: AT#GPIO=ID, Pin Function, Trigger Level, Debounce, Stack Function, Hangup
View Values: AT#GPIO=<n> where n is the Pin number or AT#VALL
ID: Pin number as described in the hardware documentation
Values: 1 - 5
Pin Function: Allows the pin to be a Digital Input, Digital Output or ADC input
Values:
0 - Digital Input with internal pullup
1 - Digital Input without internal pullup
2 - Digital Output
3 - ADC input
Trigger Level: The Voltage level at which GPIO will trigger.
For Digital input, a value greater than 0 indicates high. 0 indicates low.
For Digital output, a positive value will drive the line high. A zero value will drive the line low.
For ADC input, the trigger value will be in the range of 0 to 3300 millivolts.
Values: 0 - 3300 in milliVolts
Debounce: The time between successive reads on the pin.
Values: 0 - 65535 milliseconds
Stack Function: The desired stack function to be specified on a GPIO trigger. The stack function must be
properly configured; i.e., for a sendmail function, all proper sendmail items must be configured.
Values:
0 - Disabled (The GPIO will not trigger)
1 - #SENDMAIL1
2 - #SENDMAIL2
3 - #SENDMAIL3
4 - #PUTMAIL
5 - #GETMAIL
6 - #LTCPSTART=1
7 - #OTCP=1
8 - #OUDP=1
9 - #LUDPSTART=1
Hangup: Determines whether to disconnect from the network after GPIOs have been processed.
Values:
0 - Physical connection will disconnect when all GPIOs have been processed
1 - Physical connection will stay connected.
2 - Physical connection will disconnect when all GPIOs have been processed; suppress
responses
3 - Physical connection will stay connected; suppress responses