meta-digi-dey: Add fix to return correct error code.

This commit fixes an issue with ModemManager to return the correct
error code when an invalid QMI command is send to the modem.

There are two ways to get the UIM/SIM status, one with the "DMS"
service that works on most devices from 2015 and earlier, and a
new way with the "UIM" service that works on many 2015+ devices.
Perhaps the EC21 is new enough that it requires the UIM service,
but ModemManager doesn't recognize the error code that it's returning.
There are two ways to get the UIM/SIM status, one with the "DMS"
service that works on most devices from 2015 and earlier, and a
new way with the "UIM" service that works on many 2015+ devices.
Perhaps the EC21 is new enough that it requires the UIM service,
but ModemManager doesn't recognize the error code that it's returning.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://jira.digi.com/browse/DEL-3748
This commit is contained in:
Mike Engel 2017-03-16 12:53:54 +01:00
parent a48e66c618
commit 3123085e72
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From: Mike Engel <Mike.Engel@digi.com>
Date: Wed, 15 Mar 2017 18:01:06 +0100
Subject: [PATCH] meta-digi-dey: Add fix to return correct error code.
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
---
.../meta-digi-dey/recipes-connectivity/modemmanager/mm-broadband-modem-qmi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index bc13925..f60d0f4 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
/* We get InvalidQmiCommand on newer devices which don't like the legacy way */
if (g_error_matches (error,
QMI_PROTOCOL_ERROR,
- QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
+ QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
+ g_error_matches (error,
+ QMI_PROTOCOL_ERROR,
+ QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
g_error_free (error);
qmi_message_dms_uim_get_pin_status_output_unref (output);
/* Flag that the command is unsupported, and try with the new way */

View File

@ -2,7 +2,10 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI += "file://cellularifupdown" SRC_URI += " \
file://cellularifupdown \
file://0001-meta-digi-dey-Add-fix-to-return-correct-error-code.patch \
"
# 'polkit' depends on 'consolekit', and this requires 'x11' distro feature. So # 'polkit' depends on 'consolekit', and this requires 'x11' distro feature. So
# remove 'polkit' support to be able to build ModemManager on a framebuffer # remove 'polkit' support to be able to build ModemManager on a framebuffer