stefan
Joined: 27 Mar 2009 Posts: 1
|
Posted: Fri Mar 27, 2009 9:30 am Post subject: send sms problems |
|
|
Hello, i'm having some problems with my turbosim.
1. it takes a long time for the phone to connect to the network and the connection drops every approx 15 secs.
2. i created a simple sms application from the samples but it only sends the sms once (sometimes twice), the following is the code.
Code: |
#include <config.h>
#include <turbo/turbo.h>
#include <stdlib.h>
u8 PROGMEM t_menu[] = "SMS send";
u8 PROGMEM t_ms[]="0621879593";
u8 PROGMEM t_sms_ex[]="Example sms content";
void action_menu ( void* data )
{
u8 * ms=str2msisdn(t_ms, MSISDN_ADN, MEM_R);
u8 * sms=malloc(100);
u8 * r =sms;
r = sprints (r, t_sms_ex);
r = sprintc (r, '\0');
send_sms(sms, r-sms, ms, MSISDN_ADN, 0xF6, 0x00, NULL, NULL);
free(sms);
free(ms);
}
void turbo_handler (u8 action, void *data)
{
switch (action)
{
case ACTION_INSERT_MENU:
insert_menu (t_menu);
break;
case ACTION_MENU_SELECTION:
stk_thread (action_menu, data);
break;
default:
break;
}
}
|
|
|