Re: [PATCH v2] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Dan Williams
On Fri, 2016-06-17 at 20:31 +0200, Bjørn Mork wrote:
> Dan Williams  writes:
> 
> > 
> > ___
> > ModemManager-devel mailing list
> > ModemManager-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
> 
> Forgot something here, maybe?
> 

No idea what happened there...

Dan
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH v2] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Dan Williams
MM never passes MBIM_CONTEXT_IP_TYPE_DEFAULT which would require paying
attention to the ip_type in the reply to figure out what type the modem
activated.  Instead, MM always specifies the ip_type it wants to activate,
and some modems (K5160) return a different type in the response.  The modem
is required to activate the type MM asks for or return an error, so if
the activation was successful we can safely assume the modem activated
the ip_type we want, and we can ignore the ip_type in the response.
---
 src/mm-bearer-mbim.c | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index 8c69fb3..5db5f32 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -581,7 +581,6 @@ connect_set_ready (MbimDevice *device,
 MbimMessage *response;
 guint32 session_id;
 MbimActivationState activation_state;
-MbimContextIpType ip_type;
 guint32 nw_error;
 
 response = mbim_device_command_finish (device, res, &error);
@@ -595,7 +594,7 @@ connect_set_ready (MbimDevice *device,
 &session_id,
 &activation_state,
 NULL, /* voice_call_state */
-&ip_type,
+NULL, /* ip_type */
 NULL, /* context_type */
 &nw_error,
 &inner_error)) {
@@ -604,11 +603,15 @@ connect_set_ready (MbimDevice *device,
 g_error_free (error);
 error = mm_mobile_equipment_error_from_mbim_nw_error 
(nw_error);
 } else {
-ctx->ip_type = ip_type;
+/* Report the ip_type we originally requested, since the 
ip_type
+ * from the response is only relevant if the requested used
+ * MBIM_CONTEXT_IP_TYPE_DEFAULT, which MM never does.  Some
+ * devices (K5160) report the wrong type in the response.
+ */
 mm_dbg ("Session ID '%u': %s (IP type: %s)",
 session_id,
 mbim_activation_state_get_string (activation_state),
-mbim_context_ip_type_get_string (ip_type));
+mbim_context_ip_type_get_string (ctx->ip_type));
 }
 } else {
 /* Prefer the error from the result to the parsing error */
@@ -816,7 +819,6 @@ connect_context_step (ConnectContext *ctx)
 const gchar *user;
 const gchar *password;
 MbimAuthProtocol auth;
-MbimContextIpType ip_type;
 MMBearerIpFamily ip_family;
 GError *error = NULL;
 
@@ -870,13 +872,13 @@ connect_context_step (ConnectContext *ctx)
 }
 
 if (ip_family == MM_BEARER_IP_FAMILY_IPV4)
-ip_type = MBIM_CONTEXT_IP_TYPE_IPV4;
+ctx->ip_type = MBIM_CONTEXT_IP_TYPE_IPV4;
 else if (ip_family == MM_BEARER_IP_FAMILY_IPV6)
-ip_type = MBIM_CONTEXT_IP_TYPE_IPV6;
+ctx->ip_type = MBIM_CONTEXT_IP_TYPE_IPV6;
 else if (ip_family == MM_BEARER_IP_FAMILY_IPV4V6)
-ip_type = MBIM_CONTEXT_IP_TYPE_IPV4V6;
+ctx->ip_type = MBIM_CONTEXT_IP_TYPE_IPV4V6;
 else if (ip_family == (MM_BEARER_IP_FAMILY_IPV4 | 
MM_BEARER_IP_FAMILY_IPV6))
-ip_type = MBIM_CONTEXT_IP_TYPE_IPV4_AND_IPV6;
+ctx->ip_type = MBIM_CONTEXT_IP_TYPE_IPV4_AND_IPV6;
 else if (ip_family == MM_BEARER_IP_FAMILY_NONE ||
  ip_family == MM_BEARER_IP_FAMILY_ANY)
 /* A valid default IP family should have been specified */
@@ -896,7 +898,7 @@ connect_context_step (ConnectContext *ctx)
 return;
 }
 
-mm_dbg ("Launching %s connection with APN '%s'...", 
mbim_context_ip_type_get_string (ip_type), apn);
+mm_dbg ("Launching %s connection with APN '%s'...", 
mbim_context_ip_type_get_string (ctx->ip_type), apn);
 message = (mbim_message_connect_set_new (
ctx->self->priv->session_id,
MBIM_ACTIVATION_COMMAND_ACTIVATE,
@@ -905,7 +907,7 @@ connect_context_step (ConnectContext *ctx)
password ? password : "",
MBIM_COMPRESSION_NONE,
auth,
-   ip_type,
+   ctx->ip_type,
mbim_uuid_from_context_type 
(MBIM_CONTEXT_TYPE_INTERNET),
&error));
 if (!message) {
-- 
2.5.5


___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: [PATCH v2] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Bjørn Mork
Dan Williams  writes:

> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Forgot something here, maybe?



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: [PATCH] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Dan Williams
On Fri, 2016-06-17 at 19:31 +0200, Thomas Schäfer wrote:
> Hi,
> 
> 
> Assumed I applied the patch correctly. It doesn't work.

And for good reason...  try the updated patch I just sent, that should
do the trick.  Thanks for testing!

Dan
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH v2] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Dan Williams

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Hi,
I put IPv6 on Ignore, but still same behaviour. I think the problem is 
somewhere else not IPv6. 
First what is strange I need to start PC with enabled ModemManger Service 
otherwise starting ModemManager manualy the Simcard will fail.
Second when I start the PC with  ModemManager as a service first attempt to 
connect will fail see log below. What wonders me is that now the nm sees a 
cdc-wdm1 device.  If I restart ModemManager manualy. I can connect but this 
time nm sees a cdc-wdm0 device.
Thomas


