# How to make Q2686H kit become a mobile?

**URL:** <https://forum.sierrawireless.com/t/how-to-make-q2686h-kit-become-a-mobile/2615>\
**Category:** Legacy AirPrime modules\
**Created:** [October 22, 2008, 3:41pm UTC](https://forum.sierrawireless.com/t/how-to-make-q2686h-kit-become-a-mobile/2615 "2008-10-22T15:41:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuctho](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@phuctho](https://forum.sierrawireless.com/u/phuctho)\
**Post date:** [October 22, 2008, 3:41pm UTC](https://forum.sierrawireless.com/t/how-to-make-q2686h-kit-become-a-mobile/2615/1 "2008-10-22T15:41:30Z")

</div>

Hi everybody,  
I am thinking about my project with Q2686H/ Q2687. I intend to use matrix keyboard and parallel LCD (which is common and easy to use) to connect to GPIOs. I want to make the Development Kit become a mobile with basic functions like: send sms, call …But now I am confused with the first step: I used GPIO\_19 for output, GPIO\_21 for input. My idea is when input change from low to high the output must change immediately following. But it seems not easy as I thought. When I change the input by connect/disconnect it from the 3V DC point, nothing happens to the output until I use AT+CFUN=1 command to reset modem after changing the input.  
Here my code , firmware C61b, OS 4.11.0

```auto
#include "adl_global.h"

const u16 wm_apmCustomStackSize = 1024;
const adl_ioConfig_t MyGpioConfig1[1]={{ADL_IO_Q2686_GPIO_19,0,ADL_IO_OUTPUT,ADL_IO_LOW}};
const adl_ioConfig_t MyGpioConfig2[1]={{ADL_IO_Q2686_GPIO_21,0,ADL_IO_INPUT}};

s32 MyGpioHandle1;
s32 MyGpioHandle2;

void HelloWorld_TimerHandler ( u8 ID )
{
    s32 ReadValue;
	/* Hello World */
    TRACE (( 1, "Embedded : Hello World " ));
    
	MyGpioHandle1=adl_ioSubscribe (1, MyGpioConfig1,0,0,0);	
	MyGpioHandle2=adl_ioSubscribe (1, MyGpioConfig2,0,0,0);	
	ReadValue=adl_ioReadSingle (MyGpioHandle2,ADL_IO_Q2686_GPIO_21);
	
	if(ReadValue==1)
	{
	MyGpioHandle1=adl_ioSubscribe (1, MyGpioConfig1,0,0,0);
	adl_ioWriteSingle (MyGpioHandle1,ADL_IO_Q2686_GPIO_19,ADL_IO_HIGH);
	}
	else if (ReadValue==0)
	{
	MyGpioHandle1=adl_ioSubscribe (1, MyGpioConfig1,0,0,0);
	adl_ioWriteSingle (MyGpioHandle1,ADL_IO_Q2686_GPIO_19,ADL_IO_LOW);
	
	}

	adl_ioUnsubscribe (MyGpioHandle2);

}
void adl_main ( adl_InitType_e InitType )
{
   
	TRACE (( 1, "Embedded : Appli Init" ));
    
    /* Set 1s cyclic timer */
    adl_tmrSubscribe ( TRUE, 10, ADL_TMR_TYPE_100MS, HelloWorld_TimerHandler );

}
```

I know that something wrong, I have tried many other ways. But nothing better.  
Please help me! Is my project possible? Thanks a lot for all suggestions!

---

<div class="post-metadata">

**Author:** ![cjpking](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@cjpking](https://forum.sierrawireless.com/u/cjpking)\
**Post date:** [October 22, 2008, 11:22pm UTC](https://forum.sierrawireless.com/t/how-to-make-q2686h-kit-become-a-mobile/2615/2 "2008-10-22T23:22:07Z")

</div>

I think U have 2 mistakes,

- don’t subscribe GPIO in a timer handler, need to be in adl\_main, because GPIO handle just need to be subscribed once

- and also use GPIO event to handle IO input event. don’t use timer event.

-jimmy C
