($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Denis Kenzior <denkenz@gmail.com>
Cc: Adam Pigg <piggz1@gmail.com>,
	ofono@lists.linux.dev,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Merlijn Wajer <merlijn@wizzup.org>,
	Carl Philipp Klemm <philipp@uvos.xyz>
Subject: Re: RFC - Add AT interface to qmi device
Date: Sun, 19 May 2024 21:26:35 +0300	[thread overview]
Message-ID: <20240519182635.GF5156@atomide.com> (raw)
In-Reply-To: <42fea483-2770-45bc-9744-7063174b9ca7@gmail.com>

Hi,

* Denis Kenzior <denkenz@gmail.com> [700101 02:00]:
> Hi Adam,
> 
> On 4/30/24 4:49 PM, Adam Pigg wrote:
> > Hi
> > 
> > I would appreciate views on this patch I need for the Pinephone modem.  This
> > adds code to the gobi plugin and qmi_device to get a handle to the GAtChat Aux
> > interface.  The voicecall and sms drivers can then use this interface to
> > trigger call/sms notification.
> 
> From an architectural perspective this is unfortunate.  QMI atom drivers
> (drivers/qmimodem/*) should not know anything about AT command drivers
> (drivers/atmodem/*) or GAtChat and vice versa.  Doing so keeps dependencies
> to a minimum and allows oFono to be compiled without AT/ISI/RIL/MBIM support
> for example.
> 
> For modem drivers, I can see the need / usecase of driving both QMI and AT /
> whatever ports together simultaneously.  Such modem drivers would then
> depend on both QMI / AT / whatever support being available.
> 
> > 
> > This is done in addition to the QMI interface, because it seems that
> > _sometimes_ the modem does not always send the QMI notification, or it is
> > missed due to the phone being in a deep sleep state.  The AT interface is
> > always triggered.
> 
> Have you considered simply using AT commands for calls and SMS?

At least on Droid4 the ttyUSB AT interface is bit buggy.. But there may be
a generic way to trigger lost QMI events based on the USB AT interface
notifications.

What we accidentally discovered with the Maemo Droid4 modem patches was
that triggering a dummy QMI call on serial (muxed TS 27.010) notifications
would trigger the lost QMI notifications :)

So we have the call below in the out of tree patches to kick the USB QMI
modem based on the AT interface notifications:

int mot_qmi_trigger_events(struct ofono_modem *modem)
{
	struct motmdm_data *data = ofono_modem_get_data(modem);

	if (data->wms == NULL)
		return -ENODEV;

	return qmi_service_send(data->wms, QMI_WMS_GET_SMSC_ADDR, NULL,
						NULL, NULL, g_free);
};

Ivaylo mentioned a while back that the notifications also appear on the
ttyUSB AT interface, so maybe the same code would work for Pinephone and
Droid4. Not sure if Ivaylo already has some related patches.

Regards,

Tony

  reply	other threads:[~2024-05-19 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-30 21:49 RFC - Add AT interface to qmi device Adam Pigg
2024-05-01 21:01 ` Denis Kenzior
2024-05-19 18:26   ` Tony Lindgren [this message]
2024-05-20 18:58     ` Denis Kenzior
2024-05-21  3:11       ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2024-04-30 21:43 Adam Pigg

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=20240519182635.GF5156@atomide.com \
    --to=tony@atomide.com \
    --cc=denkenz@gmail.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=merlijn@wizzup.org \
    --cc=ofono@lists.linux.dev \
    --cc=philipp@uvos.xyz \
    --cc=piggz1@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).