Command AT^SGIO not working, | Telit Cinterion IoT Developer Community
September 6, 2016 - 7:01pm, 2557 views
I'm trying to get the state of a GPIO but I'm getting an error. Am I using the command properly?
at^sgio=?
^SGIO: (0-7,10-23)
OK
AT^SGIO=0
ERROR
AT^SGIO=1
ERROR
AT^SGIO=2
ERROR
AT^SGIO=3
ERROR
AT^SGIO=4
ERROR
AT^SGIO=5
ERROR
AT^SGIO=6
ERROR
AT^SGIO=7
ERROR
AT^SGIO=10
ERROR
AT^SGIO=11
ERROR
AT^SGIO=12
.
.
.
Thanks in advance!
Hi,
have you configured your GPIOs before issuing AT^SGIO? I had similar problems, so this thread will probably help you: https://iot-developer.thalesgroup.com/threads/bgs5t-input-gpio-allways-0...
Here is post from Jedrzej, which helped me the most:
You can read more about GPIO configuration in document: Cinterion® Java Terminals Hardware Interface Description, chapter Configuring GPIO Directions.
Regards,
Jure
Hello,
Please note that the configuration with i2c is only necessary for terminals. If you are using the concept board you need to follow the description in the hardware description for concept board. If you just have the module on DSB75 or other hardware you may only need to enable and configure the GPIO driver with AT commands.
Regards,
Bartłomiej
Thanks Jure and Bartłomiej for your answers.
I was trying it in a custom board and Jure's answer pointed me to the solution.
As Bartłomiej said, I only needed to enable the GPIO driver with AT^SPIO=1.