-Ursprüngliche Nachricht-
Von: Bjørn Mork [mailto:bj...@mork.no] 
Gesendet: Freitag, 17. Juni 2016 19:45
An: Aleksander Morgado 
Cc: Thomas Lang ; 
modemmanager-devel@lists.freedesktop.org
Betreff: Re: MC7455 not working

Aleksander Morgado  writes:

> On Fri, Jun 17, 2016 at 5:56 PM, Thomas Lang  wrote:
>> ModemManager[835]:   QMI IPv4 Settings:
>> ModemManager[835]:   Address: 100.76.202.73/30
>> ModemManager[835]:   Gateway: 100.76.202.74
>> ModemManager[835]:   DNS #1: 139.7.30.126
>> ModemManager[835]:   DNS #2: 139.7.30.125
>> ModemManager[835]:  MTU: 1500
>> ModemManager[835]: [/dev/cdc-wdm1] Allocating new client ID...
>> ModemManager[835]: [/dev/cdc-wdm1] Registered 'wds' (version 1.67) client 
>> with ID '36'
>> ModemManager[835]:   error: couldn't start network: QMI protocol error 
>> (14): 'CallFailed'
>> ModemManager[835]:   call end reason (1): 'generic-unspecified'
>> ModemManager[835]:   verbose call end reason (2,210): 
>> [internal] pdn-ipv6-call-disallowed
>> ModemManager[835]:   Modem 
>> /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> 
>> connected)
>
> Are you requesting both IPv4 and IPv6 explictly in the NM config?
> Looks like IPv6 is failing here.

Yes, looks like it is denied by the network.  FWIW, I'm currently in exact the 
same situation - as embarrassing as that might be.  But I don't see any 
failures due to this, only the expected pdn-ipv6-call-disallowed 'CallFailed' 
message.  The IPv4 session still works fine for me.



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: MC7455 not working

2016-06-17 Thread Bjørn Mork
Aleksander Morgado  writes:

> On Fri, Jun 17, 2016 at 5:56 PM, Thomas Lang  wrote:
>> ModemManager[835]:   QMI IPv4 Settings:
>> ModemManager[835]:   Address: 100.76.202.73/30
>> ModemManager[835]:   Gateway: 100.76.202.74
>> ModemManager[835]:   DNS #1: 139.7.30.126
>> ModemManager[835]:   DNS #2: 139.7.30.125
>> ModemManager[835]:  MTU: 1500
>> ModemManager[835]: [/dev/cdc-wdm1] Allocating new client ID...
>> ModemManager[835]: [/dev/cdc-wdm1] Registered 'wds' (version 1.67) client 
>> with ID '36'
>> ModemManager[835]:   error: couldn't start network: QMI protocol error 
>> (14): 'CallFailed'
>> ModemManager[835]:   call end reason (1): 'generic-unspecified'
>> ModemManager[835]:   verbose call end reason (2,210): [internal] 
>> pdn-ipv6-call-disallowed
>> ModemManager[835]:   Modem /org/freedesktop/ModemManager1/Modem/0: 
>> state changed (connecting -> connected)
>
> Are you requesting both IPv4 and IPv6 explictly in the NM config?
> Looks like IPv6 is failing here.

Yes, looks like it is denied by the network.  FWIW, I'm currently in
exact the same situation - as embarrassing as that might be.  But I
don't see any failures due to this, only the expected
pdn-ipv6-call-disallowed 'CallFailed' message.  The IPv4 session still
works fine for me.



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: [PATCH] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Thomas Schäfer
Hi,


Assumed I applied the patch correctly. It doesn't work.


The logfile is attached.


k5160 and K5150 do not work with it.

Regards,

Thomas


k5160.tar.7z
Description: application/7z-compressed
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Hi,
Another trace. The last one for today.  I personally can't see a difference. 

Attempt not working:

