Hey, > > Background: > ========= > I'm trying to integrate Huawei 3131 modem, VID=21d1. Original PID=14fe that > switches to PID=1506. > > I'm working on am335x based embedded board running yocto/linux-ti-staging > based Linux with 4.1 kernel. NM version is 0.9.8.10 and MM version 1.4.2. > Board is using systemd. > > Base problem is that most likely modem firmware is broken so that it claims > supporting ndisdup, but in fact it does not. This revealed when I first > tried using connman/ofono. Connection went up to stage where connection was > opened wtih AT^NDISDUP=1,1. Following AT^DHCP? returned only OK without > any connection details. >
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. > net/ppp0 > ----------- > Ubuntu: > ModemManager[22598]: <debug> [1456479663.774029] [mm-manager.c:270] > device_added(): (net/ppp0): could not get port's parent device > Normal. > 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. > NM in Ubuntu starts reports reporting ppp with following lines: > NetworkManager[22606]: <info> pppd started with pid 23181 > Plugin /usr/lib/x86_64-linux-gnu/pppd/2.4.5/nm-pppd-plugin.so loaded. > ** Message: nm-ppp-plugin: (plugin_init): initializing > ** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial > connection' > Using interface ppp0 > Connect: ppp0 <--> /dev/ttyUSB0 > > all PPP messages from am335x > plugins/huawei/mm-plugin-huawei.c:543] grab_port(): (tty/ttyUSB0) Port > flagged as PPP > Yes, as said, that is because Ubuntu is using the legacy PPP method in the Huawei modem. The interface is created on the fly by pppd when NM starts it. Note that MM does nothing of this. > src/mm-port-serial-at.c:440] debug_log(): (ttyUSB2): <-- '<CR><LF>+CGDCONT: > (1-11),"IP",,,(0-2),(0-3)<CR><LF>+CGDCONT: (1-11),"IPV6",,,(0-2), > (0-3)<CR><LF>+CGDCONT: (1-11),"IPV4V6",,,(0-2),(0-3)<CR><LF>+CGDCONT: > (1-11),"PPP",,,(0-2),(0-3)<CR><LF><CR><LF>OK<CR><LF>' > This is totally unrelated, you can ignore it. > src/mm-modem-helpers.c:783] mm_3gpp_parse_cgdcont_test_response(): Unhandled > PDP type in CGDCONT=? reply: 'PPP' > No issue, normal. > QUESTIONS: > ========= > 1) What is missing in my set-up? I think you're missing > 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. Cheers! -- Aleksander https://aleksander.es _______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
