Rsa id

Bakersman

New member
Hi all, I need a bar-code scanner that will scan a RSA id and read the number, name and surname and store it in the reader. Then I want to be able to download and or export to xls format?
 
This is a very good question, I assumed that all your details are captured in the bar-code, and it would have to be for both.

The scenario is we use lots of casuals on a day to day basis, and instead having to manually capture the number, name and surname. So the plan was to scan them into a reader and then export at the end of the day.
 
If the scanner does not have info linked to the bar code, it will only read and display the ID number. It won't give personal info without personal info linked to it first.
 
As far as I know the RSA ID book barcode is standard CODE_39 format and contains only the ID number. The RSA drivers licence contains more info.

I am speaking from memory here, we did work with drivers licences a long while ago and we could scan ID number, name, surname, photo image, expiry date and possibly more. This was with a windows mobile 5 based handset with the required decryption software for the barcode.
 
I have to add:

A barcode is a visual representation of a number, that is all. It does not contain data.

If you want data from a barcode, you will need to have the reader read the number, and then have a back-end where this number can be looked up and the data retrieved from the correct system. For example, a Pick n Pay barcode will not get you any details when this number is looked up on the ID system. Not sure if this is freely available, as you can imagine I can then type in random numbers and get all details of the owner of the ID number I searched for.
 
[MENTION=1577]TBlaar[/MENTION] this actually makes perfect sense, cause the new card has the same bar-code as the drivers licence along with the normal one that has only the number, back to the drawing board then thx all
 
Yeah, you'll have to link the ID number up with a 3rd party service that will query the additional information

A South African person identification number is a 13-digit number containing only numeric characters, and no whitespace, punctuation, or alpha characters. It is defined as follows:

YYMMDDGSSSCAZ

YYMMDD : Date of birth (DOB)
G : Gender. 0-4 Female; 5-9 Male
SSS : Sequence No. for DOB/G combination
C : Citizenship. 0 SA; 1 Other
A : Usually 8, or 9 but can be other values
Z : Calculated control (check) digit

The control digit (Z) is calculated as follows:

Using ID Number 8001015009087 as an example:

Add all the digits in the odd positions (excluding last digit).
8 + 0 + 0 + 5 + 0 + 0 = 13 .............................[1]

Move the even positions into a field and multiply the number by 2.
011098 x 2 = 22196 .....................................[2]

Add the digits of the result in [2].
2 + 2 + 1 + 9 + 6 = 20 .................................[3]

Add the answer in [3] to the answer in [1].
13 + 20 = 33 ...........................................[4]

Subtract the second digit of [4](i.e. 3) from 10. The number must tally with the last number in the ID Number. If the result is 2 digits, the last digit is used to compare against the last number in the ID Number. If the answer differs, the ID number is invalid.

Code:
// This method assumes that the 13-digit id number has 
// valid digits in position 0 through 12.  
// Stored in a property 'ParseIdString'.  
// Returns: the valid digit between 0 and 9, or  
// -1 if the method fails.
private int GetControlDigit()
{
  int d = -1;
  try   {     int a = 0;
    for(int i = 0; i < 6; i++)
    {
      a += int.Parse(this.ParsedIdString[2*i].ToString());
    }
    int b = 0;
    for(int i = 0; i < 6; i++)
    {
      b = b*10 + int.Parse(this.ParsedIdString[2*i+1].ToString());
    }
    b *= 2;
    int c = 0;
    do
    {
      c += b % 10;
      b = b / 10;
    }
    while(b > 0);
    c += a;
    d = 10 - (c % 10);
    if(d == 10) d = 0;
  }
  catch {/*ignore*/}   return d;
}
 
Yea if it's a code 39/upc barcode it is just a series of numbers/text and won't contain any additional data (in most cases right below the stripes you will see the text it represents) . You will most likely need a QR/2D Barcode (the square blocks you see these days) to contain all these additional data like names/surnames.

The stripes (code 39) barcode is just a font like Arial/Times Roman , you can make it in Word. Simply put, these barcodes would probably not fit on your ID book/Card if it contained name+surname+id no (plus it would be different lengths for each person).


Your best bet, in absence of a lookup service is to use OCR (optical character recognition by taking a photo of ID Book/ID card and reading it into software that can read the text from an image)....i mean your name+surname is on a specific place on your ID book right? Then you probably won't need to read the barcode at all, just read the ID number.

I know Google have a bunch of tools , built into Google Drive , that can do exactly that.
 
Last edited:
Back
Top