ublox-cellular-base_R4_PR
Diff: UbloxCellularBase.cpp
- Revision:
- 30:38230504a646
- Parent:
- 29:8a38f91009ad
- Child:
- 31:b0a6a610d114
--- a/UbloxCellularBase.cpp Mon Aug 26 14:55:37 2019 +0500 +++ b/UbloxCellularBase.cpp Tue Aug 27 18:38:29 2019 +0500 @@ -1511,7 +1511,37 @@ return integer_output; } -#endif + +bool UbloxCellularBase::set_band_bitmask(RAT rat, uint64_t bitmask) { + + bool status = false; + UBandmaskRAT eBandMastRat; + + if(rat == LTE_CATM1) { + eBandMastRat = UBANDMASK_RAT_LTE_CATM1; + } + else if(rat == LTE_CATNB1) { + eBandMastRat = UBANDMASK_RAT_LTE_CATNB1; + } + else { + tr_error("Invalid RAT for Band mask selection: %d", rat); + + return false; + } + + tr_info("UBANDMASK RAT %d, bitmask : %llu", eBandMastRat, bitmask); + + LOCK(); + + if (_at->send("AT+UBANDMASK=%d,%llu", eBandMastRat, bitmask) && _at->recv("OK")) { + + status = true; + } + UNLOCK(); + + return status; +} +#endif //TARGET_UBLOX_C030_R41XM #ifdef TARGET_UBLOX_C030_R412M bool UbloxCellularBase::get_power_saving_mode(int *status, int *periodic_time, int *active_time)