Thread: Retrieving SIM card number from Dongle Using C program

  1. #1
    Registered User
    Join Date
    Jan 2014
    Posts
    2

    Retrieving SIM card number from Dongle Using C program

    Hi I want to get or view the SIM card number from the dongle (the dongle will b already connected to the computer where the SIM card will be inserted into it) but the coding should be done by C programming / Language. Please its urgent i went trough so many links but nothing worked your help matters thanks in advance guys

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > I want to get or view the SIM card number from the dongle
    Links please to relevant documentation for your specific bit of hardware.

    While you're at it, also mention which OS / Compiler you're using. Though beware, if you mention TurboC is your compiler, prepare yourself for much laughter from the gallery.

    > i went trough so many links but nothing worked
    So post some examples, and your comments on why they're deficient.
    There's no point us finding the same information, post links, only for you to bounce back with "read it already, it's useless"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2014
    Posts
    2
    I'm Using Dev C++ but this is the first time i'm trying to interact with hardware though i said that i tried several times what i really did was copy and paste it in the page. So brother please be kind enough to at least just paste a code to just simply access the sim card number plz thanks

  4. #4
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Nobody will "just paste code" to solve your problem. That's not what happens here.

    I suggest you look into the Hayes AT Command Set, specifically the 3G/GSM extensions that are common. That's how I do it for a Hauwei E110 dongle. But if you get that far, I'll be impressed - most people who just want a code dump and are too lazy to even do a quick Google don't get that far.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    most SIM cards work like a smart card (credit-card-sized card with a chip with 6 electrical contacts). since you're using windows, you should look into winscard.dll and its functions.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  6. #6
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Quote Originally Posted by Elkvis View Post
    most SIM cards work like a smart card (credit-card-sized card with a chip with 6 electrical contacts). since you're using windows, you should look into winscard.dll and its functions.
    I don't think that's helpful at all, in this case. The interface electronics are far too complex for such a simple task, especially when the OP says he has a dongle. Let the dongle do the work - it almost certainly acts as an old fashioned, serial-controlled, AT-command-set-based, modem (even if it's a 3G/4G dongle). Then it's just a question of opening the serial port, sending the right AT command, and receiving the reply, rather than trying to read a differently-voltage, very sensitive, "tamper proof" SIM card directly.

    Although I don't "just give" answers here, I at least try not to obfuscate the problem even if the user isn't helping themselves.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Find card number from deck
    By trums1992 in forum C Programming
    Replies: 5
    Last Post: 06-22-2012, 11:44 PM
  2. C: Credit Card Number Validator - Luhn Algorithm
    By Lioneyexp in forum C Programming
    Replies: 1
    Last Post: 02-07-2012, 07:06 PM
  3. [Help] Program : How to validate credit card number
    By kingofdcp in forum C Programming
    Replies: 13
    Last Post: 10-31-2009, 12:58 AM
  4. Getting the number of DVI connections on a video card
    By Night_Blade in forum Windows Programming
    Replies: 0
    Last Post: 06-20-2007, 06:53 AM
  5. retrieving number of socket being used/open & total bandwidth
    By hanhao in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-08-2004, 10:39 AM

Tags for this Thread