# problems with mesuring power

**URL:** https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604
**Category:** Development tools
**Created:** [October 19, 2008, 11:47am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604 "2008-10-19T11:47:30Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![fonix](https://avatars.discourse-cdn.com/v4/letter/f/ecccb3/32.png) [@fonix](https://forum.sierrawireless.com/u/fonix)
#### Post date: [October 19, 2008, 11:47am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/1 "2008-10-19T11:47:30Z")

</div>

Hi,  
Now i’m doing a program to measure voltage . I’m having hardware problem now “where should i connect the voltage source?” . I try to connect to one of the ADC “AUX/ADC” and it’s not working. Then we try to connect to the "CT103/TXD1 " , it’s also not working!! so if you know where to connect please help us!  
best regards,  
fonix  
p.s i put some link to the photo how we connect .  
[i274.photobucket.com/albums/jj27 … MG2229.jpg](http://i274.photobucket.com/albums/jj277/metalfonix/CIMG2229.jpg)  
[i274.photobucket.com/albums/jj27 … MG2221.jpg](http://i274.photobucket.com/albums/jj277/metalfonix/CIMG2221.jpg)

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [October 24, 2008, 8:45am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/2 "2008-10-24T08:45:24Z")

</div>

Hi,  
I’m friend of Fonix . We doing a school project about how to mesure voltage using Q2686 . This is the code we copy form some place and use it . We not sure if it’s correct or not . If we run the program run smoothly . But we don’t get the value we want . The code say it read from flash memory . But we not sure if ADC save the value in the flash memory or not . Even if it save into the flash memory we don’t the address to retrive . Please help us . We use both AUX/ADC ( ADC) and GPIO34 . both are not working . Please help us !!

```auto
s32 sLen;
static const ascii * tele_NameBuffer = "Wavecom Telemetry";

static const ascii * _TELE_STR_TL_CMD = "at+TEL";
static const ascii * _TELE_STR_IOSET_CMD = "at+IOSET";
static const ascii * TELE_STR_TELESTART_CMD = "at+TELESTART";
#define TELE_STR_TL_CMD ( ascii * ) _TELE_STR_TL_CMD
#define TELE_STR_IOSET_CMD ( ascii * ) _TELE_STR_IOSET_CMD

// Boundaries for Wireless CPU
static u8 TELE_IO_MIN;
static u8 TELE_IO_MAX;

// Label conversion macros
#define TELE_IO_VALUE2LABEL(_x) ( _x - TELE_IO_MIN + 1 )
#define TELE_IO_LABEL2VALUE(_x) ( _x - 1 + TELE_IO_MIN )

static adl_ioProductTypes_e telemetry_ProductType;
static u32 GpioPollingTime = 30; // in 1/10 of a second
static ascii reportnumber [20];
static s8 sms_telemetry_Handle_txt;
static s8 telemetry_internal_handle = ERROR;
static bool telemetry_appliState = FALSE; // Application Main State 
static bool extSendSMS = FALSE;
static u8 TELE_TRACE_LEVEL;
static ascii * tele_PinCode;

// Features reserved GPIOs
static u8 tele_ReservedIoForFeaturesCount;
static u8 tele_ReservedIoForFeatures [ADL_IO_MAX_NB];

// Available GPIOs for subscription
static u8 tele_AvailableIoCount;
static u8 tele_AvailableIo [ADL_IO_MAX_NB];

// Currently subscribed GPIOs
static u8 tele_CurrentIoTableCount;
static u8* tele_CurrentIoTable;

// GPIO events handle
static s8 tele_GpioEventHandle;

// Last read inputs
static adl_ioRead_t * tele_ioLastReadInputs;

// Running retry timer structure
static adl_tmr_t * tele_tmrRetryHandle;
static u16 TELE_OBJECT_FLASH_IOSET;
//void tele_GpioSubscription ( void )
//{
    
//}
void adl_main ( adl_InitType_e InitType )
{
    
    TRACE (( 1, "Embedded Application : Main" ));
    tele_CurrentIoTable = adl_memGet ( sLen );
            
            // Read settings from flash
            adl_flhRead ( tele_NameBuffer, TELE_OBJECT_FLASH_IOSET, sLen, tele_CurrentIoTable );
            tele_CurrentIoTableCount = sLen;
            TRACE (( 1, "GPIO settings read from flash (%d GPIO)", tele_CurrentIoTableCount ));
}
```

Best regards,  
Thia  
ps. this is the trace we get .  
[i274.photobucket.com/albums/jj27 … screen.jpg](http://i274.photobucket.com/albums/jj277/metalfonix/screen.jpg)

---

<div class="post-metadata">

### Author: ![Matt\_Otto](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Matt\_Otto](https://forum.sierrawireless.com/u/Matt_Otto)
#### Post date: [October 24, 2008, 3:26pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/3 "2008-10-24T15:26:58Z")

</div>

1. ADC values are not stored in flash (unless you write them there yourself).
2. The ADL library doesn’t seem to support reading the ADC directly. Yet another missing feature of ADL.

So, it looks like you have to use “AT+ADC?”. Since you’re writing an ADL application, you probably want something like:

```auto
adl_atCmdCreate("AT+ADC?", FALSE, YourResponseHandler, "+ADC: ", NULL);
```

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [October 30, 2008, 8:27am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/4 "2008-10-30T08:27:06Z")

</div>

Thank Matt Otto for your reply!  
The code i write for the checking for voltage value from ADC is as shown below.

```auto
u8 ADC_Response_Handler (adl_atResponse_t *paras)
{
    /*none of the response of the ‘at+clcc’ command is subscribed but because
the 2nd argument is set to true, all will be sent to the external application*/

adl_atCmdCreate("AT+ADC?", TRUE, (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);
return TRUE;
}

/* atd callback function*/
void atADC_Handler(adl_atCmdPreParser_t *paras)
{
adl_atCmdUnSubscribe("AT+ADC?",
            (adl_atCmdHandler_t) atADC_Handler);

/*we unsubscribe the command so that when we resend the command
*it wont be received by the ADL parser anymore.*/
/*we resend the command( for the phone call to be made) and subscribe to some of its responses. We also set the 2nd argument to True so that the response not subscribed will be directly send to the external application */
/*adl_atCmdCreate("AT+ADC",
            FALSE,
            (adl_atRspHandler_t) ADC_Response_Handler,
            "OK",
            "OK",
            "OK",
            NULL);*/
}
/*main function*/
void adl_main ( adl_InitType_e InitType ){
    /*Subscribe to the ‘atd’ command.*/
    adl_atCmdSubscribe("AT+ADC?",(adl_atCmdHandler_t)atADC_Handler,ADL_CMD_TYPE_READ);
    TRACE (( 1," Send SMS: %d ",adl_atCmdSubscribe ));
    TRACE (( 1," Send SMS: %d ",adl_atCmdCreate ));
    TRACE (( 1," Send SMS: %d ",adl_atCmdUnSubscribe ));
    
}
```

but the trace i got is Trace   
1851790399  
1851795441  
1851790488

is there smth wrong with my code?  
Please tell me what wrong?  
Thank for the help!!!

best regrad,  
thia

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [October 30, 2008, 8:47am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/5 "2008-10-30T08:47:33Z")

</div>

> [@thia](#):
>
> but the trace i got is Trace   
> 1851790399  
> 1851795441  
> 1851790488

So what else were you expecting from

```auto
TRACE (( 1, " Send SMS: %d ", adl_atCmdSubscribe ));
    TRACE (( 1, " Send SMS: %d ", adl_atCmdCreate ));
    TRACE (( 1, " Send SMS: %d ", adl_atCmdUnSubscribe ));
```

❓

In ‘C’, when you give a function name - such as adl\_atCmdSubscribe - without the parentheses, you are referring to its address

Thus your Trace does seem to be correctly displaying the addresses of those functions!

I guess that’s not what you actually wanted… ❓

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [October 30, 2008, 9:11am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/6 "2008-10-30T09:11:13Z")

</div>

thank anweii for your reply! i now manage to get the value 0 already.  
now what we need is a program to read the voltage converted from ADC! anyone has any idea how we can start with!!  
Thank You  
best regrad,  
thia

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [October 30, 2008, 9:54am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/7 "2008-10-30T09:54:34Z")

</div>

Your code is a bit of a mess - lots of the comments don’t match the code they accompany - it looks like you’ve been hacking about with it without much of a plan.

So start again, and go back to basics:

First, study the Product Technical Spec (PTS) for your module carefully to see how the hardware works;

Then, study the AT Commands manual to see how to use the AT commands - including AT+ADC;

Then, experiment with sending the AT+ADC command manually from Hypoterminal or the Wavecom terminal emulator.

Then, When you’ve got the hang of how it works, try sending the command and handling the responses in an Open-AT application.

Be sure to include plenty of tracing!

---

<div class="post-metadata">

### Author: ![Matt\_Otto](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Matt\_Otto](https://forum.sierrawireless.com/u/Matt_Otto)
#### Post date: [October 30, 2008, 1:23pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/8 "2008-10-30T13:23:00Z")

</div>

> [@awneil](#):
>
> Your code is a bit of a mess - lots of the comments don’t match the code they accompany - it looks like you’ve been hacking about with it without much of a plan.
> 
> So start again, and go back to basics

I agree with awneil. You now have enough information to make it work, but your programming skills need work. At this point your teacher will do a better job helping you put the pieces together than we will. (That’s what they’re there for!)

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [October 31, 2008, 8:02am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/9 "2008-10-31T08:02:10Z")

</div>

Hi,  
We were able to find out the voltage value using the command AT+ADC?. But we are not sure how to use the command in the Open AT application.  
Anyone have any sample program for sending command with the Open AT application or can i find any sample program about it anywhere? We hope to use it as reference for our program.Thank You.

Best Regard,  
thia

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [October 31, 2008, 9:31am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/10 "2008-10-31T09:31:02Z")

</div>

Your Open-AT SDK includes a whole bundle of samples!

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [November 15, 2008, 10:49am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/11 "2008-11-15T10:49:43Z")

</div>

we were able to run the command using the program but i encounter some problems when i was trying to send out the results of the command. This is the progamming code that i had written

```auto
ascii a[20]="+6594868899"; 
ascii string[100]; 
ascii SmsTel[20]="+6581507582";
ascii SmsTimeorLength[20]="1000";
ascii SmsText[20]="hi";
u32 h,g,d,z;
u32 s;
s8 j,k;
bool SMS_TELE_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
    return TRUE;
}
void SMS_TELE_ctrl_Handler ( u8 Event, u16 Nb )  
{ 
// Switch on event 
switch ( Event ) 
{ 
case ADL_SMS_EVENT_SENDING_OK : 
TRACE (( 1, "Report OK" )); 
break; 

case ADL_SMS_EVENT_SENDING_ERROR : 
TRACE (( 1, "Report sending error %d", Nb )); 
adl_atSendResponse ( ADL_AT_UNS, "\r\nFailed...\r\n" ); 

// Check for 512 
if ( Nb == 512 ) 
{ 
// Please Wait error... retry in 2 seconds 
TRACE (( 1, "Retry later..." )); 
//adl_tmrSubscribe ( FALSE, 20, ADL_TMR_TYPE_100MS, tele_tmrRetryHandler ); 
} 
break; 
} 
}

s16 ADC_Response_Handler (adl_atResponse_t *paras)
{
    adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);
return TRUE;
//adl_strGetResponse (adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL));
}
void atadc_Handler(adl_atCmdPreParser_t*paras)
{
    adl_atCmdUnSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler);
adl_atCmdCreate(paras->StrData,
            TRUE,
            (adl_atRspHandler_t) ADC_Response_Handler,
            ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ),
            "OK",
            "OK",
            NULL);

}
void tele_tmrRetryHandler ( u8 ID )
{ 
h=adl_smsSubscribe( SMS_TELE_Handler, SMS_TELE_ctrl_Handler, ADL_SMS_MODE_TEXT ); //<------
s=adl_smsSend(h,a,adl_strGetResponse (adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL)),ADL_SMS_MODE_TEXT); //<-----
j=adl_smsUnsubscribe(h);//<-----
TRACE ((1, " Send SMS: %d ", s));
TRACE ((1, " Send SMS: %d ", j)); 

}
void adl_main ( adl_InitType_e InitType ) 
{ 
adl_tmrSubscribe ( FALSE, 350, ADL_TMR_TYPE_100MS, tele_tmrRetryHandler );
g=adl_atCmdSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler,ADL_CMD_TYPE_READ|ADL_CMD_TYPE_TEST|ADL_CMD_TYPE_ACT|ADL_CMD_TYPE_PARA|0x0011);
k=adl_atCmdUnSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler);
z=adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ) , (adl_atRspHandler_t)ADC_Response_Handler, "*", NULL);
TRACE (( 1," Send SMS: %d ",g ));
TRACE (( 1," Send SMS: %d ",k ));
TRACE ((1, " Send SMS: %d ", h));
}
```

the trace i got for the adl\_smsSend is -2, which mean parameter error  
Can anyone help mi? Is there anything wrong with my code?  
Best Regard  
thia

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [November 15, 2008, 12:04pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/12 "2008-11-15T12:04:03Z")

</div>

> [@thia](#):
>
> Is there anything wrong with my code?

Well, clearly there must be - otherwise you wouldn’t be getting an error, would you?!

But your code as presented is almost totally unreadable! 😮

Please take the time to reformat it so that it is legible;  
Clear out all the junk that is no longer relevant;  
Consider meaningfule names for your variables;  
Comment it carefully - including the variable definitions;  
Make sure it still compiles, and look at it carefully in the preview before you post it.

In doing this, you may well find the fault yourself!

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [November 15, 2008, 12:36pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/13 "2008-11-15T12:36:29Z")

</div>

i am sorry about the messy code. The code is still able to compile and i think the onli problem for the code is this line

```auto
s=adl_smsSend(h,a,adl_strGetResponse (adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL)),ADL_SMS_MODE_TEXT);
```

Is the adl\_strGetResponse used in the correct way?  
if i just change the adl\_strGetResponse to a normal ascii string it was able to work.  
i wanted to get the results of the at command i use.

```auto
ascii phonenumber[20]="+6594868899"; 
ascii SmsTel[20]="+6581507582";
ascii SmsTimeorLength[20]="1000";
ascii SmsText[20]="hi";
u32 smsSu,CmdSu,CmdCreate;
u32 smsSend;
s8 smsUn,CmdUn;
bool SMS_TELE_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
    return TRUE;
}
void SMS_TELE_ctrl_Handler ( u8 Event, u16 Nb )  
{ 
switch ( Event ) 
{ 
    case ADL_SMS_EVENT_SENDING_OK : 
    TRACE (( 1, "Report OK" )); 
    break; 

    case ADL_SMS_EVENT_SENDING_ERROR : 
    TRACE (( 1, "Report sending error %d", Nb )); 
    adl_atSendResponse ( ADL_AT_UNS, "\r\nFailed...\r\n" ); 

if ( Nb == 512 ) 
{ 
    TRACE (( 1, "Retry later..." )); 
} 
break; 
} 
}
s16 ADC_Response_Handler (adl_atResponse_t *paras)
{
    adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);
return TRUE;
}
void atadc_Handler(adl_atCmdPreParser_t*paras)
{
    adl_atCmdUnSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler);
    adl_atCmdCreate(paras->StrData,
            TRUE,
            (adl_atRspHandler_t) ADC_Response_Handler,
            ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ),
            "OK",
            "OK",
            NULL);
}
void tele_tmrRetryHandler ( u8 ID )
{ 
    smsSu=adl_smsSubscribe( SMS_TELE_Handler, SMS_TELE_ctrl_Handler, ADL_SMS_MODE_TEXT ); 
    smsSend=adl_smsSend(smsSu,phonenumber,adl_strGetResponse (adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL)),ADL_SMS_MODE_TEXT); 
    smsUn=adl_smsUnsubscribe(smsSu);
    TRACE ((1, " Send SMS: %d ", smsSend));
    TRACE ((1, " Send SMS: %d ", smsUn)); 

}
void adl_main ( adl_InitType_e InitType ) 
{ 
    adl_tmrSubscribe ( FALSE, 350, ADL_TMR_TYPE_100MS, tele_tmrRetryHandler );
    CmdSu=adl_atCmdSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler,ADL_CMD_TYPE_READ);
    CmdUn=adl_atCmdUnSubscribe("at+adc?\x1A",(adl_atCmdHandler_t)atadc_Handler);
    CmdCreate=adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ) , (adl_atRspHandler_t)ADC_Response_Handler, "*", NULL);
    TRACE (( 1," Send SMS: %d ",CmdSu ));
    TRACE (( 1," Send SMS: %d ",CmdUn ));
    TRACE ((1, " Send SMS: %d ", CmdCreate));
}
```

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [November 15, 2008, 2:01pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/14 "2008-11-15T14:01:32Z")

</div>

> [@thia](#):
>
> i am sorry about the messy code.

So why don’t you tidy it up?

If the code is messy and hard to read, how can you expect to uderstand it?  
How can you expect to spot the errors.

Again, the effort you put into making your code clear and easy to ready will be repaid many times when you need to debug and maintain it!

> [@](#):
>
> Is the adl\_strGetResponse used in the correct way?

What does the manual say?

Again, if you lay it out clearly, and comment it carefully, it will be clearly obvious whether the way you are using it is correct!

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [November 16, 2008, 6:51am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/15 "2008-11-16T06:51:17Z")

</div>

the manual say

```auto
adl_strGetResponse(adl_strID_e RspID);
```

where the RspId is the response ID from which to get the string.  
But mine, the results is shown in the terminal emulator.  
when i run the program i would get +ADC:(4145,1389,1377) followed by a OK  
can i use adl\_strGetResponse to get the +ADC:(4145,1389,1377) from the terminal emulator?

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [November 16, 2008, 3:45pm UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/16 "2008-11-16T15:45:48Z")

</div>

> [@thia](#):
>
> the manual say … RspId is the response ID from which to get the string.

Yes, that is what adl\_strGetResponse requires as its parameter - so what are you actually passing in that parameter…?

---

<div class="post-metadata">

### Author: ![thia](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@thia](https://forum.sierrawireless.com/u/thia)
#### Post date: [November 17, 2008, 1:46am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/17 "2008-11-17T01:46:27Z")

</div>

> [@](#):
>
> so what are you actually passing in that parameter…?

the parameter that i pass in is

```auto
adl_atCmdCreate("at+adc?\x1A", ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE ), (adl_atRspHandler_t)ADC_Response_Handler, "+ADC: ", NULL);
```

but is it correct?  
i am not sure what to pass in if i want to get the results from the terminal emulator.

---

<div class="post-metadata">

### Author: ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)
#### Post date: [November 17, 2008, 7:59am UTC](https://forum.sierrawireless.com/t/problems-with-mesuring-power/2604/18 "2008-11-17T07:59:52Z")

</div>

> [@thia](#):
>
> but is it correct?

Again, look it up in the manual:

You already know what adl\_strGetResponse requires as its parameter - so does the return value from adl\_atCmdCreate make sense here…?

What does the manual tell you that adl\_atCmdCreate actually does…?
