Did connman/ofono run a DHCP client on the interface?
> However my desktop machine - Ubuntu 14.04 opens connection quite smoothly.
> It has NM version 0.9.8.8 and MM version 1.0.0. Somehow it does not care
> about this ndisdup problem, but instead opens connection using ppp - no
> problem at all.
>
Despite the fact that is using PPP instead of the WWAN iface :)
> Main difference found from sysfs is that Ubuntu opens only /dev/ttyUSB0
> /dev/ttyUSB2 /dev/ttyUSB3 devices for this modem whereas am335x board opens
> /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/cdc-wdm0 and /net/wwan0
>
> if I execute following command after plugging in modem:
> nmcli d
> Ubuntu provides:
> ttyUSB3 gsm disconnected
>
> am335x board do not provide have this line
>
> If I execute following command on am335x board:
> mmcli -m 0 --simple-connect="apn=internet"
>
> Everything seems going well, solid blue led swithes on, but there is no
> interface brought up.
You're connecting the modem through MM; while you want to connect the
modem through NM (NM will talk to MM internally). MM will not bring up
any interface or configure IP details on the interface; that's NM
doing it for you when you activate a "gsm" connection type.
> If I start modem connection from nm app on Ubuntu, ppp connection starts and
> it is brought to interfaces. From logs it seems that it also is using
> simple-connect method.
>
NM calls the simple connect in MM; that's regardless of what
connection type MM will be using afterwards. NM always runs simple
connect; you shouldn't run it manually.
> If I use udev rules to ignore cdc-wdm0 and net/wwan0 on am335x board,
> simple-connect proceeds up tp "all done", but no ppp is started an in fact
> now even the led is not having solid blue. However, if I start pppd manually
> at this point, connection is established quite well.
Ideally you should use NDISDUP+WWAN; very very likely you can use them
an you're losing some other thing. If using NDISDUP+WWAN, you won't
see NM creating a ppp0 interface, you'll just see NM trying to run a
DHCP client on the WWAN interface once ModemManager has decided the
WWAN is read for that (once the NDISDUP command has finished).
Have you tried to use the modem with a newer ModemManager in the same
Ubuntu setup? MM 1.0.0 and MM 1.4.x are totally compatible API wise.
I'd really try it.
> I have tried to reproduce Ubuntu settings.
> 1) /etc/NetworkManager/NetworkManager.conf with following contents:
> [main]
> plugins=keyfile
> dns=dnsmasq
>
> 2) /etc/NetworkManager/system-connections/Operator with following contents:
> [connection]
> id=Operator
> uuid=b9cbaa78-8856-4c82-915b-702048ab3b85
> type=gsm
> permissions=user:root:;
> autoconnect=true
> timestamp=0
>
> [gsm]
> number=*99#
> apn=internet
>
> [ipv4]
> method=auto
>
> [serial]
> baud=115200
>
> Differences bitween Ubuntu and am335x board:
> 1) Note that Ubuntu uses upstart and am335x board systemd.
This shouldn't be any issue.
> 2) Ubuntu lists one line for each of files in
> /etc/NetworkManager/system-connections folder whereas am335x seems ignoring
> these settings.
>
I think you may be missing the step to create a "gsm" connection and
activate it through NM.
> am335x: no reference for net/ppp0
>
You don't see any reference to the ppp0 interface because it is only
created on-the-fly when needed; in your yocto build we try to use
NDISDUP and WWAN, no PPP involved.
> 2) net/ppp0. What is required to get am335x MM creating ppp0 interface like
> Ubuntu does?
It's NM the one creating the interface. Did you compile NM in yocto
with ppp support? (--with-ppp I think it is) What's the configure
report output? This would be when you want to force the legacy PPP
method, though. I still believe you should try NDISDUP on the
/dev/cdc-wdm0 and WWAN with DHCP... :)
> 3) It is told in the MM package that there is no need starting on boot -
> dbus will start on demand. What event does this as MM does not start at all
> if service is not enabled by default
>
NM requests to open MM, BUT I don't think it tries to dbus auto-start
it any more if you're using systemd. In Ubuntu NM requests the dbus
daemon to auto-start MM, in your yocto build you need to have the
systemd service enabled so that MM starts itself on boot.
Hope this gives you a bit more of context.. :)
Please not that we also have a ModemManager-specific mailing list here:
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
In your case, though, I think it's a mix of NM integration issues and MM issues.