From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] plugins: add a new driver for Quectel UC15 modems
Date: Tue, 08 Jul 2014 08:49:14 -0500 [thread overview]
Message-ID: <53BBF6DA.9070600@gmail.com> (raw)
In-Reply-To: <1404726887-35547-2-git-send-email-philip@paeps.cx>
[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]
Hi Philip,
On 07/07/2014 04:54 AM, Philip Paeps wrote:
> ---
> Makefile.am | 3 +
> plugins/quectel.c | 379 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 382 insertions(+)
>
I went ahead and applied the patch, with one small fix afterwards:
<snip>
> +static void cfun_query(gboolean ok, GAtResult *result, gpointer user_data)
> +{
> + struct ofono_modem *modem = user_data;
> + struct quectel_data *data = ofono_modem_get_data(modem);
> + GAtResultIter iter;
> + int status;
> +
> + DBG("ok %d", ok);
> +
> + if (!ok)
> + return;
> +
> + g_at_result_iter_init(&iter, result);
> +
> + if (g_at_result_iter_next(&iter, "+CFUN:") == FALSE)
> + return;
> +
> + g_at_result_iter_next_number(&iter, &status);
> +
> + /*
> + * The modem firmware powers up in CFUN=1 but will respond to AT+CFUN=4
> + * with ERROR until some amount of time (which varies with temperature)
> + * passes. Empirical evidence suggests that the firmware will report an
> + * unsolicited +CPIN: notification when it is ready to be useful.
> + *
> + * Work around this feature by only transitioning to CFUN=4 after we've
> + * received an unsolicited +CPIN: notification.
> + */
> +
> + if (status != 1) {
> + g_at_chat_send(data->aux, "AT+CFUN=4", none_prefix,
> + cfun_enable, modem, NULL);
This part doesn't match the comment above. Feel free to send a follow
on patch to fix it.
> + return;
> + }
> +
> + cfun_enable(TRUE, NULL, modem);
> +}
> +
<snip>
> + ofono_devinfo_create(modem, OFONO_VENDOR_QUECTEL, "atmodem",
> + data->aux);
<snip>
> + gprs = ofono_gprs_create(modem, OFONO_VENDOR_QUECTEL, "atmodem",
> + data->aux);
> + gc = ofono_gprs_context_create(modem, OFONO_VENDOR_QUECTEL, "atmodem",
> + data->modem);
> +
<snip>
> + ofono_netreg_create(modem, OFONO_VENDOR_QUECTEL, "atmodem",
> + data->aux);
I changed these to 0 instead of OFONO_VENDOR_QUECTEL since no vendor
specific behavior is being used in these atom drivers.
Regards,
-Denis
prev parent reply other threads:[~2014-07-08 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 9:54 [PATCH v3] Add a driver for Quectel UC15 modems (rebased) Philip Paeps
2014-07-07 9:54 ` [PATCH] plugins: add a new driver for Quectel UC15 modems Philip Paeps
2014-07-08 13:49 ` Denis Kenzior [this message]
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=53BBF6DA.9070600@gmail.com \
--to=denkenz@gmail.com \
--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