adl_callSetup

Hello to all.

I read some topics regarding call return but i can not find answer to my questions.

The idea is simple and it look like in this topic:
wavecom.com/modules/movie/sc … php?t=1406

If i use

i land up in the ADL_CALL_EVENT_RELEASE_ID event and no call back is made ?

Then i have tried with example form wavecom:

s16 ATD_Response_Handler(adl_atResponse_t *paras)
	{
		adl_atCmdCreate("at+clcc",ADL_AT_PORT_TYPE ( paras->Port, TRUE),(adl_atRspHandler_t)NULL,NULL);
		return TRUE;
	}
	void ATD_Handler(adl_atCmdPreParser_t *paras)
	{
		adl_atCmdUnSubscribe("atd",(adl_atCmdHandler_t) ATD_Handler);
		adl_atCmdCreate(paras->StrData,TRUE,(adl_atRspHandler_t)ATD_Response_Handler,ADL_AT_PORT_TYPE ( paras->Port, TRUE), "+WIND: 2","OK",NULL);
	}
void adl_main ( adl_InitType_e InitType ){		adl_atCmdSubscribe("atd",(adl_atCmdHandler_t)ATD_Handler,ADL_CMD_TYPE_ACT);
}

but i get error:

error: ‘struct ’ has no member named ‘Port’

The question is simple. How to make callback ?

That indicates that a Call-ID must have been created (see +WIND: 5) and has been released (see +WIND: 6); ie, the call was dropped.

What other events did you receive?
Are you sure that the phone number was correct?
Did the called number ring?
Did it answer?
etc, etc…

Which example, precisely, was that?

Which line gave that error?

s16 ATD_Response_Handler( adl_atResponse_t *paras ) 
   { 
      adl_atCmdCreate
      (
            "at+clcc",
            ADL_AT_PORT_TYPE ( paras->Port, TRUE ),  // Error here??
            (adl_atRspHandler_t)NULL,
            NULL
      ); 
      return TRUE; 
   }

Note that the adl_atResponse_t structure does not contain a ‘Port’ element…

If i call from terminal emulator, then i get
atd1234567

+WIND: 5,1
NO CARRIER
+WIND: 6,1
So this part is OK.

I put this into main an there’s no additional messages or wind indicators on target restart. Phone call is correct.

Did the called number ring?
NO

Did it answer?
NO

I tried to put some definitions instead “Port” but without success.
How do you define one for this matter ?.

Hi Alan !

Maybe the problem is about ADL_PORT_OPEN_AT_VIRTUAL_BASE… See comment under adl_callSetup ! It says that adl_callSetup runs adl_callExtSetup on ADL_PORT_OPEN_AT_VIRTUAL_BASE. Then it says that related events will NOT be forwarded to any external port as the command was running on Open AT port…

Here are the structures definitions of the adl_at.h (Open AT 3.12). The “Port” attribut you were trying to use is only available for adl_atCmdPreParser_t structure :

/****************************************************************************/
/*  Body structures assosciated to AT Messages                              */
/****************************************************************************/
/* --------------------------------- */
/* Body for response message type :  */
/* --------------------------------- */
typedef struct  
{
#ifndef __REMOTETASKS__
  adl_strID_e           RspID;
  adl_atPort_e          Dest;
#else
  u8                    RspID;
  u8                    Dest;
#endif
  u16                   StrLength;
  ascii                 StrData[1];
} adl_atResponse_t;

/* ------------------------------------ */
/* Body for unsolicited message type :  */
/* ------------------------------------ */
typedef struct
{
#ifndef __REMOTETASKS__
  adl_strID_e           RspID;
  adl_atPort_e          Dest;
#else
  u8                    RspID;
  u8                    Dest;
#endif
  u16                   StrLength;
  ascii                 StrData[1];
} adl_atUnsolicited_t;

/* -------------------------------- */
/* Body for command message type :  */
/* -------------------------------- */
typedef struct
{
    u16             Type;       // Cmd type
    u8              NbPara;     // Parameters number
#ifndef __REMOTETASKS__
    adl_atPort_e    Port;       // Source port
#else
    u8              Port;
#endif
    wm_lst_t        ParaList;   // Parameters list
    u16             StrLength;  // Command string length
    ascii           StrData[1]; // Command string
} adl_atCmdPreParser_t;

#endif // __ADL_AT_H__

Nice… i would never come to this. What can i do now ?

But isn’t there some basic working example how to make callback
thru adl_callSetupExt function ?

Well, if you look well into the definitions i’ve post, you can see that “adl_atResponse_t” structure as an “adl_atPort_e” attribut, which is called “Dest”. That should be what you’re looking for…

About this question, you’re the only one who can answer… Where did you get this code from ? From this forum ? From Wavecom included examples ? etc…