go@ubuntu:~$ sudo ModemManager
ModemManager[835]:   ModemManager (version 1.5.992) starting in system 
bus...
ModemManager[835]:   (ttyUSB2): port attributes not fully set
ModemManager[835]:   (ttyUSB1): port attributes not fully set
ModemManager[835]:   (ttyUSB0): port attributes not fully set
ModemManager[835]: [/dev/cdc-wdm0] Opening device with flags 'version-info, 
proxy'...
ModemManager[835]: cannot connect to proxy: Could not connect: Connection 
refused
ModemManager[835]: spawning new qmi-proxy (try 1)...
ModemManager[835]: [/dev/cdc-wdm1] Opening device with flags 'version-info, 
proxy'...
ModemManager[835]: cannot connect to proxy: Could not connect: Connection 
refused
ModemManager[835]: spawning new qmi-proxy (try 1)...
ModemManager[835]: [/dev/cdc-wdm0] Checking version info (10 retries)...
ModemManager[835]: [/dev/cdc-wdm1] Checking version info (10 retries)...
ModemManager[835]: [/dev/cdc-wdm0] QMI Device supports 32 services:
ModemManager[835]: [/dev/cdc-wdm0]ctl (1.5)
ModemManager[835]: [/dev/cdc-wdm0]wds (1.67)
ModemManager[835]: [/dev/cdc-wdm0]dms (1.14)
ModemManager[835]: [/dev/cdc-wdm0]nas (1.25)
ModemManager[835]: [/dev/cdc-wdm0]qos (1.6)
ModemManager[835]: [/dev/cdc-wdm0]wms (1.10)
ModemManager[835]: [/dev/cdc-wdm0]auth (1.3)
ModemManager[835]: [/dev/cdc-wdm0]at (1.2)
ModemManager[835]: [/dev/cdc-wdm0]voice (2.1)
ModemManager[835]: [/dev/cdc-wdm0]cat2 (2.24)
ModemManager[835]: [/dev/cdc-wdm0]uim (1.45)
ModemManager[835]: [/dev/cdc-wdm0]pbm (1.4)
ModemManager[835]: [/dev/cdc-wdm0]test (1.0)
ModemManager[835]: [/dev/cdc-wdm0]loc (2.0)
ModemManager[835]: [/dev/cdc-wdm0]sar (1.0)
ModemManager[835]: [/dev/cdc-wdm0]ts (1.0)
ModemManager[835]: [/dev/cdc-wdm0]tmd (1.0)
ModemManager[835]: [/dev/cdc-wdm0]wda (1.16)
ModemManager[835]: [/dev/cdc-wdm0]csvt (1.1)
ModemManager[835]: [/dev/cdc-wdm0]coex (1.0)
ModemManager[835]: [/dev/cdc-wdm0]pdc (1.0)
ModemManager[835]: [/dev/cdc-wdm0]rfrpe (1.0)
ModemManager[835]: [/dev/cdc-wdm0]dsd (1.0)
ModemManager[835]: [/dev/cdc-wdm0]ssctl (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0x2e] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0x30] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0x31] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0x36] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]rms (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0xf0] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0xf5] (1.0)
ModemManager[835]: [/dev/cdc-wdm0]unknown [0xf6] (1.0)
ModemManager[835]: [/dev/cdc-wdm1] QMI Device supports 32 services:
ModemManager[835]: [/dev/cdc-wdm1]ctl (1.5)
ModemManager[835]: [/dev/cdc-wdm1]wds (1.67)
ModemManager[835]: [/dev/cdc-wdm1]dms (1.14)
ModemManager[835]: [/dev/cdc-wdm1]nas (1.25)
ModemManager[835]: [/dev/cdc-wdm1]qos (1.6)
ModemManager[835]: [/dev/cdc-wdm1]wms (1.10)
ModemManager[835]: [/dev/cdc-wdm1]auth (1.3)
ModemManager[835]: [/dev/cdc-wdm1]at (1.2)
ModemManager[835]: [/dev/cdc-wdm1]voice (2.1)
ModemManager[835]: [/dev/cdc-wdm1]cat2 (2.24)
ModemManager[835]: [/dev/cdc-wdm1]uim (1.45)
ModemManager[835]: [/dev/cdc-wdm1]pbm (1.4)
ModemManager[835]: [/dev/cdc-wdm1]test (1.0)
ModemManager[835]: [/dev/cdc-wdm1]loc (2.0)
ModemManager[835]: [/dev/cdc-wdm1]sar (1.0)
ModemManager[835]: [/dev/cdc-wdm1]ts (1.0)
ModemManager[835]: [/dev/cdc-wdm1]tmd (1.0)
ModemManager[835]: [/dev/cdc-wdm1]wda (1.16)
ModemManager[835]: [/dev/cdc-wdm1]csvt (1.1)
ModemManager[835]: [/dev/cdc-wdm1]coex (1.0)
ModemManager[835]: [/dev/cdc-wdm1]pdc (1.0)
ModemManager[835]: [/dev/cdc-wdm1]rfrpe (1.0)
ModemManager[835]: [/dev/cdc-wdm1]dsd (1.0)
ModemManager[835]: [/dev/cdc-wdm1]ssctl (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0x2e] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0x30] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0x31] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0x36] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]rms (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0xf0] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0xf5] (1.0)
ModemManager[835]: [/dev/cdc-wdm1]unknown [0xf6] (1.0)
ModemManager[835]:   Couldn't check support for device at 
'/sys/devices/pci:00/:00:02.2/:01:00.0':
not 
supported by any plugin
ModemManager[835]:   Couldn't check support for device at 
'/sys/devices/pci:00/:00:02.3/:02:00.0':
not 
supported by any plugin
ModemManager[835]:   Couldn't check support for device at 
'/sys/devices/pci:00/:00:02.4/:03:00.0':   

AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Without restart means I have power-up the device and tried to connect. After 
this has failed I have restarted nm and mm as service and tried to connect 
again with the nmcli.

-Ursprüngliche Nachricht-
Von: Aleksander Morgado [mailto:aleksan...@aleksander.es] 
Gesendet: Freitag, 17. Juni 2016 15:37
An: Thomas Lang 
Cc: modemmanager-devel@lists.freedesktop.org; Aleksander Morgado 

Betreff: Re: MC7455 not working

On Fri, Jun 17, 2016 at 2:59 PM, Thomas Lang  wrote:
> Without restart:
>
> go@ubuntu:~$ mmcli -b 0
> Bearer '/org/freedesktop/ModemManager1/Bearer/0'
>   -
>   Status |   connected: 'no'
>  |   suspended: 'no'
>  |   interface: 'unknown'
>  |  IP timeout: '20'
>   -
>   Properties | apn: 'web.vodafone.de'
>  | roaming: 'allowed'
>  | IP type: 'ipv4v6'
>  |user: 'none'
>  |password: 'none'
>  |  number: '*99#'
>  | Rm protocol: 'unknown'
>   -
>   IPv4 configuration |   method: 'unknown'
>   -
>   IPv6 configuration |   method: 'unknown'
>   -
>   Stats  |  Duration: '0'
>  |Bytes received: 'N/A'
>  | Bytes transmitted: 'N/A'

This info wasn't taken when MM said the bearer was connected; so not useful. It 
should have said "method DHCP or method static" in IPv4 configuration.

