How to obtains Cellular Base Station ID?

Hi,

I have a boron 3G with embedded SIM.
Is there an Particle API function I can use to obtain the Operator ID, Network ID and Antenna ID?

Thanks
Rune

The most commonly needed data is available using the cellular_global_identity() function. This will return the cell identifier, location area code, and MCC/MNC for the carrier.

CellularGlobalIdentity cgi = {0};
cgi.size = sizeof(CellularGlobalIdentity);
cgi.version = CGI_VERSION_LATEST;

cellular_result_t res = cellular_global_identity(&cgi, NULL);
if (res == SYSTEM_ERROR_NONE) {
    Log.info("Cellular Info: cid=%lu lac=%u mcc=%u mnc=%u", cgi.cell_id, cgi.location_area_code, cgi.mobile_country_code, cgi.mobile_network_code);
}
else {
    Log.info("cellular_global_identity failed %d", res);
}
1 Like