I am successfully getting geolocation using Google’s API for GPRS connections with the BG96. In this case I get the mnc, mcc, cell_id and lac from the AT+QENG command:
16/12/19 17:05:26.259 INFO: RX> "AT+QENG=“servingcell”"
16/12/19 17:05:26.267 INFO: RX> “+QENG: “servingcell”,“NOCONN”,“GSM”,234,30,822,81BF,49,850,0,-84,255,255,0,22,22,1,-,-,-,-,-,-,-,-,-,”-""
And then call the google API like this:
url = "https://www.googleapis.com/geolocation/v1/geolocate?key={}".format(key_dict['GMAK'])
cell_info_dict = {
"radioType": radio_type, # lte, gsm, cdma, and wcdma
"cellTowers": [
{
"cellId": cell_id,
"locationAreaCode": lac,
"mobileCountryCode": mcc,
"mobileNetworkCode": mnc
}
]
}
result = requests.post(url, json=cell_info_dict)
This works perfectly and gives and accurate location.
If instead I connect via NB1. The same AT command gives slightly different information:
13/12/19 15:15:38.072 INFO: RX> "AT+QENG=“servingcell”"
13/12/19 15:15:38.080 INFO: RX> "+QENG: “servingcell”,“NOCONN”,“CAT-NB”,“FDD”,234,15,19621F,122,6254,20,0,0,33F3,-86,-13,-73,10,-"
Again we get the mcc, mnc and cell_id, but now there is no lac and instead there is a tac. Does anyone know how to combine this information in the Google API call to get the correct result?
I have seen this SO post:
Which suggests that it is possible to use Google geolocation API for LTE, but I have tried lots of combinations to get a result and so far it has failed.