> go@ubuntu:~$ sudo service network-manager status ● 
> NetworkManager.service - Network Manager
>Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; 
> vendor preset: enabled)
>Active: active (running) since Fri 2016-06-17 14:48:32 CEST; 4min 
> 28s ago  Main PID: 450 (NetworkManager)
>CGroup: /system.slice/NetworkManager.service
>└─450 /usr/sbin/NetworkManager --no-daemon
>
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3502] 
> dhcp4 (wwp0s19u1u3i8): dhclient started with pid 735 Jun 17 14:50:11 
> ubuntu NetworkManager[450]:   [1466167811.3506] (cdc-wdm0): IPv6 
> configuration disabled Jun 17 14:50:11 ubuntu NetworkManager[450]: 
>   [1466167811.3853] dhcp4 (wwp0s19u1u3i8): client pid 735 exited 
> with status 1 Jun 17 14:50:11 ubuntu NetworkManager[450]:   
> [1466167811.3854] dhcp4 (wwp0s19u1u3i8): state changed unknown -> done Jun 17 
> 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3859] dhcp4 
> (wwp0s19u1u3i8): canceled DHCP transaction Jun 17 14:50:11 ubuntu 
> NetworkManager[450]:   [1466167811.3873] device (cdc-wdm0): state 
> change: ip-config -> failed (reason 'ip-config-unavailable') [70 120 5] Jun 
> 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3904] device 
> (cdc-wdm0): Activation: failed for connection 'Vodafone Default'
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3930] 
> device (cdc-wdm0): state change: failed -> disconnected (reason 
> 'none') [120 30 0] Jun 17 14:50:11 ubuntu NetworkManager[450]:   
> [1466167811.4011] (cdc-wdm0): modem state changed, 'connected' --> 
> 'disconnecting' (reason: user-requested) Jun 17 14:50:11 ubuntu 
> NetworkManager[450]:   [1466167811.4543] (cdc-wdm0): modem state 
> changed, 'disconnecting' --> 'registered' (reason: user-requested)
>
> After restart:
>


What exactly are you restarting? The whole PC, NM, MM?


> NetworkManager.service - Network Manager
>Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; 
> vendor preset: enabled)
>Active: active (running) since Fri 2016-06-17 14:55:20 CEST; 1min 
> 51s ago  Main PID: 857 (NetworkManager)
>CGroup: /system.slice/NetworkManager.service
>├─857 /usr/sbin/NetworkManager --no-daemon
>└─888 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground 
> --no-hosts --bind-interfaces 
> --pid-file=/var/run/NetworkManager/dnsmasq.pid 
> --listen-address=127.0.1.1 --cache-size=0 --p
>
> Jun 17 14:55:46 ubuntu dnsmasq[888]: started, version 2.75 cache 
> disabled Jun 17 14:55:46 ubuntu dnsmasq[888]: compile time options: 
> IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset 
> auth DNSSEC loop-detect inotify Jun 17 14:55:46 ubuntu dnsmasq[888]: 
> DBus support enabled: connected to system bus Jun 17 14:55:46 ubuntu 
> dnsmasq[888]: warning: no upstream servers configured Jun 17 14:55:46 ubuntu 
> NetworkManager[857]:   [1466168146.9397] device (cdc-wdm0): Activation: 
> successful, device activated.
> Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9526] 
> dnsmasq[0x197db40]: dnsmasq appeared as :1.32 Jun 17 14:55:46 ubuntu 
> NetworkManager[857]:   [1466168146.9534] dns-mgr: Writing DNS 
> information to /sbin/resolvconf Jun 17 14:55:46 ubuntu dnsmasq[888]: 
> setting upstream servers from DBus Jun 17 14:55:46 ubuntu 
> dnsmasq[888]: using nameserver 139.

AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Hmm, so itried dieffrent things out and what I have observed is that if I don’t 
use NM and MM as sudo systemctl enable NetworkManager ModemManager. The SIM 
card fails. You could see this in the last mail. When I start the PC after 
power down. And stop MM with :

sudo service ModemManager stop
go@ubuntu:~$ mmcli -L

No modems were found

go@ubuntu:~$ mmcli -m 0

/org/freedesktop/ModemManager1/Modem/0 (device id 
'7b4cfd7e877aff3cade0b53c88a7b33e7a95c7df')
  -
  Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
   |  model: 'MC7455'
   |   revision: 'SWI9X30C_02.08.02.00 r5428 CARMD-EV-FRMWR2 
2016/01/06 20:38:53'
   |  supported: 'gsm-umts
   |  lte
   |  gsm-umts, lte'
   |current: 'gsm-umts, lte'
   |   equipment id: '359072060132616'
  -
  System   | device: 
'/sys/devices/pci:00/:00:13.0/usb1/1-1/1-1.3'
   |drivers: 'qcserial, qmi_wwan'
   | plugin: 'Sierra'
   |   primary port: 'cdc-wdm0'
   |  ports: 'ttyUSB2 (at), ttyUSB0 (qcdm), wwp0s19u1u3i10 
(net), cdc-wdm0 (qmi), cdc-wdm1 (qmi), wwan0 (net)'
  -
  Numbers  |   own : 'unknown'
  -
  Status   |   lock: 'sim-pin2'
   | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 
(10)'
   |  state: 'registered'
   |power state: 'on'
   |access tech: 'lte'
   | signal quality: '54' (recent)
  -
  Modes|  supported: 'allowed: 2g, 3g, 4g; preferred: none'
   |current: 'allowed: 2g, 3g, 4g; preferred: none'
  -
  Bands|  supported: 'u2100, u1800, u1900, u17iv, u850, u900, eutran-i, 
eutran-ii, eutran-iii, eutran-iv, eutran-v, eutran-vii, eutran-viii, 
eutran-xii, eutran-xiii, eutran-xx, eutran-xxv, eutran-xli'
   |current: 'u2100, u1800, u1900, u17iv, u850, u900, eutran-i, 
eutran-ii, eutran-iii, eutran-iv, eutran-v, eutran-vii, eutran-viii, 
eutran-xii, eutran-xiii, eutran-xx, eutran-xxv, eutran-xli'
  -
  IP   |  supported: 'ipv4, ipv6, ipv4v6'
  -
  3GPP |   imei: '359072060132616'
   |  enabled locks: 'none'
   |operator id: '26202'
   |  operator name: 'Vodafone'
   |   subscription: 'unknown'
   |   registration: 'home'
  -
  SIM  |   path: '/org/freedesktop/ModemManager1/SIM/0'

  -
  Bearers  |  paths: 'none'

go@ubuntu:~$ sudo nmcli d
DEVICETYPE  STATE CONNECTION
cdc-wdm0  gsm   disconnected  --
wlp4s0wifi  disconnected  --
enp1s0ethernet  unavailable   --
enp3s0ethernet  unavailable   --
enp2s0ethernet  unmanaged --
loloopback  unmanaged --
go@ubuntu:~$ sudo nmcli d c cdc-wdm0
Device 'cdc-wdm0' successfully activated with 
'9264dfab-d648-4497-b851-97bd6a3ad1ce'.

It works. Below find the debug trace. But still if NM and MM are enable as 
service. PC start after powerdown I still need to restart MM once to get it 
running. My idea would be to restart MM somewhere with a script. Do you see 
another solution for now?


>>   tlv_length  = 7
>>   message = "Set Event Report" (0x0002)
>> TLV:
>>   type   = "Result" (0x02)
>>   length = 4
>>   value  = 00:00:00:00
>>   translated = SUCCESS
ModemManager[1157]: [/dev/cdc-wdm0] Sent message...
<< RAW:
<<   length = 17
<<   data   = 01:10:00:00:03:07:00:07:00:03:00:04:00:13:01:00:01
ModemManager[1157]: [/dev/cdc-wdm0] Sent message (translated)...
<< QMUX:
<<   length  = 16
<<   flags   = 0x00
<<   service = "nas"
<<   client  = 7
<< QMI:
<<   flags   = "none"
<<   transaction = 7
<<   tlv_length  = 4
<<   message = "Register Indications" (0x0003)
<< TLV:
<<   type   = "Serving System Events" (0x13)
<<   length = 1
<<   value  = 01
<<   translated = yes
ModemManager[1157]: [/dev/cdc-wdm0] Received message...
>> RAW:
>>   length = 20
>>   data   = 01:13:00:80:03:07:02:07:00:03:00:07:00:02:04:00:00:00:00:00
ModemManager[1157]: [/dev/cdc-wdm0] Received message (translated)...
>> QMUX:
>>   length  = 19
>>   flags   = 0x80
>>   service = "nas"
>>   client  = 7
>> QMI:
>>   flags   = "response"
>>   transaction = 7
>>   tlv_length  = 7
>>   message = "Register Indications" (0x0003)
>> TLV:
>>   type   = "Result" (0x02)
>>   length = 4
>>   value  = 00:00:00:00
>>   translated = SUCCESS
ModemManager[1157]:  [1466176578.472516] [mm-broadband-modem.c:9238] 
enabling_step(): Modem has location capabil

Re: [PATCH] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Aleksander Morgado
On Fri, Jun 17, 2016 at 5:46 PM, Dan Williams  wrote:
> MM never passes MBIM_CONTEXT_IP_TYPE_DEFAULT which would require paying
> attention to the ip_type in the reply to figure out what type the modem
> activated.  Instead, MM always specifies the ip_type it wants to activate,
> and some modems (K5160) return a different type in the response.  The modem
> is required to activate the type MM asks for or return an error, so if
> the activation was successful we can safely assume the modem activated
> the ip_type we want, and we can ignore the ip_type in the response.

+1

> ---
>  src/mm-bearer-mbim.c | 11 +++
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
> index 8c69fb3..be58950 100644
> --- a/src/mm-bearer-mbim.c
> +++ b/src/mm-bearer-mbim.c
> @@ -581,7 +581,6 @@ connect_set_ready (MbimDevice *device,
>  MbimMessage *response;
>  guint32 session_id;
>  MbimActivationState activation_state;
> -MbimContextIpType ip_type;
>  guint32 nw_error;
>
>  response = mbim_device_command_finish (device, res, &error);
> @@ -595,7 +594,7 @@ connect_set_ready (MbimDevice *device,
>  &session_id,
>  &activation_state,
>  NULL, /* voice_call_state */
> -&ip_type,
> +NULL, /* ip_type */
>  NULL, /* context_type */
>  &nw_error,
>  &inner_error)) {
> @@ -604,11 +603,15 @@ connect_set_ready (MbimDevice *device,
>  g_error_free (error);
>  error = mm_mobile_equipment_error_from_mbim_nw_error 
> (nw_error);
>  } else {
> -ctx->ip_type = ip_type;
> +/* Report the ip_type we originally requested, since the 
> ip_type
> + * from the response is only relevant if the requested used
> + * MBIM_CONTEXT_IP_TYPE_DEFAULT, which MM never does.  Some
> + * devices (K5160) report the wrong type in the response.
> + */
>  mm_dbg ("Session ID '%u': %s (IP type: %s)",
>  session_id,
>  mbim_activation_state_get_string (activation_state),
> -mbim_context_ip_type_get_string (ip_type));
> +mbim_context_ip_type_get_string (ctx->ip_type));
>  }
>  } else {
>  /* Prefer the error from the result to the parsing error */
> --
> 2.5.5
> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel



-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: MC7455 not working

2016-06-17 Thread Aleksander Morgado
On Fri, Jun 17, 2016 at 5:56 PM, Thomas Lang  wrote:
> ModemManager[835]:   QMI IPv4 Settings:
> ModemManager[835]:   Address: 100.76.202.73/30
> ModemManager[835]:   Gateway: 100.76.202.74
> ModemManager[835]:   DNS #1: 139.7.30.126
> ModemManager[835]:   DNS #2: 139.7.30.125
> ModemManager[835]:  MTU: 1500
> ModemManager[835]: [/dev/cdc-wdm1] Allocating new client ID...
> ModemManager[835]: [/dev/cdc-wdm1] Registered 'wds' (version 1.67) client 
> with ID '36'
> ModemManager[835]:   error: couldn't start network: QMI protocol error 
> (14): 'CallFailed'
> ModemManager[835]:   call end reason (1): 'generic-unspecified'
> ModemManager[835]:   verbose call end reason (2,210): [internal] 
> pdn-ipv6-call-disallowed
> ModemManager[835]:   Modem /org/freedesktop/ModemManager1/Modem/0: 
> state changed (connecting -> connected)

Are you requesting both IPv4 and IPv6 explictly in the NM config?
Looks like IPv6 is failing here.


-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH] bearer-mbim: use the context IP type MM asked to be activated instead of modem response

2016-06-17 Thread Dan Williams
MM never passes MBIM_CONTEXT_IP_TYPE_DEFAULT which would require paying
attention to the ip_type in the reply to figure out what type the modem
activated.  Instead, MM always specifies the ip_type it wants to activate,
and some modems (K5160) return a different type in the response.  The modem
is required to activate the type MM asks for or return an error, so if
the activation was successful we can safely assume the modem activated
the ip_type we want, and we can ignore the ip_type in the response.
---
 src/mm-bearer-mbim.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
index 8c69fb3..be58950 100644
--- a/src/mm-bearer-mbim.c
+++ b/src/mm-bearer-mbim.c
@@ -581,7 +581,6 @@ connect_set_ready (MbimDevice *device,
 MbimMessage *response;
 guint32 session_id;
 MbimActivationState activation_state;
-MbimContextIpType ip_type;
 guint32 nw_error;
 
 response = mbim_device_command_finish (device, res, &error);
@@ -595,7 +594,7 @@ connect_set_ready (MbimDevice *device,
 &session_id,
 &activation_state,
 NULL, /* voice_call_state */
-&ip_type,
+NULL, /* ip_type */
 NULL, /* context_type */
 &nw_error,
 &inner_error)) {
@@ -604,11 +603,15 @@ connect_set_ready (MbimDevice *device,
 g_error_free (error);
 error = mm_mobile_equipment_error_from_mbim_nw_error 
(nw_error);
 } else {
-ctx->ip_type = ip_type;
+/* Report the ip_type we originally requested, since the 
ip_type
+ * from the response is only relevant if the requested used
+ * MBIM_CONTEXT_IP_TYPE_DEFAULT, which MM never does.  Some
+ * devices (K5160) report the wrong type in the response.
+ */
 mm_dbg ("Session ID '%u': %s (IP type: %s)",
 session_id,
 mbim_activation_state_get_string (activation_state),
-mbim_context_ip_type_get_string (ip_type));
+mbim_context_ip_type_get_string (ctx->ip_type));
 }
 } else {
 /* Prefer the error from the result to the parsing error */
-- 
2.5.5
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


Re: Huawei/Vodafone K5160 in MBIM-mode, problems with dualstack

2016-06-17 Thread Dan Williams
On Thu, 2016-06-16 at 19:14 +0200, Thomas Schäfer wrote:
> Am 15.06.2016 um 21:41 schrieb Dan Williams:
> rther investigation, can you change this line in
> > 
> > connect_set_ready():
> > 
> > ctx->ip_type = ip_type;
> > 
> > to:
> > 
> > ctx->ip_type = MBIM_CONTEXT_IP_TYPE_IPV4V6;
> > 
> 
> With this setting the modem works in dualstack.

Thanks.  Looking at the MBIM spec, it says the modem needs to activate
the context type (10.5.12.1 MBIM_CID_CONNECT DESCRIPTION):

"On a Set request, the Host may specify an IP type to activate. If
MBIMContextIPTypeDefault is specified, the host does not care what IP
type is activated. If a value other than MBIMContextIPTypeDefault is
specified, the device must only activate that context.  When activated,
the device must return the appropriate IPType in response to a query
request."

I think the mistake MM is making is that it should only be reading
ip_type back in the response if MM passed MBIMContextIPTypeDefault
originally.  If MM passed an explicit context type (which it always
does) then the modem would error out if that type could not be
activated.

In this case, the modem's firmware is just being stupid...

Dan
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Without restart:

go@ubuntu:~$ mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -
  Status |   connected: 'no'
 |   suspended: 'no'
 |   interface: 'unknown'
 |  IP timeout: '20'
  -
  Properties | apn: 'web.vodafone.de'
 | roaming: 'allowed'
 | IP type: 'ipv4v6'
 |user: 'none'
 |password: 'none'
 |  number: '*99#'
 | Rm protocol: 'unknown'
  -
  IPv4 configuration |   method: 'unknown'
  -
  IPv6 configuration |   method: 'unknown'
  -
  Stats  |  Duration: '0'
 |Bytes received: 'N/A'
 | Bytes transmitted: 'N/A'
go@ubuntu:~$ sudo service network-manager status
● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Fri 2016-06-17 14:48:32 CEST; 4min 28s ago
 Main PID: 450 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
   └─450 /usr/sbin/NetworkManager --no-daemon

Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3502] dhcp4 
(wwp0s19u1u3i8): dhclient started with pid 735
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3506] 
(cdc-wdm0): IPv6 configuration disabled
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3853] dhcp4 
(wwp0s19u1u3i8): client pid 735 exited with status 1
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3854] dhcp4 
(wwp0s19u1u3i8): state changed unknown -> done
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3859] dhcp4 
(wwp0s19u1u3i8): canceled DHCP transaction
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3873] device 
(cdc-wdm0): state change: ip-config -> failed (reason 'ip-config-unavailable') 
[70 120 5]
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3904] device 
(cdc-wdm0): Activation: failed for connection 'Vodafone Default'
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3930] device 
(cdc-wdm0): state change: failed -> disconnected (reason 'none') [120 30 0]
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.4011] 
(cdc-wdm0): modem state changed, 'connected' --> 'disconnecting' (reason: 
user-requested)
Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.4543] 
(cdc-wdm0): modem state changed, 'disconnecting' --> 'registered' (reason: 
user-requested)

After restart:

NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Fri 2016-06-17 14:55:20 CEST; 1min 51s ago
 Main PID: 857 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
   ├─857 /usr/sbin/NetworkManager --no-daemon
   └─888 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts 
--bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid 
--listen-address=127.0.1.1 --cache-size=0 --p

Jun 17 14:55:46 ubuntu dnsmasq[888]: started, version 2.75 cache disabled
Jun 17 14:55:46 ubuntu dnsmasq[888]: compile time options: IPv6 GNU-getopt DBus 
i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect inotify
Jun 17 14:55:46 ubuntu dnsmasq[888]: DBus support enabled: connected to system 
bus
Jun 17 14:55:46 ubuntu dnsmasq[888]: warning: no upstream servers configured
Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9397] device 
(cdc-wdm0): Activation: successful, device activated.
Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9526] 
dnsmasq[0x197db40]: dnsmasq appeared as :1.32
Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9534] dns-mgr: 
Writing DNS information to /sbin/resolvconf
Jun 17 14:55:46 ubuntu dnsmasq[888]: setting upstream servers from DBus
Jun 17 14:55:46 ubuntu dnsmasq[888]: using nameserver 139.7.30.126#53
Jun 17 14:55:46 ubuntu dnsmasq[888]: using nameserver 139.7.30.125#53

go@ubuntu:~$ mmcli -b 0
Bearer '/org/freedesktop/ModemManager1/Bearer/0'
  -
  Status |   connected: 'yes'
 |   suspended: 'no'
 |   interface: 'wwp0s19u1u3i8'
 |  IP timeout: '20'
  -
  Properties | apn: 'web.vodafone.de'
 | roaming: 'allowed'
 | IP type: 'ipv4v6'
 |user: 'none'
 |password: 'none'
 |  number: '*99#'
 | Rm protocol: 'unknown'
  -
  IPv4 configuration |   method: 'static'
 |  address: '100.78.46.127'
 |   prefix: '24'

AW: MC7455 not working

2016-06-17 Thread Thomas Lang
Dear Aleksander,
perhaps an interesting observation. I could connect through the 
Network-manager. I restarted the Modem-Manager and the Network-Manager service. 
After this I could connect with the nm-applet gui. Also I could connect with 
the nmcli d c cdc-wdm0, but only after I restarted both mm and nm.
Kind regards,
Thomas

● NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor p
   Active: active (running) since Fri 2016-06-17 12:42:06 CEST; 5min ago
Main PID: 1209 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
   ├─1209 /usr/sbin/NetworkManager --no-daemon
   └─1242 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts

Jun 17 12:42:33 ubuntu dnsmasq[1242]: started, version 2.75 cache disabled
Jun 17 12:42:33 ubuntu dnsmasq[1242]: compile time options: IPv6 GNU-getopt DBus
Jun 17 12:42:33 ubuntu dnsmasq[1242]: DBus support enabled: connected to system
Jun 17 12:42:33 ubuntu dnsmasq[1242]: warning: no upstream servers configured
Jun 17 12:42:33 ubuntu NetworkManager[1209]:   [1466160153.7774] device (c
Jun 17 12:42:33 ubuntu NetworkManager[1209]:   [1466160153.7885] dnsmasq[0
Jun 17 12:42:33 ubuntu NetworkManager[1209]:   [1466160153.7893] dns-mgr:
Jun 17 12:42:33 ubuntu dnsmasq[1242]: setting upstream servers from DBus
Jun 17 12:42:33 ubuntu dnsmasq[1242]: using nameserver 139.7.30.126#53
Jun 17 12:42:33 ubuntu dnsmasq[1242]: using nameserver 139.7.30.125#53


Von: Thomas Lang
Gesendet: Freitag, 17. Juni 2016 14:17
An: 'modemmanager-devel@lists.freedesktop.org' 

Cc: Aleksander Morgado 
Betreff: AW: MC7455 not working

Dear Aleksander,
I have been following the discussion on the mail-list. I’m trying to get 
network-manager working with a MC7455. I upgraded the kernel to 4.6.2. I 
updated the libqmi (1.14.2), MomdemManager (1.5.992) and NetworkManager (1.2.0) 
to the latest versions. The modemmanager can use the qmi interface. I can 
connect with the mmcli to the network. I can receive an ip address with udhcpc 
-I command. The problem I still have I can’t get the Network-Manager to start 
the connection. I have read the mail below that states the NetworkManager will 
config the connection for you. It seems that the dhcp set-up from the 
NetworkManager fails, see trace below. Now my question what can I do to get the 
network-manager to set-up the connection.
I’m looking forward for an answer.
Kind regards,
Thomas

● NetworkManager.service - Network Manager
  Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor 
preset: enabled)
   Active: active (running) since Fri 2016-06-17 11:19:39 CEST; 57min ago
Main PID: 1300 (NetworkManager)
   CGroup: /system.slice/NetworkManager.service
   ├─1062 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts 
--bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid 
--listen-address=127.0.1.1 --cache-size=0 --proxy-dnssec
   └─1300 /usr/sbin/NetworkManager --no-daemon

Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.3799] 
(cdc-wdm0): IPv6 configuration disabled
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4154] dhcp4 
(wwp0s19u1u3i10): client pid 1691 exited with status 1
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4154] dhcp4 
(wwp0s19u1u3i10): state changed unknown -> done
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4159] dhcp4 
(wwp0s19u1u3i10): canceled DHCP transaction
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4171] device 
(cdc-wdm0): state change: ip-config -> failed (reason 'ip-config-unavailable') 
[70 120 5]
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4205] policy: 
disabling autoconnect for connection 'Vodafone Default'.
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4218] device 
(cdc-wdm0): Activation: failed for connection 'Vodafone Default'
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4243] device 
(cdc-wdm0): state change: failed -> disconnected (reason 'none') [120 30 0]
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4337] 
(cdc-wdm0): modem state changed, 'connected' --> 'disconnecting' (reason: 
user-requested)
Jun 17 12:16:40 ubuntu NetworkManager[1300]:   [1466158600.4405] 
(cdc-wdm0): modem state changed, 'disconnecting' --> 'registered' (reason: 
user-requested)


MC7455 not working
Aleksander Morgado aleksander at aleksander.es 

Wed Mar 23 10:47:57 UTC 2016

  *   Previous message: MC7455 not working 

  *   Next message: MC7455 not working 

  *   Messages sorted by: [ date 
]

Re: MC7455 not working

2016-06-17 Thread Aleksander Morgado
On Fri, Jun 17, 2016 at 2:59 PM, Thomas Lang  wrote:
> Without restart:
>
> go@ubuntu:~$ mmcli -b 0
> Bearer '/org/freedesktop/ModemManager1/Bearer/0'
>   -
>   Status |   connected: 'no'
>  |   suspended: 'no'
>  |   interface: 'unknown'
>  |  IP timeout: '20'
>   -
>   Properties | apn: 'web.vodafone.de'
>  | roaming: 'allowed'
>  | IP type: 'ipv4v6'
>  |user: 'none'
>  |password: 'none'
>  |  number: '*99#'
>  | Rm protocol: 'unknown'
>   -
>   IPv4 configuration |   method: 'unknown'
>   -
>   IPv6 configuration |   method: 'unknown'
>   -
>   Stats  |  Duration: '0'
>  |Bytes received: 'N/A'
>  | Bytes transmitted: 'N/A'

This info wasn't taken when MM said the bearer was connected; so not
useful. It should have said "method DHCP or method static" in IPv4
configuration.

> go@ubuntu:~$ sudo service network-manager status
> ● NetworkManager.service - Network Manager
>Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; 
> vendor preset: enabled)
>Active: active (running) since Fri 2016-06-17 14:48:32 CEST; 4min 28s ago
>  Main PID: 450 (NetworkManager)
>CGroup: /system.slice/NetworkManager.service
>└─450 /usr/sbin/NetworkManager --no-daemon
>
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3502] dhcp4 
> (wwp0s19u1u3i8): dhclient started with pid 735
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3506] 
> (cdc-wdm0): IPv6 configuration disabled
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3853] dhcp4 
> (wwp0s19u1u3i8): client pid 735 exited with status 1
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3854] dhcp4 
> (wwp0s19u1u3i8): state changed unknown -> done
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3859] dhcp4 
> (wwp0s19u1u3i8): canceled DHCP transaction
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3873] device 
> (cdc-wdm0): state change: ip-config -> failed (reason 
> 'ip-config-unavailable') [70 120 5]
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3904] device 
> (cdc-wdm0): Activation: failed for connection 'Vodafone Default'
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.3930] device 
> (cdc-wdm0): state change: failed -> disconnected (reason 'none') [120 30 0]
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.4011] 
> (cdc-wdm0): modem state changed, 'connected' --> 'disconnecting' (reason: 
> user-requested)
> Jun 17 14:50:11 ubuntu NetworkManager[450]:   [1466167811.4543] 
> (cdc-wdm0): modem state changed, 'disconnecting' --> 'registered' (reason: 
> user-requested)
>
> After restart:
>

What exactly are you restarting? The whole PC, NM, MM?


> NetworkManager.service - Network Manager
>Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; 
> vendor preset: enabled)
>Active: active (running) since Fri 2016-06-17 14:55:20 CEST; 1min 51s ago
>  Main PID: 857 (NetworkManager)
>CGroup: /system.slice/NetworkManager.service
>├─857 /usr/sbin/NetworkManager --no-daemon
>└─888 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground 
> --no-hosts --bind-interfaces --pid-file=/var/run/NetworkManager/dnsmasq.pid 
> --listen-address=127.0.1.1 --cache-size=0 --p
>
> Jun 17 14:55:46 ubuntu dnsmasq[888]: started, version 2.75 cache disabled
> Jun 17 14:55:46 ubuntu dnsmasq[888]: compile time options: IPv6 GNU-getopt 
> DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect 
> inotify
> Jun 17 14:55:46 ubuntu dnsmasq[888]: DBus support enabled: connected to 
> system bus
> Jun 17 14:55:46 ubuntu dnsmasq[888]: warning: no upstream servers configured
> Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9397] device 
> (cdc-wdm0): Activation: successful, device activated.
> Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9526] 
> dnsmasq[0x197db40]: dnsmasq appeared as :1.32
> Jun 17 14:55:46 ubuntu NetworkManager[857]:   [1466168146.9534] 
> dns-mgr: Writing DNS information to /sbin/resolvconf
> Jun 17 14:55:46 ubuntu dnsmasq[888]: setting upstream servers from DBus
> Jun 17 14:55:46 ubuntu dnsmasq[888]: using nameserver 139.7.30.126#53
> Jun 17 14:55:46 ubuntu dnsmasq[888]: using nameserver 139.7.30.125#53
>
> go@ubuntu:~$ mmcli -b 0
> Bearer '/org/freedesktop/ModemManager1/Bearer/0'
>   -
>   Status |   connected: 'yes'
>  |   suspended: 'no'
>  |   interface: 'wwp0s19u1u3i8'
>  |  IP timeout: '20'
>   -
>   Properties |  

Re: MC7455 not working

2016-06-17 Thread Aleksander Morgado
On Fri, Jun 17, 2016 at 2:16 PM, Thomas Lang  wrote:
> I have been following the discussion on the mail-list. I’m trying to get
> network-manager working with a MC7455. I upgraded the kernel to 4.6.2. I
> updated the libqmi (1.14.2), MomdemManager (1.5.992) and NetworkManager
> (1.2.0) to the latest versions. The modemmanager can use the qmi interface.
> I can connect with the mmcli to the network. I can receive an ip address
> with udhcpc -I command. The problem I still have I can’t get the
> Network-Manager to start the connection. I have read the mail below that
> states the NetworkManager will config the connection for you. It seems that
> the dhcp set-up from the NetworkManager fails, see trace below. Now my
> question what can I do to get the network-manager to set-up the connection.

That is strange; for the MC7455, when using raw-ip, we are defaulting
to static IP setup, not DHCP, so NM shouldn't even try DHCP. Can you
get us the output of the bearer info generated during the connection
request? (something like "mmcli -b 0", or some other index).

Anyway, it would also be good to get MM/NM debug logs, see:
https://www.freedesktop.org/wiki/Software/ModemManager/Debugging/

-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel