Aleksander, thank your very much for your fine answers. Please find my replies/comments below.
2016-03-04 1:28 GMT+02:00 Aleksander Morgado <aleksan...@aleksander.es>: > > Did connman/ofono run a DHCP client on the interface? > No, I tried to run it manually with following procedure: ifconfig wwan0 up dhclient wwan0 DHCP tried for some time but did not give id addresses. In fact, I also tried this procedure with MM with same results (without using udev to give ID_MM_IGNORE_PORT properties to cdc-wdm0 and wwan0). > > 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 :) > Well, my priority is to get connection work somehow without fiddling. Majority of traffic is very low speed m2m traffic, so protocol really is no issue. > > > 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. > OK, I thought this could be the problem, but really I did not figure out the syntax. Now I got it so it should be nmcli c up uuid <UUID> or nmcli c up id <ID> both <UUID> and <ID> coming from the configuration file. It was also a bit confusing that nmcli c command from Ubuntu lists all the configurations below /etc/NetworkManager/system-connections while same command from am335x board do not provide this listing. It seems that am335x needs nmcli c list command. But problem now is that NM does not see this modem. If I execute: nmcli d modem is not listed there. Also if I execute: nmcli c up id <ID> I will get following respons: Error: No suitable device found: no device found for connection '<ID>'. > > 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. > OK, but now there is this problem that "gsm" device is not shown to NM. > > > 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). > OK, Here is one problem. NM and MM do not communicate with each other in my installation or at least with this modem. In fact I do have other Huawei 3131 that communicates in HiLink mode fro reference. That opens eth1 interface automatically without any manual operations. nmcli c command lists that like ordinary 802-3-ethernet connection. Does MM and NM communicate in that case? > > 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. > No I have not. I prefer not to mess with my desktop unless I become quite desperate (I'm pretty close to that, though). > > 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. > I'm not quite sure what you mean with "creating gsm connection". I thought that /etc/NetworkManager/system-connections/Operator above stands for "gsm" connection. I had rally slight misunderstanding related to "nmcli c" parameters. > > > > 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. > So problem is that NM does not see active modem that I could start "gsm" connection from NM. > > > > 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... :) > Good point, ppp is not enabled! Option seems to be --enable-ppp. I'll try it. This NDISDUP seemp pretty problematic. In fact I found MM patch whose introduction comment describes pretty much how this modem works ( https://cgit.freedesktop.org/ModemManager/ModemManager/log/?h=dcbw/huawei-at-dhcp). I'll check if that helps/works with this MM version - then I suppose, I should contact MM mailing list... > > > 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. > No problem at all, this was just told in the MM recipe commenting systemd confuguration variable that was set to inhibit starting service at boot (below). # no need to start on boot - dbus will start on demand SYSTEMD_AUTO_ENABLE = "disable" It is no problem at all for me to enable it in my bbappend recipe. In fact I made that recipe overlay in order to fix annoying feature NM has compared to Connman. With NM DHCP provides new IP address every time I build a new image for my card. Somehow Connman manages negotiating steady IP addresses. I have not seen them changing ever. In fact I have had images with Connman and MM. Always when I burn Connman image I get the original IP address back and wise verse, I always get new IP address when I burn image with MM. I studied this and I did not find other difference than the fact that Connman sent MAC based dhcp-client-identifier to dhcp server. My patch edited dhclient.conf on fly to set "send dhcp-client-identifier" if it has not already set before. Well, this worked somehow. When connection starts IP is what it used to be, but it changes pretty rapidly, then lasting pretty well. This however is another issue that I should contact NM mailing list. It is pretty annoying feature really as I have to work over ssh when I debug for instance this modem issue. Terminal gets halted in the middle of debugging when IP changes. > > 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. > > Yes I thought that also - well perhaps more MM problems than NM problems. Thanks again, Matti
_______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list