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 

Reading SMS data

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





PostPosted: Wed Jan 04, 2006 12:12 pm    Post subject: Reading SMS data Reply with quote

Hi,
I want to somehow get information from an sms that was recieved, my code has the following:

Called when a sms is recieved
Code:
   
case ACTION_SMS:
    stk_thread(message_rec, data);


This is the signature of the function i have that wants to get information from the sms recieved. Is this correct?
Code:

void message_rec (File_apdu_data *fd)


If all is ok, how can i go about extracting such things as the message text from the data passed ot the function?

Thanks
Mitch
Back to top
pz
Guest





PostPosted: Thu Jan 05, 2006 11:57 am    Post subject: Reply with quote

Please look at source of e.g. pager, it's used there.

u8 * data=fd->data points on the actual SMS received as being stored to EF_SMS (see 11.11), skip 1 byte (state), few bytes SMSC (first bytes is the length to skip) and you are at the beginning of TPDU itself. There is tpdu_seek() to get to the position of needed data (e.g. the text itself).
Back to top
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