Problem sending SMS in C


#1

Hi,
I need some help, i try to make the Fastrack supreme 20 sending an sms right after we inject the supply voltage so we’re working on a program in C, but we have some problems with the line:

adl_atCmdSendText( ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), “solde”);

the other ones work the terminal shows OK when we test it but it stops with the adl_atCmdSendText i dont know why…
Well maybe this program will never work for what im trying to do cause it’s totally different than the SMS_automation from the samples in OPEN_AT so i’d be glad if someone could help me with that or giving me some samples or anything.
Thank you.

#include "adl_global.h"

/***************************************************************************/
/*  Mandatory variables                                                    */
/*-------------------------------------------------------------------------*/
/*  wm_apmCustomStackSize                                                  */
/*-------------------------------------------------------------------------*/
/***************************************************************************/
const u16 wm_apmCustomStackSize = 1024;


/***************************************************************************/
/*  Local variables                                                        */
/***************************************************************************/


/***************************************************************************/
/*  Local functions                                                        */
/***************************************************************************/



/***************************************************************************/
/*  Function   : adl_main                                                  */
/*-------------------------------------------------------------------------*/
/*  Object     : Customer application initialisation                       */
/*                                                                         */
/*-------------------------------------------------------------------------*/
/*  Variable Name     |IN |OUT|GLB|  Utilisation                           */
/*--------------------+---+---+---+----------------------------------------*/
/*  InitType          |   |   |   |  Application start mode reason         */
/*--------------------+---+---+---+----------------------------------------*/
/***************************************************************************/
/*s16 Cmgs_Handler(adl_atResponse_t *paras)
{
    adl_atCmdSendText( ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), "repond stp c pour un test");
}*/

void test ( u8 ID )
{
    
    adl_atSendResponse ( ADL_AT_UNS, "\r\nSend SMS\r\n" );
    
    //adl_atCmdCreate("AT+CNMI=0,1,1,1,0", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);
    
    adl_atCmdCreate("AT+CSMP=17,169,0,0", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);
    
    adl_atCmdCreate("AT+CMGF=1", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);
    
    adl_atCmdCreate("AT+csca=0609001390", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);
    
    adl_atCmdCreate("AT+CMGS=950", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);
        
    adl_atCmdSendText( ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), "solde");
}

void adl_main ( adl_InitType_e InitType )
{
    TRACE (( 1, "Embedded Application : Send_Sms" ));
    // TO DO : Add your initialization code here
    adl_tmrSubscribe ( FALSE, 35, ADL_TMR_TYPE_100MS, test );
}

//adl_atCmdCreate("AT+CMGS=0629747477", ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)Cmgs_Handler, ">", NULL);