johnzweng / bankomatinfos

Android NFC app for reading some infos from Austrian Bankomat Cards (Maestro banking cards).
Other
65 stars 32 forks source link

Country names and alphabetic country codes #9

Open jnareb opened 9 years ago

jnareb commented 9 years ago

I'd like to report that the app works for MasterCard Debit issued by mBank S.A. (a Polish bank), though all of the following CPLC data is reported as unknown IC Fabricator (0x4070), IC Type (0x5144), IC ModuleFabricator (0x1002), ICC Manufacturer (0x4193), Prepersonalization Identifier (0x4194).

I'd like to ask if there are plans to support either alphanumeric (two-letter and three-letter) country codes, and/or English country names - the ISO 3166-1 numeric three-digit country codes? Well, at least there is no country name for Poland (PL, POL)... BTW what's with leading 0 - the code is 616 not 0616; is it raw value?

johnzweng commented 9 years ago

hi @jnareb, thank you for the feedback!

Regarding your points:

CPLC: Sorry, I didn't have much documentation on how this data is encoded, especially I didn't find a list of all fabricator IDs, IC type IDs, etc.. So for all data I cannot interpret, I just print the raw hex value for the moment. I do not know very much about CPLC. Is this type of information standardized (I guess so)? Maybe you can point me to any resource where to find more information? Are there any manufacturer lists, etc. somewhere online?

Country Codes / Names: I did not exactly understand the question. Where should alphanumeric country codes be supported (at which parts of the application)? Uh, I guess I know what you mean. I already have support for displaying country codes alphanumerically, but (I am lazy) at the moment not all countries are covered. Yes, Poland was not covered until now. I will complete the list.

And regarding the leading 0: Yes, you guessed correctly, the ISO codes have three digits (for example Austria is "040") but in EMV cards this info is stored in BCD notation, using two bytes, which means "040" will end up in the card in 2 bytes: 0x00 0x40. But you are correct, the first digit only can only be 0 (as the ISO 3166-1 codes are only 3 digits).

I will update the ISO codes in the next version. :)

jnareb commented 9 years ago

I already have support for displaying country codes alphanumerically, but (I am lazy) at the moment not all countries are covered. Yes, Poland was not covered until now. I will complete the list.

Instead of writing list by hand, you can use numeric to alpha-2 ISO 3166-1 country codes gist (created using Locale::Country Perl module ;) )

Just say in what format you need it...