×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Retrieving SIM information

    Hi!

    I'm sure this has been discussed in detail somewhere, but all my attempts to find any information on the same have not been successful.

    There are two things I really wanted to know.
    1) Is there any way to identify a SIM card? The IMEI number is of the handset, so I guess, any SIM card in the handset will give the same number.
    The idea is, to have a phone-number based log-in. Since we cannot retrieve the phone number from the SIM card, is there any other data that I could retrieve, that can uniquely identify a SIM card? Something similar to IMEI for handsets.
    At the server side, I can always construct a data-base with this unique data with phone numbers.

    2) Is there any way to check for the presence of a SIM card? I just want to check if there is a SIM card physically present or not.
    One solution (I thought) was if I could check for some standard information (part 1) and found none, I could assume there is no sim card. But, is there any module that would do the same?

    Thanks
    Kedar

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Retrieving SIM information

    Search this forum for IMSI (and Wikipedia for an explanation of what it is).

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    179

    Re: Retrieving SIM information

    (for point 2) check the device profile if it is offline it means no sim .

  4. #4
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Retrieving SIM information

    Hi!

    Search this forum for IMSI (and Wikipedia for an explanation of what it is).
    I did search for IMSI but have not found a python module that would do the same. I did stumble upon this that (maybe) could be converted to a Python module.

    (for point 2) check the device profile if it is offline it means no sim .
    Not been able to figure out how to do this. I was hoping to search for imsi and then, on finding none, assume the sim is absent.

    Will keep looking for the both.

    Thanks
    Kedar

  5. #5
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Retrieving SIM information

    Quote Originally Posted by kedarm View Post
    I did search for IMSI but have not found a python module that would do the same. I did stumble upon this that (maybe) could be converted to a Python module.
    The second result if you search the Python forum for "IMSI" is a thread called "How to read SIM card ID and IME number". That's where you will find a module that might help you.

    And just because the currently active profile is offline doesn't mean there is no SIM

  6. #6
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Retrieving SIM information

    Quote Originally Posted by bogdan.galiceanu View Post
    The second result if you search the Python forum for "IMSI" is a thread called "How to read SIM card ID and IME number". That's where you will find a module that might help you.

    And just because the currently active profile is offline doesn't mean there is no SIM
    Sorry - but when I googled with a various set of keywords, that I believed would work, I could not find it. In fact, the only way I found the thread is by searching for - "How to read SIM card and IME number". Maybe, we're on different google servers (Figured out mistake - Was searching google instead of forum search!)
    Will check up the elocation package and figure it out.

    I think the best thing to do would be both - check for SIM card by hunting for the IMSI number and check if the phone is in not in the "offline" profile. Although, I still don't have much clue how to check the active profile! Hunting for that now...

    Thanks!

  7. #7
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Retrieving SIM information

    For some reason, the elocation module does not seem to give me the imsi number

    >>> import elocation
    >>> elocation.get_imsi()
    u''
    It does not give the imsi! The SIM has definitely been inserted right - I can make calls, etc. I have signed elocation with all the capabilities (including ReadUserData). Same for the PythonScriptShell.

    The elocation.extended_gsm_location() works fine!

    However, I also get this -
    >>> elocation.get_registration_status()
    Registration Unknown
    Could this be the cause? Any idea why it is unknown? Or is it a country-specific thing (I am working in India)
    Last edited by kedarm; 2009-12-27 at 18:31.

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Retrieving SIM information

    Quote Originally Posted by kedarm View Post
    Although, I still don't have much clue how to check the active profile! Hunting for that now...
    There is a function in the sysinfo module that does exactly what you need
    http://pys60.garage.maemo.org/doc/s6...e-sysinfo.html

  9. #9
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Retrieving SIM information

    Quote Originally Posted by bogdan.galiceanu View Post
    There is a function in the sysinfo module that does exactly what you need
    http://pys60.garage.maemo.org/doc/s6...e-sysinfo.html
    Man! I can't believe I missed that! Been using the imei, signal bars and signal dbm function calls, but completely overlooked the first one!
    I think I got to spend more time reading every word carefully rather than rushing to google

    Any idea why the elocation imsi call fails?

  10. #10
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    285

    Re: Retrieving SIM information

    The deal is, my application has a module that logs data and sends it to a common server (with user's permission, of course!)

    I've come across two stumbling blocks -
    1) I use the location module. However, in absence of a SIM card, the call location.gsm_location() causes the program to abort and it throws out an error. Hence, I'd like to figure out a way to check (and distinguish) the following cases :
    a] SIM present - but in offline mode (use sysinfo.active_profile())
    b] SIM present - but no signals (I think sysinfo.signal_bars() might work, but need to go somewhere where there are no signals to test!)
    c] SIM absent (could I use the elocation module?)

    2) I need to authenticate the logging, which I was hoping could be done by checking the IMSI number. However, when I use the elocation.get_imsi() function call, I get no output!

    Any help

Similar Threads

  1. Will SIM update itself, the network information?
    By ananddr in forum General Development Questions
    Replies: 4
    Last Post: 2008-10-06, 10:49
  2. Help Needed to Develop SIM-based Apps for Kenya...
    By natecow in forum Smart Messaging
    Replies: 12
    Last Post: 2007-02-16, 09:26
  3. Read SIM Card Information
    By jaceline in forum Symbian
    Replies: 3
    Last Post: 2006-12-19, 04:38
  4. Retriving information from sim card.
    By zichangfu in forum Symbian
    Replies: 4
    Last Post: 2006-10-20, 09:21
  5. SIM information
    By ardudi in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-06-28, 20:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×