# GPIO control via AT commands

**URL:** <https://forum.sequans.com/t/gpio-control-via-at-commands/279>\
**Category:** LTE-M / NB-IoT (Monarch)\
**Created:** [November 18, 2025, 5:24pm UTC](https://forum.sequans.com/t/gpio-control-via-at-commands/279 "2025-11-18T17:24:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LMR](https://dub1.discourse-cdn.com/flex018/user_avatar/forum.sequans.com/lmr/32/70_2.png) [@LMR](https://forum.sequans.com/u/LMR)\
**Post date:** [November 18, 2025, 5:24pm UTC](https://forum.sequans.com/t/gpio-control-via-at-commands/279/1 "2025-11-18T17:24:15Z")

</div>

I am currently working with a GM02SP-based design and the Nektar EVK, using firmware version **UE8.2.0.5**. I need to control **GPIO5 (PCM\_FS)** as a digital output during **normal operation** in order to drive an RF antenna-switch.

I have reviewed the AT Commands Reference Manual (LR 8.2) and attempted to use the **AT+SMGT** GPIO control command in manufacturing mode. The procedure used was:

AT+CFUN=5  
AT+SMGT=0,0,0x20,0,0,0x20  
AT+SMGT=0,0x20,0,0,0x20,0  
AT+SMGT=0,0,0x20,0,0,0x20

without success. Questions:

1. **Is GPIO5 / PCM\_FS exposed as a controllable GPIO on the GM02SP with firmware UE8.2.0.5?**
2. **If controllable:**
  - What is the correct bitmask and parameter position for AT+SMGT to set GPIO5 high/low?

  - Is any pinmux configuration required to free PCM\_FS from its peripheral function?

3. **If not controllable:**
  - Is there a firmware option, configuration file, or custom build that allows PCM\_FS to be reassigned as a GPIO for application use?

4. **Is there an alternative AT command or recommended method to control a general-purpose output pin during runtime for RF switch control?**

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Xi\_liu](https://avatars.discourse-cdn.com/v4/letter/x/8e8cbc/32.png) [@Xi\_liu](https://forum.sequans.com/u/Xi_liu)\
**Post date:** [November 20, 2025, 8:18am UTC](https://forum.sequans.com/t/gpio-control-via-at-commands/279/2 "2025-11-20T08:18:10Z")

</div>

Hello

```
Here is the way to use GPIO on GM02SP:

```

1. Check if GPIO is enabled by AT command AT+SQNHWCFG. If GPIO5 function is enabled, you will get below result:

```auto
at+cfun=5
OK
at+sqnhwcfg=“gpio5”
+SQNHWCFG: gpio5: enable, polarity: normal, direction: output, value: low

OK

```

1. Reset to normal mode and check GPIO5 status:

```auto
at^reset
OK

+SHUTDOWN

+SYSSTART

OK
at+sqngpio=“gpio5”
gpio5: normal output low

OK

```

1. set GPIO5 to high and check its status:

```auto
at+sqngpio=“gpio5”,“normal”,“output”,“high”
OK
at+sqngpio=“gpio5”
gpio5: normal output high

OK

```

---

<div class="post-metadata">

**Author:** ![cmchen](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@cmchen](https://forum.sequans.com/u/cmchen)\
**Post date:** [November 20, 2025, 8:18am UTC](https://forum.sequans.com/t/gpio-control-via-at-commands/279/3 "2025-11-20T08:18:12Z")

</div>

Hi Luis,

1\ In fact, GPIO5 is disable by default. Then you have to enter following command prior test it:

AT+CFUN=5

AT+SQNHWCFG=“gpio5”,”enable”

AT^RESET

2\ Following command set GPIO 5 to high with normal  
polarity(GPIO as output):

AT+CFUN=5  
AT+SMGT=0,0,0x20,0,0,0x20

---

<div class="post-metadata">

**Author:** ![LMR](https://dub1.discourse-cdn.com/flex018/user_avatar/forum.sequans.com/lmr/32/70_2.png) [@LMR](https://forum.sequans.com/u/LMR)\
**Post date:** [November 20, 2025, 8:41am UTC](https://forum.sequans.com/t/gpio-control-via-at-commands/279/4 "2025-11-20T08:41:28Z")

</div>

> [@Xi\_liu](#):
>
> `at+sqngpio=“gpio5”,“normal”,“output”,“high”`

This worked.  
In my firmware version, GPIO5 is enabled by default.

Thank you very much.  
Luis
