Print for MCC

Started by blue-j, April 07, 2022, 01:56:10 PM

Previous topic - Next topic

blue-j

Mobile Country Codes are updated rather frequently, and one code can be used for a wide variety of countries and providers.

makernotes   samsung   mccdata

Might be elsewhere as well.

References:    https://en.wikipedia.org/wiki/Mobile_country_code

Note that "310" has three values:

310   Guam (United States of America)   GU   List of mobile network codes in Guam   IMSI Administrator[24]   
310   Northern Mariana Islands (United States of America)   MP   List of mobile network codes in the Northern Mariana Islands   IMSI Administrator[24]   
310   United States of America   US   List of mobile network codes in the United States of America   IMSI Administrator[24]

The only way to resolve which one is correct is in combination with the MNC code (also three numbers) but I am not seeing that.  Maybe it is hiding in an unknown segment?

This came up because ExifTool prints "310 - Guam (USA)" for the attached, though it was shot in Los Angeles.






StarGeek

I would guess there's no way to know.  Looking at the hex for the tag, it's just 3 bytes containing 310
  SamsungTrailer_0x0aa1Name = MCC_Data
  - Tag '0x0aa1-name' (8 bytes):
    1684ad: 4d 43 43 5f 44 61 74 61                         [MCC_Data]
  MCCData = 310
  - Tag '0x0aa1' (3 bytes):
    1684b5: 33 31 30                                        [310]


Though reading that wiki page, it appears that Guam and Northern Mariana Islands are incorrectly defined.  The first digit "identifies the geographic region".  3 is for North America and the Caribbean while Guam/Northern Mariana Islands are clearly 5 "Australia and Oceania".  Not that there's anything we can do about that.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Quote from: blue-j on April 07, 2022, 01:56:10 PM
This came up because ExifTool prints "310 - Guam (USA)" for the attached, though it was shot in Los Angeles.

I don't see this anywhere in the output.  All I see is "MCC Data: 310"

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on April 07, 2022, 09:56:01 PMAll I see is "MCC Data: 310"

I should pay more attention.  I was so busy looking at the hex code that I didn't actually just run the command.  I did grep the source code for "Guam" but when it came up with appropriate (nothing matching Samsung), I didn't take time to look closer.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

blue-j

Jeez.  I'm actually the one who coded the conversion in our app.   I am SOOOO sorry.  When you do this stuff all day every day you lose your mind a little bit....

Doh!

-J

Phil Harvey

Interesting.  Maybe I should add a lookup for this.  Here is what I propose:

