ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@norrbonn.se>
To: ofono@ofono.org
Subject: Re: [PATCH v2 1/4] SARA R4 QMI support
Date: Wed, 24 Feb 2021 09:49:06 +0100	[thread overview]
Message-ID: <ee7b5b4c-ce71-f132-d3e2-6d75fe01b86e@norrbonn.se> (raw)
In-Reply-To: <20210224083924.3480-2-jupiter.hce@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]

Hi Jupiter,

Please add a description to your patch.  Something along these lines:

This adds support for the uBlox SARA-R4 modem.

Unlike other uBlox devices, this modem is actually a Qualcomm part and 
therefore supports the QMI protocol.  For that reason, this doesn't just 
jack into the usual uBlox modem framework.

The modem has a quirk in that it fails to reconnect to the network if a 
NAS detach is issued when connectivity is lost; therefore, we need to 
add some 'vendor' handling to the QMI gprs atom to account for this.

This has been tested... how?

Hope that helps,
Jonas

On 24/02/2021 09:39, Bing Jupiter wrote:
> ---
>   plugins/udevng.c | 41 +++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 41 insertions(+)
> 
> diff --git a/plugins/udevng.c b/plugins/udevng.c
> index 34ac1cc0..9941145f 100644
> --- a/plugins/udevng.c
> +++ b/plugins/udevng.c
> @@ -1194,6 +1194,45 @@ static gboolean setup_ublox(struct modem_info *modem)
>   	return TRUE;
>   }
>   
> +static gboolean setup_ubloxqmi(struct modem_info *modem) {
> +	const char *qmi = NULL, *net = NULL, *gps = NULL, *aux = NULL;
> +	GSList *list;
> +
> +	DBG("%s", modem->syspath);
> +
> +	for (list = modem->devices; list; list = g_slist_next(list)) {
> +		struct device_info *info = list->data;
> +
> +		DBG("%s %s %s %s %s", info->devnode, info->interface,
> +				info->number, info->label, info->subsystem);
> +
> +		if (g_strcmp0(info->interface, "255/255/255") == 0 &&
> +				g_strcmp0(info->number, "03") == 0) {
> +			if (g_strcmp0(info->subsystem, "net") == 0)
> +				net = info->devnode;
> +			else if (g_strcmp0(info->subsystem, "usbmisc") == 0)
> +				qmi = info->devnode;
> +		}
> +	}
> +
> +	DBG("qmi=%s net=%s", qmi, net);
> +
> +	if (qmi == NULL || net == NULL)
> +		return FALSE;
> +
> +	DBG("qmi=%s net=%s", qmi, net);
> +
> +	ofono_modem_set_string(modem->modem, "Device", qmi);
> +	ofono_modem_set_string(modem->modem, "NetworkInterface", net);
> +	ofono_modem_set_string(modem->modem, "Quirk", "SARAR4");
> +
> +	DBG("gps=%s aux=%s", gps, aux);
> +
> +	ofono_modem_set_driver(modem->modem, "gobi");
> +
> +	return TRUE;
> +}
> +
>   static gboolean setup_gemalto(struct modem_info* modem)
>   {
>   	const char *app = NULL, *gps = NULL, *mdm = NULL,
> @@ -1441,6 +1480,7 @@ static struct {
>   	{ "quectel",	setup_quectel	},
>   	{ "quectelqmi",	setup_quectelqmi},
>   	{ "ublox",	setup_ublox	},
> +	{ "ubloxqmi",   setup_ubloxqmi  },
>   	{ "gemalto",	setup_gemalto	},
>   	{ "xmm7xxx",	setup_xmm7xxx	},
>   	{ "mbim",	setup_mbim	},
> @@ -1850,6 +1890,7 @@ static struct {
>   	{ "ublox",	"cdc_ncm",	"1546", "110a"	},
>   	{ "ublox",	"rndis_host",	"1546", "1146"	},
>   	{ "ublox",	"cdc_acm",	"1546", "1146"	},
> +	{ "ubloxqmi",   "qmi_wwan", "05c6", "90b2"  },
>   	{ "gemalto",	"option",	"1e2d",	"0053"	},
>   	{ "gemalto",	"cdc_wdm",	"1e2d",	"0053"	},
>   	{ "gemalto",	"qmi_wwan",	"1e2d",	"0053"	},
> 

  reply	other threads:[~2021-02-24  8:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  8:39 [PATCH v2 0/4] oFono uBlox SARA R4 QMI Bing Jupiter
2021-02-24  8:39 ` [PATCH v2 1/4] SARA R4 QMI support Bing Jupiter
2021-02-24  8:49   ` Jonas Bonn [this message]
2021-02-24  8:39 ` [PATCH v2 2/4] Enable SARA R4 vendor ID for gprs create Bing Jupiter
2021-02-24  8:39 ` [PATCH v2 3/4] Add SARA R4 vendor ID Bing Jupiter
2021-02-24  8:39 ` [PATCH v2 4/4] Make SARA R4 vendor ID conditional being attach and detach Bing Jupiter
2021-02-24  8:50   ` Jonas Bonn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee7b5b4c-ce71-f132-d3e2-6d75fe01b86e@norrbonn.se \
    --to=jonas@norrbonn.se \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).