diff options
Diffstat (limited to 'include/mts/MTS_IO_ICellularRadio.h')
-rw-r--r-- | include/mts/MTS_IO_ICellularRadio.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/mts/MTS_IO_ICellularRadio.h b/include/mts/MTS_IO_ICellularRadio.h index e061636..f3e15e2 100644 --- a/include/mts/MTS_IO_ICellularRadio.h +++ b/include/mts/MTS_IO_ICellularRadio.h @@ -620,6 +620,42 @@ namespace MTS { */ virtual CODE getVoiceSupport(Json::Value& jData) = 0; virtual CODE getVoiceSupport(bool& bVoiceEnabled, bool& bSmsOnly) = 0; + + /** + * @brief getSelectedBandsRaw - get the raw Selected Bands value for the current radio. + * + * This commands sends the query to the radio, selects first 3 values from the response, + * parses the numbers as dec (Telit GSM and WCDMA fiels) or hex (Quectel GW_band and LTE, + * Telit LTE), formats them as comma-separated hex values and saves the result to sRawBands. + * + * WARNING: The response format is radio-dependent. Please consult the AT command manual + * to interpet the resulting values. + * + * For Telit radios: + * + * - command: `AT#BND?`; + * - example radio response: `#BND: 5,15,800C5`; + * - `sRawBands` format: `<GSM, hex, 16-bit>[,<WCDMA, hex, 16-bit>[,<LTE, hex, 64-bit>]]`; + * - example `sRawBands` content: `5,F,800C5`. + * + * For Quectel radios: + * + * - command: `AT+QCFG="band"`; + * - example radio response: `+QCFG: "band",0x93,0x80800c5,0x0`; + * - `sRawBands` format: `<GW_band, hex, 16-bit>,<GW_band, hex, 16-bit>,<LTE, hex, 64-bit>`, + * NOTE: the `<GW_band>` value is duplicated for the first two fields; + * - example `sRawBands` content: `93,93,80800c5`. + * + * @param sRawBands - radio-depended string value, shows the currently selected bands. + * + * @return CODE::SUCCESS when fetched successfully, + * CODE::NOT_APPLICABLE when the modem doesn't support this feature, + * CODE::NO_RESPONSE when the modem doesn't respond, + * CODE::ERROR when the radio returns "ERROR", + * CODE::FAILURE otherwise (unexpected response). + */ + virtual CODE getSelectedBandsRaw(std::string& sRawBands) = 0; + }; } } |