202 Greece
204 Netherlands
206 Belgium
208 France
212 Monaco
213 Andorra
214 Spain
216 Hungary
218 Bosnia & Herzegov.
219 Croatia
220 Serbia
221 Kosovo
222 Italy
226 Romania
228 Switzerland
230 Czech Rep.
231 Slovakia
232 Austria
234 United Kingdom
235 United Kingdom
238 Denmark
240 Sweden
242 Norway
244 Finland
246 Lithuania
247 Latvia
248 Estonia
250 Russian Federation
255 Ukraine
257 Belarus
259 Moldova
260 Poland
262 Germany
266 Gibraltar
268 Portugal
270 Luxembourg
272 Ireland
274 Iceland
276 Albania
278 Malta
280 Cyprus
282 Georgia
283 Armenia
284 Bulgaria
286 Turkey
288 Faroe Islands
289 Abkhazia
290 Greenland
292 San Marino
293 Slovenia
294 Macedonia
295 Liechtenstein
297 Montenegro
302 Canada
308 St. Pierre & Miquelon
310 United States / Guam
311 United States / Guam
312 United States
316 United States
330 Puerto Rico
334 Mexico
338 Jamaica
340 French Guiana / Guadeloupe / Martinique
342 Barbados
344 Antigua and Barbuda
346 Cayman Islands
348 British Virgin Islands
350 Bermuda
352 Grenada
354 Montserrat
356 Saint Kitts and Nevis
358 Saint Lucia
360 St. Vincent & Gren.
362 Bonaire, Sint Eustatius and Saba / Curacao / Netherlands Antilles
363 Aruba
364 Bahamas
365 Anguilla
366 Dominica
368 Cuba
370 Dominican Republic
372 Haiti
374 Trinidad and Tobago
376 Turks and Caicos Islands / US Virgin Islands
400 Azerbaijan
401 Kazakhstan
402 Bhutan
404 India
405 India
410 Pakistan
412 Afghanistan
413 Sri Lanka
414 Myanmar (Burma)
415 Lebanon
416 Jordan
417 Syrian Arab Republic
418 Iraq
419 Kuwait
420 Saudi Arabia
421 Yemen
422 Oman
424 United Arab Emirates
425 Israel / Palestinian Territory
426 Bahrain
427 Qatar
428 Mongolia
429 Nepal
430 United Arab Emirates
431 United Arab Emirates
432 Iran
434 Uzbekistan
436 Tajikistan
437 Kyrgyzstan
438 Turkmenistan
440 Japan
441 Japan
450 South Korea
452 Viet Nam
454 Hongkong, China
455 Macao, China
456 Cambodia
457 Laos P.D.R.
460 China
466 Taiwan
467 North Korea
470 Bangladesh
472 Maldives
502 Malaysia
505 Australia
510 Indonesia
514 Timor-Leste
515 Philippines
520 Thailand
525 Singapore
528 Brunei Darussalam
530 New Zealand
537 Papua New Guinea
539 Tonga
540 Solomon Islands
541 Vanuatu
542 Fiji
544 American Samoa
545 Kiribati
546 New Caledonia
547 French Polynesia
548 Cook Islands
549 Samoa
550 Micronesia
552 Palau
553 Tuvalu
555 Niue
602 Egypt
603 Algeria
604 Morocco
605 Tunisia
606 Libya
607 Gambia
608 Senegal
609 Mauritania
610 Mali
611 Guinea
612 Ivory Coast
613 Burkina Faso
614 Niger
615 Togo
616 Benin
617 Mauritius
618 Liberia
619 Sierra Leone
620 Ghana
621 Nigeria
622 Chad
623 Central African Rep.
624 Cameroon
625 Cape Verde
626 Sao Tome & Principe
627 Equatorial Guinea
628 Gabon
629 Congo, Republic
630 Congo, Dem. Rep.
631 Angola
632 Guinea-Bissau
633 Seychelles
634 Sudan
635 Rwanda
636 Ethiopia
637 Somalia
638 Djibouti
639 Kenya
640 Tanzania
641 Uganda
642 Burundi
643 Mozambique
645 Zambia
646 Madagascar
647 Reunion
648 Zimbabwe
649 Namibia
650 Malawi
651 Lesotho
652 Botswana
653 Swaziland
654 Comoros
655 South Africa
657 Eritrea
659 South Sudan
702 Belize
704 Guatemala
706 El Salvador
708 Honduras
710 Nicaragua
712 Costa Rica
714 Panama
716 Peru
722 Argentina Republic
724 Brazil
730 Chile
732 Colombia
734 Venezuela
736 Bolivia
738 Guyana
740 Ecuador
744 Paraguay
746 Suriname
748 Uruguay
750 Falkland Islands (Malvinas)
901 International Networks / Satellite Networks


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: Phil Harvey on April 08, 2022, 07:41:51 AM
Maybe I should add a lookup for this.  Here is what I propose:

Is it worth the effort if the codes are "updated rather frequently" as blue-j says?  I wouldn't think you'd want to keep track of it.  Though maybe blue-j could post when there is a change since it's of interest to them.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

blue-j

I like Phil's suggestion!  Very smart.  I've researched this more than I care to admit publicly...  : p

But yes yes indeed it IS useful information.  it can be the only source of general location for a photo.

Mobile Country Code (MCC) & Mobile Network Code (MNC) = Home Network Identity (HNI)

Home Network Identity (HNI) & Mobile Subscriber Identification Number (MSIN) = Integrated Mobile Subscriber Identity (IMSI)

So far I have only caught MCC in the wild.

Truth is, there is no blessed master list maintained by the ITU.  However, someone is updating Wikipedia religiously.  It was last updated just 4 days ago, and shows sign of someone's constant attention.  I think it is safe to use, collapsing the data as Phil has suggested.  Updating the list every 6 months should be fine.  I can keep an eye.

- J


Phil Harvey

OK.  I'll include this lookup in the next release.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).