bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question about the SMS

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
bywuu



Joined: 04 Aug 2011
Posts: 29

PostPosted: Fri Aug 19, 2011 5:31 am    Post subject: Question about the SMS Reply with quote

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
View user's profile Send private message
bywuu



Joined: 04 Aug 2011
Posts: 29

PostPosted: Fri Aug 19, 2011 10:31 am    Post subject: Reply with quote

I saw there was one similar question :
http://www.bladox.com/forum/viewtopic.php?t=395&highlight=sms

then could pz/anyone please give me an example about using the dcs_78()?I failed in using this.

many thanks!
Back to top
View user's profile Send private message
bywuu



Joined: 04 Aug 2011
Posts: 29

PostPosted: Mon Aug 22, 2011 4:48 am    Post subject: Reply with quote

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 Sad

Any information will be helpful,thanks!
Back to top
View user's profile Send private message
pz



Joined: 12 Mar 2004
Posts: 1161

PostPosted: Mon Aug 22, 2011 10:12 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
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