How to obtains Cellular Base Station ID?


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?


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) {"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 {"cellular_global_identity failed %d", res);
1 Like