Cellular
getBandSelect()
Since 0.5.0:
Gen 2 Devices (STM32) (E-Series, Electron, Photon, and P2; does not include E404X):
Band available and band select APIs are only available on Gen 2 (Electron and E-Series), and only for 2G/3G, not LTE Cat M1.
Gets the cellular bands currently set in the modem. Bands
are the carrier frequencies used to communicate with the cellular network.
There is one supported function for getting selected bands using the CellularBand object:
bool Cellular.getBandSelect(CellularBand &band_sel);
// SYNTAX
CellularBand band_sel;
Cellular.getBandSelect(band_sel);
// EXAMPLE
CellularBand band_sel;
if (Cellular.getBandSelect(band_sel)) {
Serial.print("Selected bands: ");
for (int x=0; x<band_sel.count; x++) {
Serial.printf("%d", band_sel.band[x]);
if (x+1 < band_sel.count) Serial.printf(",");
}
Serial.println();
}
else {
Serial.printlnf("Bands selected not retrieved from the modem!");
}