On Sat, Sep 03, 2016 at 11:14:28PM +0200, Thomas Haller wrote:

Thank you for taking the time to reply.  Specific points embedded
below.

> ...
> > 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.

I understood that NM will not touch a managed interface, ie: one that
is handled by /etc/network/interfaces but, like I said, there is nothing
in /etc/network to indicate that it is managed that way.  If what NM is
saying is that the unmanaged connection is now managed by NM and
therefore unavailable to other schemes, that is indeed the desired
outcome.

> 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.

What's in NetworkManager.conf is strictly the default configuration (I
have added nothing to it):

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

> > 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.

Ok.

> > 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?

Because if I don't, NetworkManager does nothing and the connection never
gets established.  Obviously I'm missing some configuration item to make
NM do what "pon cell" does, ie: establish the ppp connection.

> Create a "connection" in NetworkManager. For example using nmcli or

 $ nmcli c
 NAME                   UUID                                  TYPE DEVICE 
 FreedomBox LAN enp3s0  a8e95667-240c-48bb-98be-0ee4a97c1fc2 802-3-ethernet  
enp3s0 
 FreedomBox WAN         51461052-3d5d-4261-8b49-727dd11b6c6b 802-3-ethernet  
enp1s0 
 FreedomBox LAN enp2s0  a7aaf4a1-a558-4cac-9f9e-a7a078492efb 802-3-ethernet  -- 
    
 ppp                    f2cc6f30-1726-42c2-b580-3ac8a98a21ec  cdma --     

This was done (earlier) with:

$ sudo nmcli con add con-name "ppp" ifname "ppp0" type cdma
$ sudo nmcli con modify "ppp" connection.zone external

> maybe better nm-connection-editor. Then activate that connection.

This utility is not available.  The system is headless with only
ssh access.

$ sudo nmcli con up ppp ifname ppp0
Error: device 'ppp0' not compatible with connection 'ppp'.

But since sutoconnect is set to true, shouldn't it connect
automaticallY?

$ nmcli con show ppp | grep autoconnect
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-slaves:          -1 (default)

It probably would if it thought the devices were compatible.

> > [detaila of how ppp gets started with "pon cell"]
> 
> > Now NetworkManager knows of the connection:
> 
> Yes. NetworkManager sees that a device "ppp0" appeared and has IP
> configuration.
> 
> 
> > ...
> > From this point on the connection is up and working fine.
> 
> But no thanks to NetworkManager :)

Correct.  The whole point of my attempts is to get NM to do what
"pon cell" does.  Since "pon cell" works it proves that the problem
is only a matter of NM configuration, not any lower level errors.

> > 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).

Right, the only useful bit was the dispatcher.d function half way down
the page.

> You didn't say that you want to do pppoe over Wi-Fi, so I think it is
> not related to your question.

Correct.  I thought I could use a dispatcher function, like the one for
ppp in that page to run "pon cell" when that function gets triggered by
NM, but it never gets called.

> 
> > ... [ the dispatcher script ]
> 
> The dispatcher is documented in `man NetworkManager`. But it's unclear,
> why you want a dispatcher script. I suspect, you don't want.

Well, if I could get NM to establish the ppp connection it would
obviously be preferable to using a dispatcher script.  I just didn't
see a way to do that without one, and the dispatcher script didn't
work either.

> 
> >...
> > 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`.

Thanks for that pointer.  Looked up nm-settings and added the options
that seemed necessary or didn't have default values in my original
/etc/ppp/peers/cell file.  Still, I get:

$ sudo nmcli con up ppp
Error: Connection activation failed: No suitable device found for this
connection.

$ sudo nmcli con up ppp ifname ttyACM0
Error: device 'ttyACM0' not compatible with connection 'ppp'.

$ sudo nmcli con up ppp ifname ppp0
Error: device 'ppp0' not compatible with connection 'ppp'.

$ nmcli dev
DEVICE   TYPE      STATE         CONNECTION            
enp1s0   ethernet  connected     FreedomBox WAN        
enp3s0   ethernet  connected     FreedomBox LAN enp3s0 
ttyACM0  cdma      disconnected  --                    
enp2s0   ethernet  unavailable   --                    
lo       loopback  unmanaged     --                

$ nmcli con
NAME                   UUID                                  TYPE DEVICE 
FreedomBox LAN enp3s0  a8e95667-240c-48bb-98be-0ee4a97c1fc2 802-3-ethernet  
enp3s0 
FreedomBox WAN         51461052-3d5d-4261-8b49-727dd11b6c6b 802-3-ethernet  
enp1s0 
FreedomBox LAN enp2s0  a7aaf4a1-a558-4cac-9f9e-a7a078492efb 802-3-ethernet  --  
   
ppp                    f2cc6f30-1726-42c2-b580-3ac8a98a21ec  cdma --     

Maybe cdma is the wrong type for that connection?

> > Debian stretch/sid (per /etc/debian_version).
> > NetworkManager 1.2.4-2
> > ppp 2.4.7-1+2
> > 
> >...
> 
> Good luck
> Thomas

Thanks for replying.  I'm a little further along in my knowledge of NM.
Unfortunately I haven't hit the magic configuration item that would make
it work.  Any more ideas? anyone?

Thanks.

Augustine

_______________________________________________
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to