hi. I wanted to write an easy code to start programming. I wrote this code in Visual studio, but the mc60 module not send message and not call me.
could you say me my problems?
thank you.
#ifdef CUSTOMER_CODE
#include “ril.h”
#include “ril_util.h”
#include “ril_sms.h”
#include “ril_telephony.h”
#include “ril_system.h”
#include “ql_stdlib.h”
#include “ql_error.h”
#include “ql_trace.h”
#include “ql_uart.h”
#include “ql_system.h”
#include “ql_memory.h”
#include “ql_timer.h”
#include “ql_type.h”
#include “ql_gpio.h”
char strPhNum[] = “+989365671037\0”;
char strTextMsg[] = “Quectel Module SMS Test\0”;
u32 nMsgRef;
u32 iResult;
u32 a=1;
u8 ss;
s32 res;
u32 b=1;
u32 rrr=1;
void proc_main_task(s32 taskId)
{
// Specify a GPIO pin
Enum_PinName gpioPin = PINNAME_RI;
// Initialize the GPIO pin (output high level, pull up)
Ql_GPIO_Init(gpioPin, PINDIRECTION_OUT, PINLEVEL_HIGH, PINPULLSEL_PULLUP);
while (TRUE)
{
if(b==1){rrr= RIL_Telephony_Dial(ss, strPhNum, res);}
ST_RIL_SMS_SendExt sExt;
Ql_memset(&sExt, 0x00, sizeof(sExt));
if(a==1){ Ql_Sleep(10000);
iResult = RIL_SMS_SendSMS_Text(strPhNum, Ql_strlen(strPhNum), LIB_SMS_CHARSET_GSM, strTextMsg, Ql_strlen(strTextMsg), &nMsgRef);
a=2;}
// Set the GPIO level to low after 500ms.
if (iResult == RIL_AT_SUCCESS)
{a=1;
Ql_Sleep(500);
Ql_GPIO_SetLevel(gpioPin, PINLEVEL_LOW);
// Set the GPIO level to high after 500ms.
Ql_Sleep(500);
Ql_GPIO_SetLevel(gpioPin, PINLEVEL_HIGH);
iResult=0;
}
}
}
#endif