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
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono