Re: Initial integration of the new MM iface in NM



Den 24. okt. 2012 19:26, skrev Aleksander Morgado:
This series of patches add the basic integration needed in NetworkManager in
order to handle the new 'ModemManager1' interface.

I finally got this tested, and the results are that wifi is working fine, and also the old modem manager (MM_06).

I got a problem with the new ModemManager:

NetworkManager[22918]: <warn> (modem0) failed to connect modem: GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed: Requested mode (allowed: 'cs, 2g, 3g, 4g', preferred: 'none') not supported by the modem.

First, my connection is set up to use any mode, so why is the modem requested to all of these instead of ANY?

Second, in the case that it does happen, the attached patch solves this as it has been done in other plugins (maybe this code should be refactored out somehow? Flag for CS support?)

Next, I'm going to test with QMI.

--
Marius
>From d2d192db4ff41754dc0704408b214fdb18109df1 Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Thu, 1 Nov 2012 08:37:34 +0100
Subject: [PATCH] sierra: add handling of CS connection as done in other
 plugins by assuming 2G (GPRS) supports it.

---
 plugins/sierra/mm-broadband-modem-sierra.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/plugins/sierra/mm-broadband-modem-sierra.c b/plugins/sierra/mm-broadband-modem-sierra.c
index 0fbe2d4..7a92c6a 100644
--- a/plugins/sierra/mm-broadband-modem-sierra.c
+++ b/plugins/sierra/mm-broadband-modem-sierra.c
@@ -365,6 +365,13 @@ set_allowed_modes (MMIfaceModem *self,
         return;
     }
 
+    /* There is no explicit config for CS connections, we just assume we may
+     * have them as part of 2G when no GPRS is available */
+    if (allowed & MM_MODEM_MODE_CS) {
+        allowed |= MM_MODEM_MODE_2G;
+        allowed &= ~MM_MODEM_MODE_CS;
+    }
+
     if (allowed == MM_MODEM_MODE_3G)
         idx = 1;
     else if (allowed == MM_MODEM_MODE_2G)
-- 
1.7.10.4



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]