When registering to an operator ofono uses the old RAT.
In the case the modem is not connected to any network, this would use
QMI_NAS_NETWORK_RAT_NONE which results in the error OP_DEVICE_UNSUPPORTED.
Use QMI_NAS_NETWORK_RAT_NO_CHANGE instead to not define any preference.
---
drivers/qmimodem/nas.h | 1 +
drivers/qmimodem/network-registration.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/qmimodem/nas.h b/drivers/qmimodem/nas.h
index 09807f83..d2feb464 100644
--- a/drivers/qmimodem/nas.h
+++ b/drivers/qmimodem/nas.h
@@ -97,6 +97,7 @@ struct qmi_nas_network_rat {
} __attribute__((__packed__)) info[0];
} __attribute__((__packed__));
+#define QMI_NAS_NETWORK_RAT_NONE 0x00
#define QMI_NAS_NETWORK_RAT_GSM 0x04
#define QMI_NAS_NETWORK_RAT_UMTS 0x05
#define QMI_NAS_NETWORK_RAT_LTE 0x08
diff --git a/drivers/qmimodem/network-registration.c
b/drivers/qmimodem/network-registration.c
index 52ad69a6..04de5a5b 100644
--- a/drivers/qmimodem/network-registration.c
+++ b/drivers/qmimodem/network-registration.c
@@ -356,7 +356,7 @@ static void qmi_register_manual(struct ofono_netreg *netreg,
info.mcc = atoi(mcc);
info.mnc = atoi(mnc);
- info.rat = data->current_rat;
+ info.rat = QMI_NAS_NETWORK_RAT_NO_CHANGE;
qmi_param_append(param, QMI_NAS_PARAM_REGISTER_MANUAL_INFO,
sizeof(info), &info);
--
2.13.3
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono