Re: Tutorial: Query the Apple database with Python for your access point BSSID

Jeff Liebermann <[email protected]>
Newsgroups alt.comp.os.windows-10,alt.internet.wireless,alt.comp.microsoft.windows
Message-ID <[email protected]>
On Sun, 21 Dec 2025 17:55:35 -0700, Marian
<[email protected]> wrote:

>Paul wrote:
>> It's sloppy workmanship :-)
>> We knew that much before investigating.
>
>Thanks Paul and Winston for taking a look at the precision of the GPS data
>stored in the Apple WPS database.
>
>I thought I had responded to this where I will always openly admit when I
>don't understand anything, so I will say I have no idea WHY Apple stores
>the integer GPS values to the number of integer precision that they do.
>
>I can only add the value that I modified the FOSS scripts so that they
>report both the original machine-readable GPS coordinates and my
>human-readable conversion since decimal GPS coordinates are what we use.
>
>These are actual values output when I input the first BSSID below:
> column 1 = the BSSID
> column 2 = the integer latitude stored in the Apple WPS database
> column 3 = the integer longitude stored in the Apple WPS database
> columns 4 & 5 = a conversion of integer to decimal for GPS display tools
>
>  00:18:f8:c1:4a:65 3245990371 -9381384277 32.459904 -93.813843
>  02:aa:a0:e3:5f:38 3245890808 -9381494903 32.458908 -93.814949
>  44:1c:12:99:23:58 3245909881 -9381492614 32.459099 -93.814926
>  44:1c:12:99:23:5b 3245910644 -9381491088 32.459106 -93.814911
>  44:1c:12:99:23:5d 3245910644 -9381491851 32.459106 -93.814919
>  44:1c:12:99:23:5e 3245911026 -9381491088 32.459110 -93.814911
>  06:aa:a0:e3:5f:38 3245891952 -9381494903 32.458920 -93.814949
>  72:13:01:01:99:9a 3245920944 -9381445312 32.459209 -93.814453
>  72:13:01:01:99:9d 3245919036 -9381446838 32.459190 -93.814468
>  ec:aa:a0:e3:5f:38 3245891571 -9381494140 32.458916 -93.814941
>  fa:aa:a0:e3:5f:38 3245891571 -9381493377 32.458916 -93.814934
>  12:36:aa:7d:3d:b1 3245915603 -9381276702 32.459156 -93.812767
>  12:36:aa:7d:3d:b2 3245915222 -9381278228 32.459152 -93.812782
>  12:36:aa:7d:3d:b6 3245914840 -9381275177 32.459148 -93.812752
>  12:36:aa:c2:2c:01 3245956802 -9381256103 32.459568 -93.812561
>  12:59:32:64:b2:bc 3245960617 -9381244659 32.459606 -93.812447
>  14:c0:3e:38:ef:36 3245923614 -9381269073 32.459236 -93.812691
>  16:c0:3e:38:ef:36 3245925140 -9381269836 32.459251 -93.812698
>  1a:c0:3e:38:ef:36 3245925140 -9381269073 32.459251 -93.812691
>  02:aa:a0:79:a6:b8 3245920181 -9381246185 32.459202 -93.812462
>  38:17:b1:28:28:46 3245931625 -9381245422 32.459316 -93.812454
>  40:48:6e:f1:9f:34 3245958328 -9381306457 32.459583 -93.813065
>  42:17:b1:28:28:46 3245932388 -9381243133 32.459324 -93.812431
>  46:d8:78:a3:03:a3 3245965576 -9381226348 32.459656 -93.812263
>  5c:b0:66:13:26:c1 3245907974 -9381227874 32.459080 -93.812279
>  5e:b0:66:13:26:c1 3245907592 -9381227111 32.459076 -93.812271
>  06:aa:a0:79:a6:b8 3245920181 -9381246185 32.459202 -93.812462
>  72:13:01:46:3c:c1 3245978546 -9381228637 32.459785 -93.812286
>  72:13:01:46:3c:c6 3245979690 -9381228637 32.459797 -93.812286
>  7e:b0:66:13:26:c1 3245907211 -9381227874 32.459072 -93.812279
>  88:ad:43:48:4a:a8 3245934295 -9381259918 32.459343 -93.812599
>  8c:76:3f:b7:b7:97 3245985412 -9381255340 32.459854 -93.812553
>  8e:76:3f:b7:b7:97 3245984649 -9381256103 32.459846 -93.812561
>  96:76:3f:b7:b7:97 3245984649 -9381255340 32.459846 -93.812553
>  98:52:4a:86:fa:4c 3245908737 -9381267547 32.459087 -93.812675
>  98:52:4a:86:fa:4f 3245908355 -9381267547 32.459084 -93.812675
>  98:52:4a:86:fa:51 3245908355 -9381267547 32.459084 -93.812675
>  98:52:4a:86:fa:52 3245908737 -9381268310 32.459087 -93.812683
>  9e:ad:43:48:4a:a8 3245934677 -9381259918 32.459347 -93.812599
>  9e:b0:66:13:26:c1 3245907211 -9381227874 32.459072 -93.812279
>  ac:91:9b:c6:7d:d2 3245978927 -9381267547 32.459789 -93.812675
>  b2:4f:b8:7f:cb:83 3245938873 -9381260681 32.459389 -93.812607
>  ce:6c:6d:83:12:4d 3245933151 -9381253051 32.459332 -93.812531
>  d4:6c:6d:83:12:4d 3245931243 -9381252288 32.459312 -93.812523
>  d6:6c:6d:83:12:4d 3245933914 -9381251525 32.459339 -93.812515
>  da:13:99:28:92:b0 3245917510 -9381269836 32.459175 -93.812698
>  e8:97:b8:8e:5d:0a 3245927047 -9381250000 32.459270 -93.812500
>  0e:c0:3e:38:ef:36 3245924758 -9381269073 32.459248 -93.812691
>  ec:aa:a0:79:a6:b8 3245919418 -9381246185 32.459194 -93.812462
>  f4:0e:83:d7:fb:68 3245946121 -9381263732 32.459461 -93.812637
>  fa:aa:a0:79:a6:b8 3245920181 -9381246185 32.459202 -93.812462
>  fc:ae:34:94:57:f0 3245948028 -9381231689 32.459480 -93.812317
>  fe:ae:34:94:57:f1 3245947265 -9381232452 32.459473 -93.812325
>  00:71:c2:b2:32:68 3245960998 -9381239318 32.459610 -93.812393
>  16:71:c2:b2:32:68 3245961761 -9381238555 32.459618 -93.812386
>  1a:71:c2:b2:32:68 3245961761 -9381238555 32.459618 -93.812386
>  10:93:97:0a:e7:80 3245982742 -9381553649 32.459827 -93.815536
>  12:36:aa:62:9c:39 3245925140 -9381566619 32.459251 -93.815666
>  12:36:aa:62:9c:3a 3245926284 -9381568908 32.459263 -93.815689
>  12:36:aa:62:9c:3d 3245923614 -9381565856 32.459236 -93.815659
>  12:36:aa:62:9c:3e 3245925521 -9381567382 32.459255 -93.815674
>  12:36:aa:85:84:c9 3245957183 -9381577301 32.459572 -93.815773
>  18:9c:27:b6:4b:8a 3245976257 -9381594085 32.459763 -93.815941
>  02:cb:7a:c2:d1:42 3245947265 -9381558227 32.459473 -93.815582
>  02:cb:7a:c2:d1:43 3245948028 -9381558227 32.459480 -93.815582
>  02:cb:7a:c2:d1:45 3245947265 -9381559753 32.459473 -93.815598
>  36:e6:e6:86:cd:1c 3245981216 -9381570434 32.459812 -93.815704
>  3a:9c:27:b6:4b:8a 3245977020 -9381596374 32.459770 -93.815964
>  5a:9c:27:b6:4b:8a 3245976257 -9381596374 32.459763 -93.815964
>  8c:85:80:e4:35:dd 3245977783 -9381558990 32.459778 -93.815590
>  8c:0f:6f:21:c8:80 3245982742 -9381554412 32.459827 -93.815544
>  8c:0f:6f:d3:3b:68 3245903778 -9381518554 32.459038 -93.815186
>  8e:76:3f:d4:13:8d 3245978164 -9381594085 32.459782 -93.815941
>  94:a6:7e:31:02:35 3245890045 -9381510162 32.458900 -93.815102
>  9a:0f:6f:21:c8:80 3245982742 -9381554412 32.459827 -93.815544
>  9a:0f:6f:d3:3b:68 3245905303 -9381518554 32.459053 -93.815186
>  a2:0f:6f:21:c8:80 3245982360 -9381554412 32.459824 -93.815544
>  a2:0f:6f:d3:3b:68 3245904541 -9381518554 32.459045 -93.815186
>  a6:0f:6f:21:c8:80 3245983123 -9381557464 32.459831 -93.815575
>  a6:0f:6f:d3:3b:68 3245905685 -9381520080 32.459057 -93.815201
>  be:61:e9:cd:aa:a8 3245882415 -9381622314 32.458824 -93.816223
>  ca:3a:6b:db:9b:ba 3245902252 -9381513977 32.459023 -93.815140
>  ce:6c:6d:53:02:e5 3245964050 -9381594848 32.459640 -93.815948
>  d4:6c:6d:53:02:e5 3245963287 -9381592559 32.459633 -93.815926
>  d6:6c:6d:53:02:e5 3245962142 -9381593322 32.459621 -93.815933
>  da:e3:5e:f7:08:87 3245980834 -9381555938 32.459808 -93.815559
>  f8:aa:3f:fe:b2:1e 3245905303 -9381512451 32.459053 -93.815125
>  4e:6b:b8:aa:8c:80 3245885086 -9381540679 32.458851 -93.815407
>  78:b2:13:e7:91:39 3245882797 -9381607055 32.458828 -93.816071
>  9e:b3:f7:21:91:e7 3245910263 -9381617736 32.459103 -93.816177
>  ce:8b:66:31:a1:df 3245933151 -9381556701 32.459332 -93.815567
>  80:30:dc:c2:05:26 3245886993 -9381635284 32.458870 -93.816353
>  6e:29:90:f7:23:74 3245903396 -9381517791 32.459034 -93.815178
>  0c:73:29:ff:29:93 3245893096 -9381542968 32.458931 -93.815430
>  7e:27:bc:95:f5:35 3245974349 -9381566619 32.459743 -93.815666
>  00:cb:7a:d0:d1:42 3245967102 -9381575775 32.459671 -93.815758
>  00:cb:7a:d0:d1:47 3245966720 -9381576538 32.459667 -93.815765
>  2c:7e:81:ab:cd:1b 3245813751 -9381472778 32.458138 -93.814728
>  2c:fb:0f:0f:66:06 3245831298 -9381491851 32.458313 -93.814919
>  36:fb:0f:0f:66:06 3245833969 -9381491088 32.458340 -93.814911
>  4e:7e:81:ab:cd:1b 3245811080 -9381472778 32.458111 -93.814728
>  6e:7e:81:ab:cd:1b 3245812988 -9381472778 32.458130 -93.814728
>  84:00:2d:41:9a:38 3245840454 -9381491088 32.458405 -93.814911
>  88:6a:e3:e0:51:c4 3245843887 -9381491088 32.458439 -93.814911
>  92:00:2d:41:9a:38 3245839691 -9381491088 32.458397 -93.814911
>  9a:00:2d:41:9a:38 3245840454 -9381491088 32.458405 -93.814911
>  9a:9d:5d:df:f0:6a 3245788955 -9381491851 32.457890 -93.814919
>  9e:00:2d:41:9a:38 3245840072 -9381491088 32.458401 -93.814911
>  be:8c:cd:2f:95:16 3245823669 -9381494903 32.458237 -93.814949
>  c2:18:03:fb:7c:5e 3245796585 -9381478118 32.457966 -93.814781
>  0c:83:cc:c6:58:4f 3245823669 -9381491851 32.458237 -93.814919
>  ce:3f:cb:da:f6:1b 3245833587 -9381475830 32.458336 -93.814758
>  ce:ab:82:cf:55:98 3245824432 -9381491088 32.458244 -93.814911
>  d4:3f:cb:da:f6:1b 3245833206 -9381475067 32.458332 -93.814751
>  d4:ab:82:cf:55:98 3245824432 -9381491088 32.458244 -93.814911
>  d6:3f:cb:da:f6:1b 3245833969 -9381475067 32.458340 -93.814751
>  d6:ab:82:cf:55:98 3245823669 -9381490325 32.458237 -93.814903
>  da:3f:cb:da:f6:1b 3245833587 -9381475067 32.458336 -93.814751
>  da:ab:82:cf:55:98 3245823669 -9381491088 32.458237 -93.814911
>  0e:fe:7b:7e:0e:29 3245786666 -9381475830 32.457867 -93.814758
>  f8:aa:3f:fe:b2:3b 3245837783 -9381485748 32.458378 -93.814857
>  42:9e:9d:73:67:ef 3245817947 -9381486511 32.458179 -93.814865
>  6e:57:25:f3:7c:e5 3245834732 -9381487274 32.458347 -93.814873
>  9e:73:b1:ef:ad:77 3245817184 -9381499481 32.458172 -93.814995
>  1c:56:8e:0b:3b:34 3246085739 -9381424713 32.460857 -93.814247
>  24:de:8a:10:6e:a4 3246070098 -9381474304 32.460701 -93.814743
>  24:de:8a:60:04:14 3246067428 -9381462860 32.460674 -93.814629
>  48:e2:ad:ad:39:f4 3246047592 -9381441497 32.460476 -93.814415
>  54:2b:57:35:d6:c5 3246046829 -9381445312 32.460468 -93.814453
>  54:b2:03:53:16:68 3246035766 -9381394195 32.460358 -93.813942
>  56:2b:57:2f:ff:cf 3246062088 -9381448364 32.460621 -93.814484
>  62:b2:03:53:16:68 3246036911 -9381393432 32.460369 -93.813934
>  6a:b2:03:53:16:68 3246036911 -9381393432 32.460369 -93.813934
>  6e:b2:03:53:16:68 3246028518 -9381393432 32.460285 -93.813934
>  82:da:c2:2d:1f:12 3246070861 -9381422424 32.460709 -93.814224
>  82:da:c2:2d:1f:15 3246070480 -9381422424 32.460705 -93.814224
>  c0:94:35:dc:33:1a 3246071624 -9381478881 32.460716 -93.814789
>  ce:94:35:dc:33:1a 3246070861 -9381479644 32.460709 -93.814796
>  d6:94:35:dc:33:1a 3246070861 -9381478881 32.460709 -93.814789
>  28:c2:dd:dc:c9:b8 3246021270 -9381389617 32.460213 -93.813896
>  30:13:8b:2b:28:10 3246051025 -9381438446 32.460510 -93.814384
>  8c:0f:6f:18:7c:00 3246034240 -9381385803 32.460342 -93.813858
>  9a:0f:6f:18:7c:00 3246034622 -9381387329 32.460346 -93.813873
>  a2:0f:6f:18:7c:00 3246035003 -9381387329 32.460350 -93.813873
>  a6:0f:6f:18:7c:00 3246034622 -9381386566 32.460346 -93.813866
>  2a:ad:18:fc:8b:1f 3246102142 -9381381988 32.461021 -93.813820
>  3a:e7:c0:83:c1:a7 3246105575 -9381404876 32.461056 -93.814049
>  c6:98:5c:db:c2:43 3246094512 -9381495666 32.460945 -93.814957
>  etc.
>
>The question mainly is WHY Apple stores them to the number of integers that
>they do, where all I can do is convert the integer values to human-readable
>decimal coordinates.

If you look at the original data you posted a few articles back, you
might notice that the number of significant digits in the Lat/Long
numbers vary widely for each BSSID.  That implies that the number is
coming from the GPS receiver and is probably not "processed" prior to
be being logged.  The entries with fairly few significant figures is
probably an old GPS who's designers were only confident in a few
digits precision.  The longer entries could easily be the output of an
RTK differential GPS system capable of millimeter accuracy.  A way to
verify this is to write a program that grabs the first half of the
BSSID and searches various OUI databases for the name of the
manufacturer.  Something like this:
"Wi-Fi Vendor - Detect vendor of a Wi-Fi access point with just your
iPhone or iPad"
<https://github.com/jiribrejcha/wifi-vendor-lookup>

I'll try it.  
  BSSID: 84:eb:3e:f8:36:d3
  Latitude: 32.45880508
  Longitude: -93.81717681
Plugging the BSSID into:
<https://oui.is/>
<https://oui.is/84eb3ef836d3>
I get:
  Vivint Smart Home	84:eb:3e:00:00:00/24

Here's a longer Lat:
  BSSID: bc:9b:68:7e:15:c3
  Latitude: 32.459438320000004
  Longitude: -93.817276
<https://oui.is/bc9b687e15c3>
I get:
  Vantiva USA LLC	bc:9b:68:00:00:00/24  

I can't determine if either company has a reason to have a longer
Lat/Long.  However, notice the number of digits in the Lat, which are
mostly zeros, except for the last digit:
  Latitude: 32.459438320000004
I don't know what they're doing, but it looks like they're using the
Latitude to store some kind of data or ID.  There are several other
entries in the data that show a similar pattern of 8 places to the
right of the decimal point for useful data followed by 6 zeros and 1
numeric digit.

This should be useful:
"Accuracy of Decimal Places in Latitude and Longitude Degrees"
<https://support.garmin.com/en-US/?faq=hRMBoCTy5a7HqVkxukhHd8>

8 decimal places is 1.11mm resolution which is probably the limit of
GPS resolution (not sure).

Anyway, good luck with whatever you're doing.



-- 
Jeff Liebermann                 [email protected]
PO Box 272      http://www.LearnByDestroying.com
Ben Lomond CA 95005-0272   AE6KS    831-336-2558
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.