Base class for the ublox-xxx-cellular-xxx classes. Cannot be used standalone, only inherited by classes that do properly useful stuff. Or, to put it another way, if you are using any of the ublox-xxx-cellular-xxx classes, you will need this class also.
Dependents: example-ublox-cellular-interface example-ublox-cellular-driver-gen HelloMQTT example-ublox-cellular-interface_r410M ... more
Diff: UbloxCellularBase.h
- Revision:
- 20:31d5e048fbfa
- Parent:
- 14:e420232ee4e7
- Child:
- 21:98aea8f49cd8
diff -r 15f31e074d67 -r 31d5e048fbfa UbloxCellularBase.h
--- a/UbloxCellularBase.h Mon Sep 17 10:46:14 2018 +0000
+++ b/UbloxCellularBase.h Fri Mar 22 13:45:51 2019 +0500
@@ -174,6 +174,89 @@
*/
int rssi();
+ /** RAT values for +URAT command
+ * R412M only supports value 7 (CatM1), 8 (NB1), and 9 (GPRS)
+ */
+ typedef enum {
+ GSM_GPRS_EGPRS = 0,
+ GSM_UMTS = 1,
+ UMTS = 2,
+ URAT_LTE = 3,
+ GSM_UMTS_LTE = 4,
+ GSM_LTE = 5,
+ UMTS_LTE = 6,
+ LTE_CATM1 = 7,
+ LTE_CATNB1 = 8,
+ GPRS_EGPRS = 9,
+ NOT_USED = 255
+ } RAT;
+
+#ifdef TARGET_UBLOX_C030_R41XM
+ /** Supported MNO profiles for SARA-R4.
+ */
+ typedef enum {
+ SW_DEFAULT = 0,
+ SIM_ICCID = 1,
+ ATT = 2,
+ VERIZON = 3,
+ TELSTRA = 4,
+ TMO = 5,
+ CT = 6,
+ VODAFONE = 19,
+ TELUS = 21,
+ DT = 31,
+ STANDARD_EU = 100
+ } MNOProfile;
+
+ #if MBED_CONF_UBLOX_CELL_DEFAULT_MNO_PROFILE
+ #define DEFAULT_MNO_PROFILE (MNOProfile)MBED_CONF_UBLOX_CELL_DEFAULT_MNO_PROFILE
+ #else
+ #define DEFAULT_MNO_PROFILE SW_DEFAULT
+ #endif
+
+ /** Reads the current MNO profile from modem and sets it to user specified profile
+ *
+ * @return true if operation was successful, false if there was an error
+ */
+ bool set_mno_profile(MNOProfile profile = DEFAULT_MNO_PROFILE);
+
+ /** Get current MNO profile.
+ *
+ * @param profile pointer to variable that can hold the value for returned profile
+ * @return true if operation was successful, false if there was an error
+ */
+ bool get_mno_profile(MNOProfile *profile);
+#endif
+
+ /** Set Radio Access Technology on modem.
+ *
+ * Note: RAT should only be set in detached state and a reboot is required for settings to take effect
+ *
+ * @param selected_rat Radio Access Technology to use
+ * @param preferred_rat Radio Access Technology to use if selected_rat is not available
+ * @param second_preferred_rat Radio Access Technology to use if selected_rat and preferred_rat are not available
+ *
+ * @return true if successful, otherwise false.
+ */
+ bool set_modem_rat(RAT selected_rat, RAT preferred_rat = NOT_USED, RAT second_preferred_rat = NOT_USED);
+
+ /** Get last saved values for RAT using +URAT read command. Note: The current selected RAT is indicated by DeviceInfo.rat
+ *
+ * @param selected_rat pointer to variable that can hold the value for selected_rat
+ * @param preferred_rat pointer to variable that can hold the value for preferred_rat
+ * @param second_preferred_rat pointer to variable that can hold the value for second_preferred_rat
+ *
+ * Note: NOT_USED will be returned in the variables if dual or tri modes are not enabled.
+ *
+ * @return true if successful, otherwise false.
+ */
+ bool get_modem_rat(RAT *selected_rat, RAT *preferred_rat, RAT *second_preferred_rat);
+
+ /** reboot the modem using AT+CFUN=15.
+ *
+ * @return true if successful, otherwise false.
+ */
+ bool reboot_modem();
protected:
#define OUTPUT_ENTER_KEY "\r"
u-blox