On Sat, 2016-09-03 at 15:56 -0400, A. F. Cano wrote: > Hello, > > I can start the ppp connection manually by typing "pon cell", but no > matter > what I try network manager seems not able to do that automatically > when the > cdma cell phone is plugged in: > > The kernel-level stuff: > > Sep 2 21:02:41 fbx kernel: [460081.326683] usb 4-1: new full-speed > USB device number 13 using ohci-pci > Sep 2 21:02:42 fbx kernel: [460081.492913] usb 4-1: New USB device > found, idVendor=22b8, idProduct=2a62 > Sep 2 21:02:42 fbx kernel: [460081.492930] usb 4-1: New USB device > strings: Mfr=1, Product=2, SerialNumber=0 > Sep 2 21:02:42 fbx kernel: [460081.492939] usb 4-1: Product: > Motorola E815 > Sep 2 21:02:42 fbx kernel: [460081.492947] usb 4-1: Manufacturer: > Motorola, Inc. > Sep 2 21:02:42 fbx kernel: [460081.497088] cdc_acm 4-1:1.0: ttyACM0: > USB ACM device > > Now NetworkManager kicks in: > > Sep 2 21:02:58 fbx NetworkManager[1317]: <info> [1472864578.5172] > manager: (ttyACM0): new Broadband device > (/org/freedesktop/NetworkManager/Devices/26) > Sep 2 21:02:58 fbx NetworkManager[1317]: <info> [1472864578.5180] > device (ttyACM0): state change: unmanaged -> unavailable (reason > 'managed') [10 20 2] > > I think this is the problem. NetworkManager thinks the ppp > connection is > managed, but there is nothing in /etc/network/interfaces or > /etc/network/interfaces.d/setup but lo.
Why do you say "it's a problem". NM says it will manage this devices. Sounds like what you want. NetworkManager has it's own connection storage, as you can see and edit via `nmcli connection` and its subcommands. You don't need it in /etc/network/interface, in fact, if you configure the device the Debian way, NetworkManager will keep the device unmanaged (that means, not manage the device). Actually, whether devices from /etc/network/interfaces are unmanaged that depends on your configuration in NetworkManager.conf. > Sep 2 21:02:58 fbx NetworkManager[1317]: <info> [1472864578.5189] > device (ttyACM0): modem state 'enabling' > > This is puzzling. If NetworkManager has determined that the device > is > managed and therefore unavailable, why is it 'enabling' it? The device transitions trough states. It goes "unmanaged" -> "unavailable" -> "disconnected". That is correct. > Sep 2 21:02:58 fbx NetworkManager[1317]: <warn> [1472864578.5193] > (ttyACM0): failed to retrieve SIM object: No SIM object available > > This is no surprise. It's a cdma phone, but then it's only a > warning. > > Sep 2 21:02:58 fbx NetworkManager[1317]: <info> [1472864578.5204] > device (ttyACM0): state change: unavailable -> disconnected (reason > 'none') [20 30 0] > > Mmm... First, NetworkManager claims it's unavailable and now it's > disconnected for no reason (?) > > Then I do "pon cell" Why would you do "pon", when you want NetworkManager to setup ppp? Create a "connection" in NetworkManager. For example using nmcli or maybe better nm-connection-editor. Then activate that connection. > Sep 2 21:05:34 fbx pppd[15908]: pppd 2.4.7 started by ac-adm, uid 0 > Sep 2 21:05:35 fbx chat[15910]: abort on (BUSY) > Sep 2 21:05:35 fbx chat[15910]: abort on (NO CARRIER) > Sep 2 21:05:35 fbx chat[15910]: abort on (VOICE) > Sep 2 21:05:35 fbx chat[15910]: abort on (NO DIALTONE) > Sep 2 21:05:35 fbx chat[15910]: abort on (NO DIAL TONE) > Sep 2 21:05:35 fbx chat[15910]: abort on (NO ANSWER) > Sep 2 21:05:35 fbx chat[15910]: abort on (DELAYED) > Sep 2 21:05:35 fbx chat[15910]: send (ATZ^M) > Sep 2 21:05:35 fbx chat[15910]: expect (OK) > Sep 2 21:05:58 fbx chat[15910]: ^MAT+CAD?^M^M > Sep 2 21:05:58 fbx chat[15910]: AT+CSS?^M^M > Sep 2 21:05:59 fbx chat[15910]: AT+CSQ^M^M > Sep 2 21:06:20 fbx chat[15910]: alarm > Sep 2 21:06:20 fbx chat[15910]: send (AT^M) > Sep 2 21:06:20 fbx chat[15910]: expect (OK) > Sep 2 21:06:20 fbx chat[15910]: ^M^M > Sep 2 21:06:28 fbx chat[15910]: AT+CAD?^M^M > Sep 2 21:06:28 fbx chat[15910]: AT+CSS?^M^M > Sep 2 21:06:29 fbx chat[15910]: AT+CSQ^M^M > Sep 2 21:06:58 fbx chat[15910]: AT+CAD?^MAT+CSS?^M^M > Sep 2 21:06:59 fbx chat[15910]: AT+CSQ^M^M > Sep 2 21:07:05 fbx chat[15910]: alarm > Sep 2 21:07:05 fbx chat[15910]: Failed > Sep 2 21:07:06 fbx pppd[15908]: Exit. > > This happens reliably the first time after connecting the phone by > usb . > When I do "pon cell" a second (and subsequent) time(s): > > Sep 2 21:07:10 fbx pppd[15930]: pppd 2.4.7 started by ac-adm, uid 0 > Sep 2 21:07:11 fbx chat[15932]: abort on (BUSY) > Sep 2 21:07:11 fbx chat[15932]: abort on (NO CARRIER) > Sep 2 21:07:11 fbx chat[15932]: abort on (VOICE) > Sep 2 21:07:11 fbx chat[15932]: abort on (NO DIALTONE) > Sep 2 21:07:11 fbx chat[15932]: abort on (NO DIAL TONE) > Sep 2 21:07:11 fbx chat[15932]: abort on (NO ANSWER) > Sep 2 21:07:11 fbx chat[15932]: abort on (DELAYED) > Sep 2 21:07:11 fbx chat[15932]: send (ATZ^M) > Sep 2 21:07:11 fbx chat[15932]: expect (OK) > Sep 2 21:07:11 fbx chat[15932]: ATZ^M^M > Sep 2 21:07:11 fbx chat[15932]: OK > Sep 2 21:07:11 fbx chat[15932]: -- got it > Sep 2 21:07:11 fbx chat[15932]: send (ATDT#777^M) > Sep 2 21:07:11 fbx chat[15932]: timeout set to 60 seconds > Sep 2 21:07:11 fbx chat[15932]: expect (CONNECT) > Sep 2 21:07:11 fbx chat[15932]: ^M > Sep 2 21:07:19 fbx chat[15932]: ATDT#777^M^M > Sep 2 21:07:19 fbx chat[15932]: CONNECT > Sep 2 21:07:19 fbx chat[15932]: -- got it > Sep 2 21:07:19 fbx chat[15932]: send (\d) > Sep 2 21:07:20 fbx pppd[15930]: Serial connection established. > Sep 2 21:07:20 fbx pppd[15930]: Using interface ppp0 > Sep 2 21:07:21 fbx pppd[15930]: Connect: ppp0 <--> /dev/ttyACM0 > Now NetworkManager knows of the connection: Yes. NetworkManager sees that a device "ppp0" appeared and has IP configuration. > Sep 2 21:07:21 fbx NetworkManager[1317]: <info> [1472864841.0035] > manager: (ppp0): new Generic device > (/org/freedesktop/NetworkManager/Devices/27) > Sep 2 21:07:21 fbx NetworkManager[1317]: <info> [1472864841.0327] > devices added (path: /sys/devices/virtual/net/ppp0, iface: ppp0) > Sep 2 21:07:21 fbx NetworkManager[1317]: <info> [1472864841.0328] > device added (path: /sys/devices/virtual/net/ppp0, iface: ppp0): no > ifupdown configuration found. > Sep 2 21:07:22 fbx pppd[15930]: local IP address 75.213.199.205 > Sep 2 21:07:22 fbx pppd[15930]: remote IP address 66.174.121.64 > Sep 2 21:07:22 fbx pppd[15930]: primary DNS address > 198.224.186.135 > Sep 2 21:07:22 fbx pppd[15930]: secondary DNS address > 198.224.187.135 > > From this point on the connection is up and working fine. But no thanks to NetworkManager :) > I have looked around and found this page: > > https://askubuntu.com/questions/486655/how-can-i-set-up-a-broadband- > connection The question is not about NetworkManager, but how to connect to broadband in general... actually it talks about "BSNL". I don't know what that is, the answer seems to assume it requires pppoe over Wi-Fi (which NM indeed does not support). You didn't say that you want to do pppoe over Wi-Fi, so I think it is not related to your question. > About half way down the page there is a script that's supposed to go > in > /etc/NetworkManager/dispatcher.d/10-ppp.sh but it is apparently never > executed, most likely because of the > > state change: unmanaged -> unavailable (reason 'managed') > > message in the second <info> message from NetworkManager above. > Incidentally, after further research I found that parameters passed > to the > dispatcher.d scripts are different from that described in the above > page, > so the final script was suitably modified: > > #! /bin/bash > > IFACE="$1" > ACTION="$2" > > if [[ $CONNECTION_UUID == 'f2cc6f30-1726-42c2-b580-3ac8a98a21ec' ]] > then > case $(ACTION) in > up) > while pgrep ppp >/dev/null > do > poff -a > done > pon cell > ;; > down) > while pgrep ppp >/dev/null > do > poff -a > done > ;; > *) > ;; > esac > fi > > Of course the CONNECTION_UUID is the proper one as reported by "nmcli > c". The dispatcher is documented in `man NetworkManager`. But it's unclear, why you want a dispatcher script. I suspect, you don't want. > So, what am I missing? why is NetworkManager claiming that ppp is > managed? > how can I make NetworkManager execute the 10-ppp.sh script? Is there > a better > way to do this? Is the script necessary at all? > Should NetworkManager start > the ppp connection even without it? (but then there should be a way > to tell it > to use the /etc/ppp/peers/cell file) Create a connection in NetworkManager. Use nm-connection-editor. Alternatively, use nmcli and see the possible fields in `man nm- settings`. > Debian stretch/sid (per /etc/debian_version). > NetworkManager 1.2.4-2 > ppp 2.4.7-1+2 > > Any help/hints gratefully accepted. I've never dealt with > NetworkManager > before and I've been banging my head against this issue for a while. Good luck Thomas
signature.asc
Description: This is a digitally signed message part
_______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list