 |
bladox.com Turbo SIM Toolkit Adapter Forums
|
View previous topic :: View next topic |
Author |
Message |
bywuu
Joined: 04 Aug 2011 Posts: 29
|
Posted: Fri Aug 19, 2011 5:31 am Post subject: Question about the SMS |
|
|
Hi,
I got a problem when I send message to another phone.
I sent "1234567" to my phone but I received "1dL!SFM@", why ?
Does that mean the message has been encrypted?(I didn't use the encrypt method)or does that mean the code Scheme need do some adjust?
Code: |
#define MAX_SMS_LEN 200
u8 PROGMEM t_Foo_en[] = "1234567";
lc_char PROGMEM lc_Sending_sms[]=
{
LC_EN("sending message")
LC_END
};
u8 send_my_sms (SCtx * ctx,u8 action)
{
if(action == APP_ENTER)
{
u8 *v;
u8 *tmp = malloc (100);
u8 *ms = str2msisdn (t_ms, MSISDN_ADN, MEM_R);
memcpy (tmp, t_Foo_en, sizeof (t_Foo_en)); // answer
v = malloc (MAX_SMS_LEN);
// sms to ME
send_sms (tmp, sizeof (t_Foo_en), ms, MSISDN_ADN, 0, 0, locale (lc_Sending_sms), v);
free (tmp);
free (ms);
free(v);
return APP_BACK;
}
return APP_OK;
}
SNodeP ex_n_4 = { lc_Text_4, send_my_sms };
.......
.......
.......
void turbo_handler (u8 action, void *data)
{
switch (action)
{
case ACTION_APP_INIT:
set_proc_8 (PROC_8_LANGUAGE, LC_ENGLISH);
break;
case ACTION_INSERT_MENU:
insert_menu (t_menu);
break;
case ACTION_MENU_SELECTION:
stk_thread (action_menu, data);
break;
default:
break;
}
}
|
|
|
Back to top |
|
 |
bywuu
Joined: 04 Aug 2011 Posts: 29
|
|
Back to top |
|
 |
bywuu
Joined: 04 Aug 2011 Posts: 29
|
Posted: Mon Aug 22, 2011 4:48 am Post subject: |
|
|
PZ,can you give me some advice?
Code: |
u8 managedMessage =dcs_78(t_Foo_en,sizeof(t_Foo_en),DCS_8_TO_7);
memcpy (tmp, t_Foo_en, managedMessage);
send_sms (tmp, managedMessage, ms, MSISDN_ADN, 0x00, 0, NULL, NULL);
|
This is still wrong message,I don't know where goes wrong
Any information will be helpful,thanks! |
|
Back to top |
|
 |
pz
Joined: 12 Mar 2004 Posts: 1161
|
Posted: Mon Aug 22, 2011 10:12 am Post subject: |
|
|
dcs_78() stores the output into the same buf you provide as input, t_Foo_en is PROGMEM i.e. read only.
Code: |
memcpy (tmp, t_Foo_en, sizeof (t_Foo_en));
managedMessage =dcs_78(tmp,sizeof(t_Foo_en),DCS_8_TO_7);
send_sms (tmp, managedMessage, ms, MSISDN_ADN, 0x00, 0, NULL, NULL);
|
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|