Re: Quectel modem ceases working

Denis Kenzior <[email protected]> Wed, 10 Sep 2025 10:31:05 -0500
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
Hi Timo,

On 9/10/25 5:59 AM, Timo Ketola wrote:
> Hi Denis,
> 
> Thanks for looking at this!
> 
> My further testing unsurprisingly shows that my hack does not really
> work. list-modems looks better and the IF gets IP address but actual
> traffic does not work.

Yeah, looks like the raw_ip setting isn't being reset back to what is expected.

> 
>> What kernel are you running?
> 
> 5.4.78 with RT patch.

Ugh.  I really have no desire to support kernels pre-5.15 when the passthrough 
capability was introduced.  I also have no hardware that is not 802.3 mode 
capable.  You can try the following patch though and see if things work again.

Regards,
-Denis

diff --git a/plugins/gobi.c b/plugins/gobi.c
index 52ead377de7f..1b77e5e32ed6 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -665,10 +665,21 @@ static void set_data_format_cb(struct qmi_result *result, 
void *user_data)
  	DBG("");

  	if (!qmi_result_set_error(result, NULL)) {
+		struct qmi_wda_data_format actual;
+
  		if (!compare_data_format(data, result))
  			goto done;

  		ofono_error("Setting Data Format had no effect");
+
+		if (!qmi_wda_parse_data_format(result, &actual) &&
+				data->data_format == WDA_DATA_FORMAT_802_3 &&
+				actual.ll_protocol ==
+				QMI_WDA_DATA_LINK_PROTOCOL_RAW_IP) {
+			ofono_warn("Modem seems to only work in raw-ip mode");
+			data->data_format = WDA_DATA_FORMAT_RAW_IP;
+			goto done;
+		}
  	}

  	if (data->data_format == WDA_DATA_FORMAT_802_3)