Geolocation/Positioning through GSM - Any Hint on how to start?


I just recently got my Electron and I would like to invest into Geolocation/Positioning through sole GSM Data (by Triangulation). As I am a Newbie to this topic I am open for any kind of best practices, code snippets, arcticles, suggestions and recommendations on how I can achieve this.

Thanks upfront for sharing your experience,


1 Like

Thanks for the update, this is definitively a good starter. Though this is doing the calculation on an β€˜unknown’ server side. Aren’t the mobile phone providers offering a similar service we could use? What about calculating the position on the device avoiding costly message traffic over the network? Any hint on those topics?

Where do you see the calculation done on an unknown server?

There is a problem with Celllocate see the link above. Will post there when we are able to fix it.

There is an alternate solution using Wifi BSSID locating. The hardware cost is $3. GPS is the best solution if you are outside. Celllocate is the best if your accuracy requirements are relaxed.

Even though I understand all the feedback about β€œCellocate” and accoring features I would like to implement my own Positioning Endevor through Triangulation.

I found some very good background material here:

For that reason I wrote a very simple program that takes AT commands from serial port, executes the AT command and writes the output to serial port:

int callbackAT(int type, const char* buf, int len, char* param){
Serial.println("AT Respone: ");
Serial.write((const uint8_t*)buf, len);
return RESP_OK;

void setup() {

void loop() {
int i=0;
char commandbuffer[100];
char myResponse[5000];

   while( Serial.available() && i< 99) {
      commandbuffer[i++] =;
   commandbuffer[i]= '\n';
   Serial.println("AT Command: ");
   Cellular.command(callbackAT, myResponse, 5000, (char*)commandbuffer);


For getting the signal strength of the various cells (serving cell and network cell) I am using AT+CGED

And here starts the problem:

AT+CGED=? - Returns (0-6) - means that I can get information using the following modes:

  • 0 (default value): one shot dump
  • 1: periodic refreshed dump; the information for up to 32 neighbour cells is available
  • 2: stop periodic dump
  • 3: one shot serving cell dump
  • 4: periodic serving cell refreshed dump
    *5: one shot serving cell and neighbour cells dump
  • 6: periodic serving cell and neighbour cells refreshed dump

Whenever I execute β€žAT+CGED=3β€œ I am getting Feedback about the serving cell
Whenever I execute β€žAT+CGED=5β€œ in order to get information about the neighbor cells the AT command hangs and I cannot execute any follow up AT commands anymore

Any Idea on why that is???

There is an alternate solution using Wifi BSSID locating

@sbright33 Do you have any details on this? Is this technique using a separate WiFi module (e.g. ESP8266 ~$3) to listen for BSSID broadcasts, and comparing to a map of networks?

@sbright33, would you mind sharing this alternate solution using Wifi BSSID locating?