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 

caller number for mobile terminated calls

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



Joined: 14 Jul 2009
Posts: 26

PostPosted: Thu Nov 19, 2009 4:09 pm    Post subject: caller number for mobile terminated calls Reply with quote

Hi

How do i get caller number of mt (incoming) calls? When i read EF LND (last number dialed elemantary file) i can see caller number. Here are the related parts of my code:

Code:

/// I edited path of another file so i am not sure if this path is correct
/// etsi 11.11 says : 0x6f44 is the path of ef_lnd
u8 PROGMEM ef_lnd_path[] = { 0x3f, 0x00, 0x7f, 0x10, 0x6f, 0x44 };

void turbo_handler (u8 action, void *data)
{
       u8 buff[128], len;

   switch (action)
   {
      case ACTION_APP_INIT:
         /// register sim for incoming calls
         reg_action (ACTION_EVENT_MT_CALL);
         break;
      case ACTION_EVENT_MT_CALL:
         dbsp("incoming call\n");
         /// Is path length really 3? should i use 6?
         read_binary(ef_lnd_path, 3, buff, len);

         /// print current caller number
         dbsp("len: ");  dbch(len);   dbsp("\n");
         for(u8 i = 0 ; i < len; i++) {
            dbch(buff[i]);dbsp(" ");
         }
         dbsp("\n");
         break;
      default:
         break;
   }
}



When I call phone with tm2 from another phone, i get the following result:

Code:

bugra # dbg
Turbo Adapter debug mode initialized, turboadapter.trb
Press ENTER to quit

incoming call
len: 80
00 45 05 00 db 02 62 09 20 b6 e1 0f 5e 00 4c 4b 6f 3a 01 a5 01 4c 97 00 4c 4b 08 13 0c 0c 6f 3a 19 c3 5c 00 00 16 e8 0e 4c 6f 4c 4b 08 8e 08 8f 01 4c 97 00 4c 4b 09 81 4c ea 0e 2a 0e 2a 09 80 14 ed 03 01 09 14 fd 35 fb 01 21 20 0e 4c 01 00 00 16 00 db 02 62 09 21 01 b0 03 46 7b 01 b2 00 16 c2 3d 57 00 7d 8d a3 25 54 d6 14 99 01 00 82 02 83 81 9c 01 00 86 08 11 09 05 75 64 23 XX ff


caller number is at the end part: 90 505 746 32 XX

The problem with this method is; caller number is not always in the same place. I have seen caller number in the middle of the chunk a few times and even worse is,
sometimes it is not even there. Here is one such output:
Code:

incoming call
len: 80
00 45 05 00 db 02 62 09 20 b6 e0 b4 5a b6 ac c5 fe cb cf eb 6f ff 9d bf 97 b7 d7 af df bf 7c ff fa e7 7f bf 5d 7e 7f ef 6b e6 ff ba f6 cf b9 f0 f9 78 5d ef f5 fd 7b b8 5e eb bb ee ff ff f7 cd ef ed 3b db ef af 70 7e 72 bd ee cf 7f db ef 0f 60 00 4c 4b 01 a4 01 a5 01 4c 97 00 4c 4b 08 13 0c 0c 00 1e 19 c3 5c 00 00 16 e8 0e 4c 0e 4c 4b 08 8e 08 8f 01 4c 97 00 4c 4b 09 81 4c ea 0e 2a


I would appreciate if you can tell me a more reliable way of finding caller number or explain why it is not in a fixed position or not even there..

thanks
Back to top
View user's profile Send private message
pz
Guest





PostPosted: Tue Nov 24, 2009 8:14 am    Post subject: Reply with quote

Don't use EF_LDN, the caller number is part of ACTION_EVENT_MT_CALL data. Look at e.g. pager or autoalarm source, it's used/parsed there.
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