I’m experiencing issues using the Google Geolocation API to retrieve latitude and longitude based on Cell ID. It seems that I can successfully locate 2G towers, but 3G and 4G/LTE towers are not being found.
I receive the 3GPP Hexadecimal code via RADIUS and convert it to extract the LAC (Location Area Code) and Cell ID, but for some reason, my results from the Google API are always null.
Example case:
• Hexadecimal code received: 0x0127f45075e879aa.
• MCC: 724 (Brazil).
• MNC: 05 (Claro in Brazil).
• Extracted values:
• LAC: 30184.
• Cell ID: 31146 (also tried other inferred values).
• Network type: 3G (UTRAN/UMTS).
When I send these values to the Google API, I get no results. The endpoint returns a 404 error or an empty response.
When I send these values to the Google API, I get no results. The endpoint returns a 404 error or an empty response.
Current request:
curl --request POST
--url 'https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_API_KEY'
--header 'Content-Type: application/json'
--data '{
"radioType": "gsm",
"considerIp": false,
"cellTowers": [
{
"mobileCountryCode": 724,
"mobileNetworkCode": 5,
"locationAreaCode": 30184,
"cellId": 31146
}
],
"wifiAccessPoints": []
}'
Questions:
-
- Does the Google API support 3G/4G cell towers? If yes, is there anything specific I need to include in the payload?
-
- Is there a different method or approach to process 3GPP Hexadecimal codes and make them compatible with the API?
-
- What is the correct way to interpret the 3GPP Hexadecimal code for 3G cell towers to properly extract LAC and Cell ID?
Thank you for any help or guidance! I’m open to testing suggestions and providing additional details if necessary.