Re: NetworkManager dispatchers
Hi Ali, On Mon, 2016-02-29 at 17:40 -0800, Ali Nematollahi wrote: > Thanks! I've looked at nmcli radio but there is no good documentation > I could find for the version I am using. All of the documentation is > for newer version and don't apply. > > First of all, when I do: > > nmcli nm wwan > WWAN > disabled > > Then I do: > nmcli nm wwan on > nmcli nm wwan > WWAN > disabled > > nmcli nm status > RUNNING STATE WIFI-HARDWARE WIFI WWAN- > HARDWARE WWAN > running connected enabled enabled enabled > disabled > > I was reading on google somewhere that I need a config file > in: /etc/NetworkManager/system-connections/ > so I put one in: > > cat /etc/NetworkManager/system-connections/radio > [connection] > id=MyWwanConnection > type=gsm > > [ipv4] > method=auto > > [gsm] > number=*99# > apn=mnet.bell.ca.ioe > > > restarted NM, did the same thing, no difference. That doesn't sound like a good advice from the internet. > Any documentation for 0.9.4.0 that I can use to figure this out? Can > someone help me with setting up the radio connections? I'm having no > luck. First, enable debug logging. For that, edit /etc/NetworkManager/NetworkManager.conf to have a section [logging] level=DEBUG then, restart NetworkManager, reproduce the issue and show the logfile. The logfile you will find somewhere in syslog, search in /var/log. good luck, Thomas > > Thanks > > > > On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams > wrote: > > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > > Thanks! > > > > > > How to I enable "service called NetworkManager-dispatcher or > > > nm-dispatcher"? When I search for "dispatcher" in my filesystem > > only > > > these > > > come up: > > > /etc/NetworkManager/dispatcher.d > > > /etc/dbus-1/system.d/nm-dispatcher.conf > > > /usr/share/dbus-1/system- > > > services/org.freedesktop.nm_dispatcher.service > > > /usr/lib/NetworkManager/nm-dispatcher.action > > > /usr/sbin/usb_modeswitch_dispatcher > > > > > > > > > Starting MM as a service makes perfect sense. > > > The question is however, how do I find out when to say "enable" > > the > > > modem, > > > or to do a simple-connect? I was planning on using the > > dispatchers > > > for all > > > of that, to automate all of those. So basically: > > > > NetworkManager will take care of that, if 'wwan' radios are > > enabled. > > See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, > > and > > as long as your machine has no airplane switch for WWAN (or if it > > does > > the switch enables the WWAN), NetworkManager will enable the modem > > when > > it is discovered by ModemManager and it will be available to > > connect > > with from NetworkManager. > > > > Recent versions of NetworkManager (1.0.8+) also have support for > > WWAN > > autoconnect, so I don't think you need a dispatcher script here at > > all. > > > > > - MM starts > > > - modem comes up, status -> Disabled > > > - dispatcher kicks in: status -> Enabled > > > - dispatcher kicks in: simple-connect > > > > Dispatcher scripts only trigger on connection up/down, so you don't > > get > > any events on modem status changes. But that shouldn't matter, > > since > > NetworkManager can take care of all of the WWAN connection stuff as > > long as ModemManager is up and running (like if its run as a system > > service). > > > > Dan > > > > > Thanks! > > > > > > > > > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller > om> > > > wrote: > > > > > > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > > > > Hi guys > > > > > > > > > > I'm trying to experiment with NM dispatchers but I can't seem > > to > > > > > get > > > > > anything done. I have a very basic script > > > > > in /etc/NetworkManager/dispatcher.d/02test: > > > > > > > > > > #!/bin/sh -e > > > > > > > > > > echo "Starting ModemManager" > > > > > ModemManager --debug & > > > > > > > > > > But it is not running. I have made sure the scripts and > > > > > directories > > > > > are executable (a+x). But I cannot seem to get the scripts to > > > > > run. > > > > > > > > > > Can someone help me with this please? > > > > > NetworkManager --version > > > > > 0.9.4.0 > > > > > > > > You probably also need to enable a service called > > NetworkManager- > > > > dispatcher or nm-dispatcher. > > > > > > > > > > > > > Question 2: I wanted to use the dispatcher script to start > > > > > ModemManager on startup and to enable the 3G modem I have. > > Can it > > > > > be > > > > > done? I have seen examples of how to start a connection when > > an > > > > > interface comes up but nothing that could help me with this. > > > > > > > > It looks very wrong to start ModemManager from a dispatcher > > script. > > > > Those scripts are invoked often and at various times, you don't > > > > want to > > > > start ModemManager every time something happens with a > > networking > > > > interface. > > > > > > > > Instead, start M
Re: NetworkManager dispatchers
Hi Dan Thanks very much for the follow-up. Here is the output: root@beaglebone:~# mmcli -m 0 | grep IP IP | supported: 'none' root@beaglebone:~# mmcli -m 0 /org/freedesktop/ModemManager1/Modem/0 (device id '2ea06a44171a29335a8b7f781e0f9559bc24976d') - Hardware | manufacturer: 'Cinterion' | model: 'PHS8-USA' | revision: 'REVISION 03.001' | supported: 'gsm-umts' |current: 'gsm-umts' | equipment id: '351502050184415' - System | device: '/sys/devices/ocp.2/4740.usb/47401c00.usb/musb-hdrc.1.auto/usb2/2-1' |drivers: 'option1' | plugin: 'Cinterion' | primary port: 'ttyUSB2' | ports: 'ttyUSB1 (gps), ttyUSB2 (at), ttyUSB3 (at)' - Numbers | own : '+12899368246' - Status | lock: 'none' | unlock retries: 'sim-pin (5), sim-pin2 (5), sim-puk (10), sim-puk2 (10), ph-net-pin (10), ph-net-puk (32), ph-fsim-pin (10), ph-fsim-puk (32)' | state: 'connected' |power state: 'on' |access tech: 'hsdpa, hsupa' | signal quality: '32' (recent) - Modes| supported: 'allowed: 2g; preferred: none | allowed: 3g; preferred: none | allowed: 2g, 3g; preferred: none' |current: 'allowed: any; preferred: none' - Bands| supported: 'unknown' |current: 'unknown' - IP | supported: 'none' - 3GPP | imei: '351502050184415' | enabled locks: 'none' |operator id: '302720' | operator name: 'ROGERS' | subscription: 'unknown' | registration: 'home' - SIM | path: '/org/freedesktop/ModemManager1/SIM/0' - Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/0' Strange because the bearer shows: root@beaglebone:~# mmcli -b 0 Bearer '/org/freedesktop/ModemManager1/Bearer/0' - Status | connected: 'yes' | suspended: 'no' | interface: 'ttyUSB3' | IP timeout: '20' - Properties | apn: 'm2minternet.apn' | roaming: 'allowed' | IP type: 'none' |user: 'none' |password: 'none' | number: 'none' | Rm protocol: 'unknown' - IPv4 configuration | method: 'ppp' | address: 'unknown' | prefix: '0' | gateway: 'unknown' | DNS: none - IPv6 configuration | method: 'unknown' On Thu, Mar 10, 2016 at 7:40 AM, Dan Williams wrote: > On Fri, 2016-03-04 at 10:15 -0800, Ali Nematollahi wrote: > > Hi Dan > > > > MM 1.4.12 and NM 1.0.10. > > > > Sorry for the late follow-up; the issue appears to be that either NM or > MM is unable to detect the supported IP types of the modem. That's why > you get this message: > > "Connection requested IPv4 but IPv4 is unsuported by the modem" > > Can you grab "mmcli -m 0 | grep IP" and we'll see if MM or NM is at > fault here. > > Dan > > > > I understand that the connection to bearer takes a bit of time, but > > when I > > get this: > > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > > - > > Status | connected: 'yes' > > | suspended: 'no' > > | interface: 'ttyUSB3' > > | IP timeout: '20' > > - > > Properties | apn: 'm2minternet.apn' > > | roaming: 'allowed' > > | IP type: 'none' > > |user: 'none' > > |password: 'none' > > | number: 'none' > > | Rm protocol: 'unknown' > > - > > IPv4 configuration | method: 'ppp' > > | address: 'unknown' > > | prefix: '0' > > | gateway: 'unknown' > > | DNS: none > > - > > IPv6 configuration | method: 'unknown' > > > > > > > > Does it not mean that I am already connected?? If I bring up PPPD > > manually > > I could ping and I can wget at this point. > > > > > > On Fri, Mar 4, 201
Re: NetworkManager dispatchers
On Fri, 2016-03-04 at 10:15 -0800, Ali Nematollahi wrote: > Hi Dan > > MM 1.4.12 and NM 1.0.10. > Sorry for the late follow-up; the issue appears to be that either NM or MM is unable to detect the supported IP types of the modem. That's why you get this message: "Connection requested IPv4 but IPv4 is unsuported by the modem" Can you grab "mmcli -m 0 | grep IP" and we'll see if MM or NM is at fault here. Dan > I understand that the connection to bearer takes a bit of time, but > when I > get this: > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > - > Status | connected: 'yes' > | suspended: 'no' > | interface: 'ttyUSB3' > | IP timeout: '20' > - > Properties | apn: 'm2minternet.apn' > | roaming: 'allowed' > | IP type: 'none' > |user: 'none' > |password: 'none' > | number: 'none' > | Rm protocol: 'unknown' > - > IPv4 configuration | method: 'ppp' > | address: 'unknown' > | prefix: '0' > | gateway: 'unknown' > | DNS: none > - > IPv6 configuration | method: 'unknown' > > > > Does it not mean that I am already connected?? If I bring up PPPD > manually > I could ping and I can wget at this point. > > > On Fri, Mar 4, 2016 at 8:57 AM, Dan Williams wrote: > > > > > On Thu, 2016-03-03 at 17:06 -0800, Ali Nematollahi wrote: > > > > > > So I did some more work and Here is what I found, which still > > > doesn't > > > make > > > any sense. > > > > > > When I checked the "bearer" info with mmcli: > > > Bearer '/org/freedesktop/ModemManager1/Bearer/0' > > > - > > > Status | connected: 'no' > > > | suspended: 'no' > > > | interface: 'unknown' > > > | IP timeout: '20' > > > - > > > Properties | apn: 'm2minternet.apn' > > > | roaming: 'allowed' > > > | IP type: 'none' > > > |user: 'none' > > > |password: 'none' > > > | number: 'none' > > > | Rm protocol: 'unknown' > > > - > > > IPv4 configuration | method: 'unknown' > > > - > > > IPv6 configuration | method: 'unknown' > > The bearer will be created but it takes a bit to be connected, so > > that's probably the state you're in here. > > > > > > > > > > > > > > so I did a simple-connect AGAIN: > > > mmcli -m 0 --simple-connect="apn=m2minternet.apn" > > > NetworkManager[2887]: (ttyUSB2): modem state changed, > > > 'registered' > > > --> 'connecting' (reason: user-requested) > > > NetworkManager[2887]: (ttyUSB2): modem state changed, > > > 'connecting' > > > --> 'connected' (reason: user-requested) > > > successfully connected the modem > > > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > > > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > > > - > > > Status | connected: 'yes' > > > | suspended: 'no' > > > | interface: 'ttyUSB3' > > > | IP timeout: '20' > > > - > > > Properties | apn: 'm2minternet.apn' > > > | roaming: 'allowed' > > > | IP type: 'none' > > > |user: 'none' > > > |password: 'none' > > > | number: 'none' > > > | Rm protocol: 'unknown' > > > - > > > IPv4 configuration | method: 'ppp' > > > | address: 'unknown' > > > | prefix: '0' > > > | gateway: 'unknown' > > > | DNS: none > > > - > > > IPv6 configuration | method: 'unknown' > > > > > > Good sign! But > > > nmcli con up ppp > > > NetworkManager[2887]: (ttyUSB2): Activation: starting > > > connection > > > 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) > > > NetworkManager[2887]: (ttyUSB2): device state change: > > > disconnected > > > -> prepare (reason 'none') [30 40 0] > > > NetworkManager[2887]: NetworkManager state is now > > > CONNECTING > > > NetworkManager[2887]: (ttyUSB2): Failed to connect 'ppp': > > > Connection requested IPv4 but IPv4 is unsuported by the modem. > > > > > What version of NetworkManager and ModemManager did you have > >
Re: NetworkManager dispatchers
I have had absolutely no luck today either and I really need help with this. I am configuring and compiling the 1.0.10 like this: ./configure --localstatedir=/var --with-systemdsystemunitdir=no make make install I have tried with ./configure --localstatedir=/var --disable-ppp --with-systemdsystemunitdir=no and same problem. I am using Debian Wheezy with MM 1.4.12 and NM 1.0.10. MM works flawlessly but I cannot seem to use NM to set up a connection (PPP). Any ideas what I'm not doing right? Anyone? Thanks On Mon, Mar 7, 2016 at 9:02 AM, Ali Nematollahi wrote: > any thoughts on this guys? is there a bug in this version of nm? should I > try another version? > > On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams wrote: > >> On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: >> > Thanks! >> > >> > How to I enable "service called NetworkManager-dispatcher or >> > nm-dispatcher"? When I search for "dispatcher" in my filesystem only >> > these >> > come up: >> > /etc/NetworkManager/dispatcher.d >> > /etc/dbus-1/system.d/nm-dispatcher.conf >> > /usr/share/dbus-1/system- >> > services/org.freedesktop.nm_dispatcher.service >> > /usr/lib/NetworkManager/nm-dispatcher.action >> > /usr/sbin/usb_modeswitch_dispatcher >> > >> > >> > Starting MM as a service makes perfect sense. >> > The question is however, how do I find out when to say "enable" the >> > modem, >> > or to do a simple-connect? I was planning on using the dispatchers >> > for all >> > of that, to automate all of those. So basically: >> >> NetworkManager will take care of that, if 'wwan' radios are enabled. >> See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, and >> as long as your machine has no airplane switch for WWAN (or if it does >> the switch enables the WWAN), NetworkManager will enable the modem when >> it is discovered by ModemManager and it will be available to connect >> with from NetworkManager. >> >> Recent versions of NetworkManager (1.0.8+) also have support for WWAN >> autoconnect, so I don't think you need a dispatcher script here at all. >> >> > - MM starts >> > - modem comes up, status -> Disabled >> >- dispatcher kicks in: status -> Enabled >> > - dispatcher kicks in: simple-connect >> >> Dispatcher scripts only trigger on connection up/down, so you don't get >> any events on modem status changes. But that shouldn't matter, since >> NetworkManager can take care of all of the WWAN connection stuff as >> long as ModemManager is up and running (like if its run as a system >> service). >> >> Dan >> >> > Thanks! >> > >> > >> > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller >> > wrote: >> > >> > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: >> > > > Hi guys >> > > > >> > > > I'm trying to experiment with NM dispatchers but I can't seem to >> > > > get >> > > > anything done. I have a very basic script >> > > > in /etc/NetworkManager/dispatcher.d/02test: >> > > > >> > > > #!/bin/sh -e >> > > > >> > > > echo "Starting ModemManager" >> > > > ModemManager --debug & >> > > > >> > > > But it is not running. I have made sure the scripts and >> > > > directories >> > > > are executable (a+x). But I cannot seem to get the scripts to >> > > > run. >> > > > >> > > > Can someone help me with this please? >> > > > NetworkManager --version >> > > > 0.9.4.0 >> > > >> > > You probably also need to enable a service called NetworkManager- >> > > dispatcher or nm-dispatcher. >> > > >> > > >> > > > Question 2: I wanted to use the dispatcher script to start >> > > > ModemManager on startup and to enable the 3G modem I have. Can it >> > > > be >> > > > done? I have seen examples of how to start a connection when an >> > > > interface comes up but nothing that could help me with this. >> > > >> > > It looks very wrong to start ModemManager from a dispatcher script. >> > > Those scripts are invoked often and at various times, you don't >> > > want to >> > > start ModemManager every time something happens with a networking >> > > interface. >> > > >> > > Instead, start ModemManager as a regular system service, just like >> > > NetworkManager. >> > > >> > > >> > > Thomas >> > > >> > ___ >> > networkmanager-list mailing list >> > networkmanager-list@gnome.org >> > https://mail.gnome.org/mailman/listinfo/networkmanager-list >> > > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager dispatchers
any thoughts on this guys? is there a bug in this version of nm? should I try another version? On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams wrote: > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > Thanks! > > > > How to I enable "service called NetworkManager-dispatcher or > > nm-dispatcher"? When I search for "dispatcher" in my filesystem only > > these > > come up: > > /etc/NetworkManager/dispatcher.d > > /etc/dbus-1/system.d/nm-dispatcher.conf > > /usr/share/dbus-1/system- > > services/org.freedesktop.nm_dispatcher.service > > /usr/lib/NetworkManager/nm-dispatcher.action > > /usr/sbin/usb_modeswitch_dispatcher > > > > > > Starting MM as a service makes perfect sense. > > The question is however, how do I find out when to say "enable" the > > modem, > > or to do a simple-connect? I was planning on using the dispatchers > > for all > > of that, to automate all of those. So basically: > > NetworkManager will take care of that, if 'wwan' radios are enabled. > See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, and > as long as your machine has no airplane switch for WWAN (or if it does > the switch enables the WWAN), NetworkManager will enable the modem when > it is discovered by ModemManager and it will be available to connect > with from NetworkManager. > > Recent versions of NetworkManager (1.0.8+) also have support for WWAN > autoconnect, so I don't think you need a dispatcher script here at all. > > > - MM starts > > - modem comes up, status -> Disabled > >- dispatcher kicks in: status -> Enabled > > - dispatcher kicks in: simple-connect > > Dispatcher scripts only trigger on connection up/down, so you don't get > any events on modem status changes. But that shouldn't matter, since > NetworkManager can take care of all of the WWAN connection stuff as > long as ModemManager is up and running (like if its run as a system > service). > > Dan > > > Thanks! > > > > > > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller > > wrote: > > > > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > > > Hi guys > > > > > > > > I'm trying to experiment with NM dispatchers but I can't seem to > > > > get > > > > anything done. I have a very basic script > > > > in /etc/NetworkManager/dispatcher.d/02test: > > > > > > > > #!/bin/sh -e > > > > > > > > echo "Starting ModemManager" > > > > ModemManager --debug & > > > > > > > > But it is not running. I have made sure the scripts and > > > > directories > > > > are executable (a+x). But I cannot seem to get the scripts to > > > > run. > > > > > > > > Can someone help me with this please? > > > > NetworkManager --version > > > > 0.9.4.0 > > > > > > You probably also need to enable a service called NetworkManager- > > > dispatcher or nm-dispatcher. > > > > > > > > > > Question 2: I wanted to use the dispatcher script to start > > > > ModemManager on startup and to enable the 3G modem I have. Can it > > > > be > > > > done? I have seen examples of how to start a connection when an > > > > interface comes up but nothing that could help me with this. > > > > > > It looks very wrong to start ModemManager from a dispatcher script. > > > Those scripts are invoked often and at various times, you don't > > > want to > > > start ModemManager every time something happens with a networking > > > interface. > > > > > > Instead, start ModemManager as a regular system service, just like > > > NetworkManager. > > > > > > > > > Thomas > > > > > ___ > > networkmanager-list mailing list > > networkmanager-list@gnome.org > > https://mail.gnome.org/mailman/listinfo/networkmanager-list > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager dispatchers
Hi Dan MM 1.4.12 and NM 1.0.10. I understand that the connection to bearer takes a bit of time, but when I get this: root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 Bearer '/org/freedesktop/ModemManager1/Bearer/1' - Status | connected: 'yes' | suspended: 'no' | interface: 'ttyUSB3' | IP timeout: '20' - Properties | apn: 'm2minternet.apn' | roaming: 'allowed' | IP type: 'none' |user: 'none' |password: 'none' | number: 'none' | Rm protocol: 'unknown' - IPv4 configuration | method: 'ppp' | address: 'unknown' | prefix: '0' | gateway: 'unknown' | DNS: none - IPv6 configuration | method: 'unknown' Does it not mean that I am already connected?? If I bring up PPPD manually I could ping and I can wget at this point. On Fri, Mar 4, 2016 at 8:57 AM, Dan Williams wrote: > On Thu, 2016-03-03 at 17:06 -0800, Ali Nematollahi wrote: > > So I did some more work and Here is what I found, which still doesn't > > make > > any sense. > > > > When I checked the "bearer" info with mmcli: > > Bearer '/org/freedesktop/ModemManager1/Bearer/0' > > - > > Status | connected: 'no' > > | suspended: 'no' > > | interface: 'unknown' > > | IP timeout: '20' > > - > > Properties | apn: 'm2minternet.apn' > > | roaming: 'allowed' > > | IP type: 'none' > > |user: 'none' > > |password: 'none' > > | number: 'none' > > | Rm protocol: 'unknown' > > - > > IPv4 configuration | method: 'unknown' > > - > > IPv6 configuration | method: 'unknown' > > The bearer will be created but it takes a bit to be connected, so > that's probably the state you're in here. > > > > > > > so I did a simple-connect AGAIN: > > mmcli -m 0 --simple-connect="apn=m2minternet.apn" > > NetworkManager[2887]: (ttyUSB2): modem state changed, > > 'registered' > > --> 'connecting' (reason: user-requested) > > NetworkManager[2887]: (ttyUSB2): modem state changed, > > 'connecting' > > --> 'connected' (reason: user-requested) > > successfully connected the modem > > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > > - > > Status | connected: 'yes' > > | suspended: 'no' > > | interface: 'ttyUSB3' > > | IP timeout: '20' > > - > > Properties | apn: 'm2minternet.apn' > > | roaming: 'allowed' > > | IP type: 'none' > > |user: 'none' > > |password: 'none' > > | number: 'none' > > | Rm protocol: 'unknown' > > - > > IPv4 configuration | method: 'ppp' > > | address: 'unknown' > > | prefix: '0' > > | gateway: 'unknown' > > | DNS: none > > - > > IPv6 configuration | method: 'unknown' > > > Good sign! But > > nmcli con up ppp > > NetworkManager[2887]: (ttyUSB2): Activation: starting > > connection > > 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) > > NetworkManager[2887]: (ttyUSB2): device state change: > > disconnected > > -> prepare (reason 'none') [30 40 0] > > NetworkManager[2887]: NetworkManager state is now CONNECTING > > NetworkManager[2887]: (ttyUSB2): Failed to connect 'ppp': > > Connection requested IPv4 but IPv4 is unsuported by the modem. > > > > What version of NetworkManager and ModemManager did you have again? I > seem to recall fixing a bug here recently about mis-identifying the > supported IP types. > > Dan > > > NetworkManager[2887]: (ttyUSB2): device state change: prepare > > -> > > failed (reason 'modem-init-failed') [40 120 28] > > NetworkManager[2887]: NetworkManager state is now > > DISCONNECTED > > NetworkManager[2887]: (ttyUSB2): Activation: failed for > > connection > > 'ppp' > > NetworkManager[2887]: (ttyUSB2): modem state changed, > > 'connected' > > --> 'disconnecting' (reason: user-requested) > > NetworkManager[2887]: (ttyUSB2): device state change: failed > > -> > > disconnected (reason 'none') [120 30 0] > > E
Re: NetworkManager dispatchers
On Thu, 2016-03-03 at 17:06 -0800, Ali Nematollahi wrote: > So I did some more work and Here is what I found, which still doesn't > make > any sense. > > When I checked the "bearer" info with mmcli: > Bearer '/org/freedesktop/ModemManager1/Bearer/0' > - > Status | connected: 'no' > | suspended: 'no' > | interface: 'unknown' > | IP timeout: '20' > - > Properties | apn: 'm2minternet.apn' > | roaming: 'allowed' > | IP type: 'none' > |user: 'none' > |password: 'none' > | number: 'none' > | Rm protocol: 'unknown' > - > IPv4 configuration | method: 'unknown' > - > IPv6 configuration | method: 'unknown' The bearer will be created but it takes a bit to be connected, so that's probably the state you're in here. > > > so I did a simple-connect AGAIN: > mmcli -m 0 --simple-connect="apn=m2minternet.apn" > NetworkManager[2887]: (ttyUSB2): modem state changed, > 'registered' > --> 'connecting' (reason: user-requested) > NetworkManager[2887]: (ttyUSB2): modem state changed, > 'connecting' > --> 'connected' (reason: user-requested) > successfully connected the modem > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > - > Status | connected: 'yes' > | suspended: 'no' > | interface: 'ttyUSB3' > | IP timeout: '20' > - > Properties | apn: 'm2minternet.apn' > | roaming: 'allowed' > | IP type: 'none' > |user: 'none' > |password: 'none' > | number: 'none' > | Rm protocol: 'unknown' > - > IPv4 configuration | method: 'ppp' > | address: 'unknown' > | prefix: '0' > | gateway: 'unknown' > | DNS: none > - > IPv6 configuration | method: 'unknown' > Good sign! But > nmcli con up ppp > NetworkManager[2887]: (ttyUSB2): Activation: starting > connection > 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) > NetworkManager[2887]: (ttyUSB2): device state change: > disconnected > -> prepare (reason 'none') [30 40 0] > NetworkManager[2887]: NetworkManager state is now CONNECTING > NetworkManager[2887]: (ttyUSB2): Failed to connect 'ppp': > Connection requested IPv4 but IPv4 is unsuported by the modem. > What version of NetworkManager and ModemManager did you have again? I seem to recall fixing a bug here recently about mis-identifying the supported IP types. Dan > NetworkManager[2887]: (ttyUSB2): device state change: prepare > -> > failed (reason 'modem-init-failed') [40 120 28] > NetworkManager[2887]: NetworkManager state is now > DISCONNECTED > NetworkManager[2887]: (ttyUSB2): Activation: failed for > connection > 'ppp' > NetworkManager[2887]: (ttyUSB2): modem state changed, > 'connected' > --> 'disconnecting' (reason: user-requested) > NetworkManager[2887]: (ttyUSB2): device state change: failed > -> > disconnected (reason 'none') [120 30 0] > Error: Connection activation failed: Active connection could not be > attached to the device > root~# NetworkManager[2887]: (ttyUSB2): modem state changed, > 'disconnecting' --> 'registered' (reason: user-requested) > > root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 > Bearer '/org/freedesktop/ModemManager1/Bearer/1' > - > Status | connected: 'no' > | suspended: 'no' > | interface: 'unknown' > | IP timeout: '20' > - > Properties | apn: 'm2minternet.apn' > | roaming: 'allowed' > | IP type: 'none' > |user: 'none' > |password: 'none' > | number: 'none' > | Rm protocol: 'unknown' > - > IPv4 configuration | method: 'unknown' > - > IPv6 configuration | method: 'unknown' > > > So after a con up, the modem lost its connection it looks like!!! but > why? > > I'm really out of ideas now. I don't know how to progress further :( > > > > On Thu, Mar 3, 2016 at 4:49 PM, Ali Nematollahi > wrote: > > > > > I made a progress. I enabled debugging and I saw the NM was > > complaining > > about dual-stack: > > > > NetworkManager[4883]: Loaded d
Re: NetworkManager dispatchers
So I did some more work and Here is what I found, which still doesn't make any sense. When I checked the "bearer" info with mmcli: Bearer '/org/freedesktop/ModemManager1/Bearer/0' - Status | connected: 'no' | suspended: 'no' | interface: 'unknown' | IP timeout: '20' - Properties | apn: 'm2minternet.apn' | roaming: 'allowed' | IP type: 'none' |user: 'none' |password: 'none' | number: 'none' | Rm protocol: 'unknown' - IPv4 configuration | method: 'unknown' - IPv6 configuration | method: 'unknown' so I did a simple-connect AGAIN: mmcli -m 0 --simple-connect="apn=m2minternet.apn" NetworkManager[2887]: (ttyUSB2): modem state changed, 'registered' --> 'connecting' (reason: user-requested) NetworkManager[2887]: (ttyUSB2): modem state changed, 'connecting' --> 'connected' (reason: user-requested) successfully connected the modem root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 Bearer '/org/freedesktop/ModemManager1/Bearer/1' - Status | connected: 'yes' | suspended: 'no' | interface: 'ttyUSB3' | IP timeout: '20' - Properties | apn: 'm2minternet.apn' | roaming: 'allowed' | IP type: 'none' |user: 'none' |password: 'none' | number: 'none' | Rm protocol: 'unknown' - IPv4 configuration | method: 'ppp' | address: 'unknown' | prefix: '0' | gateway: 'unknown' | DNS: none - IPv6 configuration | method: 'unknown' Good sign! But nmcli con up ppp NetworkManager[2887]: (ttyUSB2): Activation: starting connection 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) NetworkManager[2887]: (ttyUSB2): device state change: disconnected -> prepare (reason 'none') [30 40 0] NetworkManager[2887]: NetworkManager state is now CONNECTING NetworkManager[2887]: (ttyUSB2): Failed to connect 'ppp': Connection requested IPv4 but IPv4 is unsuported by the modem. NetworkManager[2887]: (ttyUSB2): device state change: prepare -> failed (reason 'modem-init-failed') [40 120 28] NetworkManager[2887]: NetworkManager state is now DISCONNECTED NetworkManager[2887]: (ttyUSB2): Activation: failed for connection 'ppp' NetworkManager[2887]: (ttyUSB2): modem state changed, 'connected' --> 'disconnecting' (reason: user-requested) NetworkManager[2887]: (ttyUSB2): device state change: failed -> disconnected (reason 'none') [120 30 0] Error: Connection activation failed: Active connection could not be attached to the device root~# NetworkManager[2887]: (ttyUSB2): modem state changed, 'disconnecting' --> 'registered' (reason: user-requested) root~# mmcli -b /org/freedesktop/ModemManager1/Bearer/1 Bearer '/org/freedesktop/ModemManager1/Bearer/1' - Status | connected: 'no' | suspended: 'no' | interface: 'unknown' | IP timeout: '20' - Properties | apn: 'm2minternet.apn' | roaming: 'allowed' | IP type: 'none' |user: 'none' |password: 'none' | number: 'none' | Rm protocol: 'unknown' - IPv4 configuration | method: 'unknown' - IPv6 configuration | method: 'unknown' So after a con up, the modem lost its connection it looks like!!! but why? I'm really out of ideas now. I don't know how to progress further :( On Thu, Mar 3, 2016 at 4:49 PM, Ali Nematollahi wrote: > I made a progress. I enabled debugging and I saw the NM was complaining > about dual-stack: > > NetworkManager[4883]: Loaded device plugin: NMWwanFactory > (/usr/local/lib/NetworkManager/libnm-device-plugin-wwan.so) > NetworkManager[4883]: Loaded device plugin: NMAtmManager > (/usr/local/lib/NetworkManager/libnm-device-plugin-adsl.so) > NetworkManager[4883]: WiFi enabled by radio killswitch; enabled by > state file > NetworkManager[4883]: WWAN enabled by radio killswitch; enabled by > state file > NetworkManager[4883]: WiMAX enabled by radio killswitch; enabled > by state file > NetworkManager[4883]: Networking is enabled by state file > NetworkManager[4883]: (eth0): link connected > NetworkMana
Re: NetworkManager dispatchers
I made a progress. I enabled debugging and I saw the NM was complaining about dual-stack: NetworkManager[4883]: Loaded device plugin: NMWwanFactory (/usr/local/lib/NetworkManager/libnm-device-plugin-wwan.so) NetworkManager[4883]: Loaded device plugin: NMAtmManager (/usr/local/lib/NetworkManager/libnm-device-plugin-adsl.so) NetworkManager[4883]: WiFi enabled by radio killswitch; enabled by state file NetworkManager[4883]: WWAN enabled by radio killswitch; enabled by state file NetworkManager[4883]: WiMAX enabled by radio killswitch; enabled by state file NetworkManager[4883]: Networking is enabled by state file NetworkManager[4883]: (eth0): link connected NetworkManager[4883]: (eth0): new Ethernet device (carrier: ON, driver: 'cpsw', ifindex: 4) NetworkManager[4883]: (lo): link connected NetworkManager[4883]: (lo): new Generic device (carrier: ON, driver: 'unknown', ifindex: 1) NetworkManager[4883]: (can0): new Generic device (carrier: UNKNOWN, driver: 'c_can_platform', ifindex: 2) NetworkManager[4883]: (can1): new Generic device (carrier: UNKNOWN, driver: 'c_can_platform', ifindex: 3) NetworkManager[4883]: startup complete NetworkManager[4883]: ModemManager available in the bus NetworkManager[4883]: (ttyUSB2): new Broadband device (carrier: UNKNOWN, driver: 'option1', ifindex: 0) NetworkManager[4883]: (ttyUSB2): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2] NetworkManager[4883]: (ttyUSB2): modem state 'registered' NetworkManager[4883]: (ttyUSB2): device state change: unavailable -> disconnected (reason 'none') [20 30 0] NetworkManager[4883]: Auto-activating connection 'ppp'. NetworkManager[4883]: (ttyUSB2): Activation: starting connection 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) NetworkManager[4883]: (ttyUSB2): device state change: disconnected -> prepare (reason 'none') [30 40 0] NetworkManager[4883]: NetworkManager state is now CONNECTING NetworkManager[4883]: (ttyUSB2): Failed to connect 'ppp': Connection requested both IPv4 and IPv6 but dual-stack addressing is unsupported by the modem. NetworkManager[4883]: (ttyUSB2): device state change: prepare -> failed (reason 'modem-init-failed') [40 120 28] NetworkManager[4883]: NetworkManager state is now DISCONNECTED NetworkManager[4883]: (ttyUSB2): Activation: failed for connection 'ppp' NetworkManager[4883]: (ttyUSB2): device state change: failed -> disconnected (reason 'none') [120 30 0] I set the ipv6 method to ignore: [connection] id=ppp uuid=94e24340-490b-4f96-91bb-c5511a2a5f50 type=gsm interface-name=ttyUSB2 permissions= secondaries= [gsm] apn=internet.com number=*99# [ipv4] dns-search= method=auto [ipv6] method=ignore and this is what I get on startup now: NetworkManager[5146]: keyfile: new connection /usr/local/etc/NetworkManager/system-connections/ppp (94e24340-490b-4f96-91bb-c5511a2a5f50,"ppp") NetworkManager[5146]: get unmanaged devices count: 1 NetworkManager[5146]: monitoring kernel firmware directory '/lib/firmware'. NetworkManager[5146]: Loaded device plugin: NMVxlanFactory (internal) NetworkManager[5146]: Loaded device plugin: NMVlanFactory (internal) NetworkManager[5146]: Loaded device plugin: NMVethFactory (internal) NetworkManager[5146]: Loaded device plugin: NMTunFactory (internal) NetworkManager[5146]: Loaded device plugin: NMMacvlanFactory (internal) NetworkManager[5146]: Loaded device plugin: NMInfinibandFactory (internal) NetworkManager[5146]: Loaded device plugin: NMGreFactory (internal) NetworkManager[5146]: Loaded device plugin: NMEthernetFactory (internal) NetworkManager[5146]: Loaded device plugin: NMBridgeFactory (internal) NetworkManager[5146]: Loaded device plugin: NMBondFactory (internal) NetworkManager[5146]: Loaded device plugin: NMWifiFactory (/usr/local/lib/NetworkManager/libnm-device-plugin-wifi.so) NetworkManager[5146]: (/libnm-device-plugin-bluetooth.so): failed to load plugin: /usr/local/lib/NetworkManager/libnm-device-plugin-bluetooth.so: undefined symbol: g_clear_pointer NetworkManager[5146]: Loaded device plugin: NMWwanFactory (/usr/local/lib/NetworkManager/libnm-device-plugin-wwan.so) NetworkManager[5146]: Loaded device plugin: NMAtmManager (/usr/local/lib/NetworkManager/libnm-device-plugin-adsl.so) NetworkManager[5146]: WiFi enabled by radio killswitch; enabled by state file NetworkManager[5146]: WWAN enabled by radio killswitch; enabled by state file NetworkManager[5146]: WiMAX enabled by radio killswitch; enabled by state file NetworkManager[5146]: Networking is enabled by state file NetworkManager[5146]: (eth0): link connected NetworkManager[5146]: (eth0): new Ethernet device (carrier: ON, driver: 'cpsw', ifindex: 4) NetworkManager[5146]: (lo): link connected NetworkManager[5146]: (lo): new Generic device (carrier: ON, driver: 'unknown', ifindex: 1) NetworkManager[5146]: (can0): new Generic device (carrier: UNKNOWN, driver: 'c_can_platform', ifindex: 2) NetworkManag
Re: NetworkManager dispatchers
Thanks Dan! I removed the connections and restarted NM and did what you suggested and here is what I get now: nmcli con add type gsm con-name ppp ifname ttyUSB2 apn internet.com Connection 'ppp' (94e24340-490b-4f96-91bb-c5511a2a5f50) successfully added. root/usr/local/etc/NetworkManager/system-connections# nmcli con up ppp Error: Connection activation failed: Active connection removed before it was initialized root/usr/local/etc/NetworkManager/system-connections# nmcli con up ppp Error: Connection activation failed: Active connection could not be attached to the device I wonder what that means...hmmm Thanks a lot for your help! On Thu, Mar 3, 2016 at 2:25 PM, Dan Williams wrote: > On Thu, 2016-03-03 at 13:58 -0800, Ali Nematollahi wrote: > > Okay so I was able to get MM 1.4.12 and NM 1.0.10 compiled and > > deployed on > > my unit, which I must admit wasn't easy. 0.9.4 was a lot easier, I > > had to > > do a whole lot of re-linking and stuff to get 1.0.10 set up and > > running. > > Good news is it is up and running! > > > > > > I got my 3g up and running and it's all good. Now trying to get NM to > > start > > a PPP on it but I'm hitting the wall again. > > I've read a lot of documents on setting up devices but none that go > > deep > > into setting up GSM and PPP, which is sad. Here is what I have done > > so far: > > > > - with NMCLI: > > nmcli con add type gsm con-name ppp ifname ppp0 apn internet.com > > Connection 'ppp' (af71d0c7-bbbd-4d4e-941e-a2581dc86a2e) successfully > > added. > > > > root/usr/local/etc/NetworkManager/system-connections# nmcli con up > > ppp > > Error: Connection activation failed: No suitable device found for > > this > > connection. > > > > some useful outputs: > > root/usr/local/etc/NetworkManager/system-connections# nmcli con > > NAME UUID TYPE DEVICE > > pppaf71d0c7-bbbd-4d4e-941e-a2581dc86a2e gsm -- > > radio f6547503-d831-4cc2-bd3c-a958e645552a gsm -- > > root/usr/local/etc/NetworkManager/system-connections# nmcli dev > > DEVICE TYPE STATE CONNECTION > > ttyUSB2 gsm disconnected -- > > eth0 ethernet unmanaged -- > > lo loopback unmanaged -- > > root/usr/local/etc/NetworkManager/system-connections# mmcli -L > > > > Found 1 modems: > > /org/freedesktop/ModemManager1/Modem/0 [Cinterion] PHS8-USA > > > > > > I added another entry to the ppp connection and called it radio: > > cat radio > > [connection] > > id=radio > > uuid=f6547503-d831-4cc2-bd3c-a958e645552a > > type=gsm > > #interface-name=ppp0 > > interface-name=wwan0 > > The interface part is likely your problem. interface-name is the name > of the NetworkManager control port, which in your case would be ttyUSB2 > (as reported by 'nmcli dev'). Data ports (like ppp0) are transient, > they come and go, so locking the connection profile to a specific > device needs to happen with the control interface name. > > If you change that to ttyUSB2 or even just remove it entirely, what > happens? > > Dan > > > permissions= > > secondaries= > > > > [gsm] > > apn=m2minternet.apn > > number=*99# > > > > [ipv4] > > dns-search= > > method=auto > > > > [ipv6] > > dns-search= > > method=auto > > > > [serial] > > baud=115200 > > > > > > nmcli con up radio ifname ppp0 > > Error: device 'ppp0' not compatible with connection 'radio'. > > > > > > Can someone tell me what I'm not doing right? I want to have my PPP0 > > interface come up everytime the radio is connected. When I do it > > manually > > through pppd call it works beautifully but I can't get it to work > > with > > NMCLI. Any ideas why not? > > > > > > Thanks > > > > > > > > > > > > On Tue, Mar 1, 2016 at 7:38 AM, Dan Williams wrote: > > > > > > > > On Mon, 2016-02-29 at 17:40 -0800, Ali Nematollahi wrote: > > > > > > > > Thanks! I've looked at nmcli radio but there is no good > > > > documentation > > > > I > > > > could find for the version I am using. All of the documentation > > > > is > > > > for > > > > newer version and don't apply. > > > Yeah, you say later you're using NM 0.9.4, which is extremely old > > > (23- > > > Mar-2012) and I'm not surprised some stuff would be different... > > > > > > > > > > > First of all, when I do: > > > > > > > > nmcli nm wwan > > > > WWAN > > > > disabled > > > > > > > > Then I do: > > > > nmcli nm wwan on > > > > nmcli nm wwan > > > > WWAN > > > > disabled > > > > > > > > nmcli nm status > > > > RUNNING STATE WIFI-HARDWARE WIFI WWAN- > > > > HARDWARE > > > > WWAN > > > > running connected enabled enabledenable > > > > d > > > > disabled > > > What's in /var/lib/NetworkManager/NetworkManager.state ? > > > > > > Can you turn on NM log debugging (might be an nmcli command for > > > that) > > > and see what NM prints out when you do "nmcli nm wwan on"? > > > > > > Dan > > > > > > > > > > > I was reading on google somewhere that I need a config file > > > > in: /etc/NetworkManager/system-connect
Re: NetworkManager dispatchers
On Thu, 2016-03-03 at 13:58 -0800, Ali Nematollahi wrote: > Okay so I was able to get MM 1.4.12 and NM 1.0.10 compiled and > deployed on > my unit, which I must admit wasn't easy. 0.9.4 was a lot easier, I > had to > do a whole lot of re-linking and stuff to get 1.0.10 set up and > running. > Good news is it is up and running! > > > I got my 3g up and running and it's all good. Now trying to get NM to > start > a PPP on it but I'm hitting the wall again. > I've read a lot of documents on setting up devices but none that go > deep > into setting up GSM and PPP, which is sad. Here is what I have done > so far: > > - with NMCLI: > nmcli con add type gsm con-name ppp ifname ppp0 apn internet.com > Connection 'ppp' (af71d0c7-bbbd-4d4e-941e-a2581dc86a2e) successfully > added. > > root/usr/local/etc/NetworkManager/system-connections# nmcli con up > ppp > Error: Connection activation failed: No suitable device found for > this > connection. > > some useful outputs: > root/usr/local/etc/NetworkManager/system-connections# nmcli con > NAME UUID TYPE DEVICE > pppaf71d0c7-bbbd-4d4e-941e-a2581dc86a2e gsm -- > radio f6547503-d831-4cc2-bd3c-a958e645552a gsm -- > root/usr/local/etc/NetworkManager/system-connections# nmcli dev > DEVICE TYPE STATE CONNECTION > ttyUSB2 gsm disconnected -- > eth0 ethernet unmanaged -- > lo loopback unmanaged -- > root/usr/local/etc/NetworkManager/system-connections# mmcli -L > > Found 1 modems: > /org/freedesktop/ModemManager1/Modem/0 [Cinterion] PHS8-USA > > > I added another entry to the ppp connection and called it radio: > cat radio > [connection] > id=radio > uuid=f6547503-d831-4cc2-bd3c-a958e645552a > type=gsm > #interface-name=ppp0 > interface-name=wwan0 The interface part is likely your problem. interface-name is the name of the NetworkManager control port, which in your case would be ttyUSB2 (as reported by 'nmcli dev'). Data ports (like ppp0) are transient, they come and go, so locking the connection profile to a specific device needs to happen with the control interface name. If you change that to ttyUSB2 or even just remove it entirely, what happens? Dan > permissions= > secondaries= > > [gsm] > apn=m2minternet.apn > number=*99# > > [ipv4] > dns-search= > method=auto > > [ipv6] > dns-search= > method=auto > > [serial] > baud=115200 > > > nmcli con up radio ifname ppp0 > Error: device 'ppp0' not compatible with connection 'radio'. > > > Can someone tell me what I'm not doing right? I want to have my PPP0 > interface come up everytime the radio is connected. When I do it > manually > through pppd call it works beautifully but I can't get it to work > with > NMCLI. Any ideas why not? > > > Thanks > > > > > > On Tue, Mar 1, 2016 at 7:38 AM, Dan Williams wrote: > > > > > On Mon, 2016-02-29 at 17:40 -0800, Ali Nematollahi wrote: > > > > > > Thanks! I've looked at nmcli radio but there is no good > > > documentation > > > I > > > could find for the version I am using. All of the documentation > > > is > > > for > > > newer version and don't apply. > > Yeah, you say later you're using NM 0.9.4, which is extremely old > > (23- > > Mar-2012) and I'm not surprised some stuff would be different... > > > > > > > > First of all, when I do: > > > > > > nmcli nm wwan > > > WWAN > > > disabled > > > > > > Then I do: > > > nmcli nm wwan on > > > nmcli nm wwan > > > WWAN > > > disabled > > > > > > nmcli nm status > > > RUNNING STATE WIFI-HARDWARE WIFI WWAN- > > > HARDWARE > > > WWAN > > > running connected enabled enabledenable > > > d > > > disabled > > What's in /var/lib/NetworkManager/NetworkManager.state ? > > > > Can you turn on NM log debugging (might be an nmcli command for > > that) > > and see what NM prints out when you do "nmcli nm wwan on"? > > > > Dan > > > > > > > > I was reading on google somewhere that I need a config file > > > in: /etc/NetworkManager/system-connections/ > > > so I put one in: > > > > > > cat /etc/NetworkManager/system-connections/radio > > > [connection] > > > id=MyWwanConnection > > > type=gsm > > > > > > [ipv4] > > > method=auto > > > > > > [gsm] > > > number=*99# > > > apn=mnet.bell.ca.ioe > > > > > > > > > restarted NM, did the same thing, no difference. > > > > > > Any documentation for 0.9.4.0 that I can use to figure this out? > > > Can > > > someone help me with setting up the radio connections? I'm having > > > no > > > luck. > > > > > > Thanks > > > > > > > > > > > > On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams > > > wrote: > > > > > > > > > > > > > > > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > > > > > > > > > > > > > > Thanks! > > > > > > > > > > How to I enable "service called NetworkManager-dispatcher or > > > > > nm-dispatcher"? When I search for "dispatcher" in my > > > > > filesystem > > > > > only > > > > > these > > > > > come up
Re: NetworkManager dispatchers
Okay so I was able to get MM 1.4.12 and NM 1.0.10 compiled and deployed on my unit, which I must admit wasn't easy. 0.9.4 was a lot easier, I had to do a whole lot of re-linking and stuff to get 1.0.10 set up and running. Good news is it is up and running! I got my 3g up and running and it's all good. Now trying to get NM to start a PPP on it but I'm hitting the wall again. I've read a lot of documents on setting up devices but none that go deep into setting up GSM and PPP, which is sad. Here is what I have done so far: - with NMCLI: nmcli con add type gsm con-name ppp ifname ppp0 apn internet.com Connection 'ppp' (af71d0c7-bbbd-4d4e-941e-a2581dc86a2e) successfully added. root/usr/local/etc/NetworkManager/system-connections# nmcli con up ppp Error: Connection activation failed: No suitable device found for this connection. some useful outputs: root/usr/local/etc/NetworkManager/system-connections# nmcli con NAME UUID TYPE DEVICE pppaf71d0c7-bbbd-4d4e-941e-a2581dc86a2e gsm -- radio f6547503-d831-4cc2-bd3c-a958e645552a gsm -- root/usr/local/etc/NetworkManager/system-connections# nmcli dev DEVICE TYPE STATE CONNECTION ttyUSB2 gsm disconnected -- eth0 ethernet unmanaged -- lo loopback unmanaged -- root/usr/local/etc/NetworkManager/system-connections# mmcli -L Found 1 modems: /org/freedesktop/ModemManager1/Modem/0 [Cinterion] PHS8-USA I added another entry to the ppp connection and called it radio: cat radio [connection] id=radio uuid=f6547503-d831-4cc2-bd3c-a958e645552a type=gsm #interface-name=ppp0 interface-name=wwan0 permissions= secondaries= [gsm] apn=m2minternet.apn number=*99# [ipv4] dns-search= method=auto [ipv6] dns-search= method=auto [serial] baud=115200 nmcli con up radio ifname ppp0 Error: device 'ppp0' not compatible with connection 'radio'. Can someone tell me what I'm not doing right? I want to have my PPP0 interface come up everytime the radio is connected. When I do it manually through pppd call it works beautifully but I can't get it to work with NMCLI. Any ideas why not? Thanks On Tue, Mar 1, 2016 at 7:38 AM, Dan Williams wrote: > On Mon, 2016-02-29 at 17:40 -0800, Ali Nematollahi wrote: > > Thanks! I've looked at nmcli radio but there is no good documentation > > I > > could find for the version I am using. All of the documentation is > > for > > newer version and don't apply. > > Yeah, you say later you're using NM 0.9.4, which is extremely old (23- > Mar-2012) and I'm not surprised some stuff would be different... > > > First of all, when I do: > > > > nmcli nm wwan > > WWAN > > disabled > > > > Then I do: > > nmcli nm wwan on > > nmcli nm wwan > > WWAN > > disabled > > > > nmcli nm status > > RUNNING STATE WIFI-HARDWARE WIFI WWAN- > > HARDWARE > > WWAN > > running connected enabled enabledenabled > > disabled > > What's in /var/lib/NetworkManager/NetworkManager.state ? > > Can you turn on NM log debugging (might be an nmcli command for that) > and see what NM prints out when you do "nmcli nm wwan on"? > > Dan > > > I was reading on google somewhere that I need a config file > > in: /etc/NetworkManager/system-connections/ > > so I put one in: > > > > cat /etc/NetworkManager/system-connections/radio > > [connection] > > id=MyWwanConnection > > type=gsm > > > > [ipv4] > > method=auto > > > > [gsm] > > number=*99# > > apn=mnet.bell.ca.ioe > > > > > > restarted NM, did the same thing, no difference. > > > > Any documentation for 0.9.4.0 that I can use to figure this out? Can > > someone help me with setting up the radio connections? I'm having no > > luck. > > > > Thanks > > > > > > > > On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams > > wrote: > > > > > > > > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > > > > > > > Thanks! > > > > > > > > How to I enable "service called NetworkManager-dispatcher or > > > > nm-dispatcher"? When I search for "dispatcher" in my filesystem > > > > only > > > > these > > > > come up: > > > > /etc/NetworkManager/dispatcher.d > > > > /etc/dbus-1/system.d/nm-dispatcher.conf > > > > /usr/share/dbus-1/system- > > > > services/org.freedesktop.nm_dispatcher.service > > > > /usr/lib/NetworkManager/nm-dispatcher.action > > > > /usr/sbin/usb_modeswitch_dispatcher > > > > > > > > > > > > Starting MM as a service makes perfect sense. > > > > The question is however, how do I find out when to say "enable" > > > > the > > > > modem, > > > > or to do a simple-connect? I was planning on using the > > > > dispatchers > > > > for all > > > > of that, to automate all of those. So basically: > > > NetworkManager will take care of that, if 'wwan' radios are > > > enabled. > > > See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, > > > and > > > as long as your machine has no airplane switch for WWAN (or if it > > > does > > > the switch enables the WWAN), NetworkManager will enable the mo
Re: NetworkManager dispatchers
On Mon, 2016-02-29 at 17:40 -0800, Ali Nematollahi wrote: > Thanks! I've looked at nmcli radio but there is no good documentation > I > could find for the version I am using. All of the documentation is > for > newer version and don't apply. Yeah, you say later you're using NM 0.9.4, which is extremely old (23- Mar-2012) and I'm not surprised some stuff would be different... > First of all, when I do: > > nmcli nm wwan > WWAN > disabled > > Then I do: > nmcli nm wwan on > nmcli nm wwan > WWAN > disabled > > nmcli nm status > RUNNING STATE WIFI-HARDWARE WIFI WWAN- > HARDWARE > WWAN > running connected enabled enabledenabled > disabled What's in /var/lib/NetworkManager/NetworkManager.state ? Can you turn on NM log debugging (might be an nmcli command for that) and see what NM prints out when you do "nmcli nm wwan on"? Dan > I was reading on google somewhere that I need a config file > in: /etc/NetworkManager/system-connections/ > so I put one in: > > cat /etc/NetworkManager/system-connections/radio > [connection] > id=MyWwanConnection > type=gsm > > [ipv4] > method=auto > > [gsm] > number=*99# > apn=mnet.bell.ca.ioe > > > restarted NM, did the same thing, no difference. > > Any documentation for 0.9.4.0 that I can use to figure this out? Can > someone help me with setting up the radio connections? I'm having no > luck. > > Thanks > > > > On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams > wrote: > > > > > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > > > > > Thanks! > > > > > > How to I enable "service called NetworkManager-dispatcher or > > > nm-dispatcher"? When I search for "dispatcher" in my filesystem > > > only > > > these > > > come up: > > > /etc/NetworkManager/dispatcher.d > > > /etc/dbus-1/system.d/nm-dispatcher.conf > > > /usr/share/dbus-1/system- > > > services/org.freedesktop.nm_dispatcher.service > > > /usr/lib/NetworkManager/nm-dispatcher.action > > > /usr/sbin/usb_modeswitch_dispatcher > > > > > > > > > Starting MM as a service makes perfect sense. > > > The question is however, how do I find out when to say "enable" > > > the > > > modem, > > > or to do a simple-connect? I was planning on using the > > > dispatchers > > > for all > > > of that, to automate all of those. So basically: > > NetworkManager will take care of that, if 'wwan' radios are > > enabled. > > See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, > > and > > as long as your machine has no airplane switch for WWAN (or if it > > does > > the switch enables the WWAN), NetworkManager will enable the modem > > when > > it is discovered by ModemManager and it will be available to > > connect > > with from NetworkManager. > > > > Recent versions of NetworkManager (1.0.8+) also have support for > > WWAN > > autoconnect, so I don't think you need a dispatcher script here at > > all. > > > > > > > > - MM starts > > > - modem comes up, status -> Disabled > > > - dispatcher kicks in: status -> Enabled > > > - dispatcher kicks in: simple-connect > > Dispatcher scripts only trigger on connection up/down, so you don't > > get > > any events on modem status changes. But that shouldn't matter, > > since > > NetworkManager can take care of all of the WWAN connection stuff as > > long as ModemManager is up and running (like if its run as a system > > service). > > > > Dan > > > > > > > > Thanks! > > > > > > > > > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller > > om> > > > wrote: > > > > > > > > > > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > > > > > > > > > Hi guys > > > > > > > > > > I'm trying to experiment with NM dispatchers but I can't seem > > > > > to > > > > > get > > > > > anything done. I have a very basic script > > > > > in /etc/NetworkManager/dispatcher.d/02test: > > > > > > > > > > #!/bin/sh -e > > > > > > > > > > echo "Starting ModemManager" > > > > > ModemManager --debug & > > > > > > > > > > But it is not running. I have made sure the scripts and > > > > > directories > > > > > are executable (a+x). But I cannot seem to get the scripts to > > > > > run. > > > > > > > > > > Can someone help me with this please? > > > > > NetworkManager --version > > > > > 0.9.4.0 > > > > You probably also need to enable a service called > > > > NetworkManager- > > > > dispatcher or nm-dispatcher. > > > > > > > > > > > > > > > > > > Question 2: I wanted to use the dispatcher script to start > > > > > ModemManager on startup and to enable the 3G modem I have. > > > > > Can it > > > > > be > > > > > done? I have seen examples of how to start a connection when > > > > > an > > > > > interface comes up but nothing that could help me with this. > > > > It looks very wrong to start ModemManager from a dispatcher > > > > script. > > > > Those scripts are invoked often and at various times, you don't > > > > want to > > > > start ModemManager every time something happens with a > > > > networking > > >
Re: NetworkManager dispatchers
Thanks! I've looked at nmcli radio but there is no good documentation I could find for the version I am using. All of the documentation is for newer version and don't apply. First of all, when I do: nmcli nm wwan WWAN disabled Then I do: nmcli nm wwan on nmcli nm wwan WWAN disabled nmcli nm status RUNNING STATE WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN running connected enabled enabledenabled disabled I was reading on google somewhere that I need a config file in: /etc/NetworkManager/system-connections/ so I put one in: cat /etc/NetworkManager/system-connections/radio [connection] id=MyWwanConnection type=gsm [ipv4] method=auto [gsm] number=*99# apn=mnet.bell.ca.ioe restarted NM, did the same thing, no difference. Any documentation for 0.9.4.0 that I can use to figure this out? Can someone help me with setting up the radio connections? I'm having no luck. Thanks On Fri, Feb 26, 2016 at 2:22 PM, Dan Williams wrote: > On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > > Thanks! > > > > How to I enable "service called NetworkManager-dispatcher or > > nm-dispatcher"? When I search for "dispatcher" in my filesystem only > > these > > come up: > > /etc/NetworkManager/dispatcher.d > > /etc/dbus-1/system.d/nm-dispatcher.conf > > /usr/share/dbus-1/system- > > services/org.freedesktop.nm_dispatcher.service > > /usr/lib/NetworkManager/nm-dispatcher.action > > /usr/sbin/usb_modeswitch_dispatcher > > > > > > Starting MM as a service makes perfect sense. > > The question is however, how do I find out when to say "enable" the > > modem, > > or to do a simple-connect? I was planning on using the dispatchers > > for all > > of that, to automate all of those. So basically: > > NetworkManager will take care of that, if 'wwan' radios are enabled. > See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, and > as long as your machine has no airplane switch for WWAN (or if it does > the switch enables the WWAN), NetworkManager will enable the modem when > it is discovered by ModemManager and it will be available to connect > with from NetworkManager. > > Recent versions of NetworkManager (1.0.8+) also have support for WWAN > autoconnect, so I don't think you need a dispatcher script here at all. > > > - MM starts > > - modem comes up, status -> Disabled > >- dispatcher kicks in: status -> Enabled > > - dispatcher kicks in: simple-connect > > Dispatcher scripts only trigger on connection up/down, so you don't get > any events on modem status changes. But that shouldn't matter, since > NetworkManager can take care of all of the WWAN connection stuff as > long as ModemManager is up and running (like if its run as a system > service). > > Dan > > > Thanks! > > > > > > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller > > wrote: > > > > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > > > Hi guys > > > > > > > > I'm trying to experiment with NM dispatchers but I can't seem to > > > > get > > > > anything done. I have a very basic script > > > > in /etc/NetworkManager/dispatcher.d/02test: > > > > > > > > #!/bin/sh -e > > > > > > > > echo "Starting ModemManager" > > > > ModemManager --debug & > > > > > > > > But it is not running. I have made sure the scripts and > > > > directories > > > > are executable (a+x). But I cannot seem to get the scripts to > > > > run. > > > > > > > > Can someone help me with this please? > > > > NetworkManager --version > > > > 0.9.4.0 > > > > > > You probably also need to enable a service called NetworkManager- > > > dispatcher or nm-dispatcher. > > > > > > > > > > Question 2: I wanted to use the dispatcher script to start > > > > ModemManager on startup and to enable the 3G modem I have. Can it > > > > be > > > > done? I have seen examples of how to start a connection when an > > > > interface comes up but nothing that could help me with this. > > > > > > It looks very wrong to start ModemManager from a dispatcher script. > > > Those scripts are invoked often and at various times, you don't > > > want to > > > start ModemManager every time something happens with a networking > > > interface. > > > > > > Instead, start ModemManager as a regular system service, just like > > > NetworkManager. > > > > > > > > > Thomas > > > > > ___ > > networkmanager-list mailing list > > networkmanager-list@gnome.org > > https://mail.gnome.org/mailman/listinfo/networkmanager-list > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager dispatchers
On Fri, 2016-02-26 at 10:50 -0800, Ali Nematollahi wrote: > Thanks! > > How to I enable "service called NetworkManager-dispatcher or > nm-dispatcher"? When I search for "dispatcher" in my filesystem only > these > come up: > /etc/NetworkManager/dispatcher.d > /etc/dbus-1/system.d/nm-dispatcher.conf > /usr/share/dbus-1/system- > services/org.freedesktop.nm_dispatcher.service > /usr/lib/NetworkManager/nm-dispatcher.action > /usr/sbin/usb_modeswitch_dispatcher > > > Starting MM as a service makes perfect sense. > The question is however, how do I find out when to say "enable" the > modem, > or to do a simple-connect? I was planning on using the dispatchers > for all > of that, to automate all of those. So basically: NetworkManager will take care of that, if 'wwan' radios are enabled. See 'nmcli radio'. As long as 'nmcli radio' reports WWAN enabled, and as long as your machine has no airplane switch for WWAN (or if it does the switch enables the WWAN), NetworkManager will enable the modem when it is discovered by ModemManager and it will be available to connect with from NetworkManager. Recent versions of NetworkManager (1.0.8+) also have support for WWAN autoconnect, so I don't think you need a dispatcher script here at all. > - MM starts > - modem comes up, status -> Disabled > - dispatcher kicks in: status -> Enabled > - dispatcher kicks in: simple-connect Dispatcher scripts only trigger on connection up/down, so you don't get any events on modem status changes. But that shouldn't matter, since NetworkManager can take care of all of the WWAN connection stuff as long as ModemManager is up and running (like if its run as a system service). Dan > Thanks! > > > On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller > wrote: > > > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > > Hi guys > > > > > > I'm trying to experiment with NM dispatchers but I can't seem to > > > get > > > anything done. I have a very basic script > > > in /etc/NetworkManager/dispatcher.d/02test: > > > > > > #!/bin/sh -e > > > > > > echo "Starting ModemManager" > > > ModemManager --debug & > > > > > > But it is not running. I have made sure the scripts and > > > directories > > > are executable (a+x). But I cannot seem to get the scripts to > > > run. > > > > > > Can someone help me with this please? > > > NetworkManager --version > > > 0.9.4.0 > > > > You probably also need to enable a service called NetworkManager- > > dispatcher or nm-dispatcher. > > > > > > > Question 2: I wanted to use the dispatcher script to start > > > ModemManager on startup and to enable the 3G modem I have. Can it > > > be > > > done? I have seen examples of how to start a connection when an > > > interface comes up but nothing that could help me with this. > > > > It looks very wrong to start ModemManager from a dispatcher script. > > Those scripts are invoked often and at various times, you don't > > want to > > start ModemManager every time something happens with a networking > > interface. > > > > Instead, start ModemManager as a regular system service, just like > > NetworkManager. > > > > > > Thomas > > > ___ > networkmanager-list mailing list > networkmanager-list@gnome.org > https://mail.gnome.org/mailman/listinfo/networkmanager-list ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager dispatchers
Thanks! How to I enable "service called NetworkManager-dispatcher or nm-dispatcher"? When I search for "dispatcher" in my filesystem only these come up: /etc/NetworkManager/dispatcher.d /etc/dbus-1/system.d/nm-dispatcher.conf /usr/share/dbus-1/system-services/org.freedesktop.nm_dispatcher.service /usr/lib/NetworkManager/nm-dispatcher.action /usr/sbin/usb_modeswitch_dispatcher Starting MM as a service makes perfect sense. The question is however, how do I find out when to say "enable" the modem, or to do a simple-connect? I was planning on using the dispatchers for all of that, to automate all of those. So basically: - MM starts - modem comes up, status -> Disabled - dispatcher kicks in: status -> Enabled - dispatcher kicks in: simple-connect Thanks! On Fri, Feb 26, 2016 at 12:36 AM, Thomas Haller wrote: > On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > > Hi guys > > > > I'm trying to experiment with NM dispatchers but I can't seem to get > > anything done. I have a very basic script > > in /etc/NetworkManager/dispatcher.d/02test: > > > > #!/bin/sh -e > > > > echo "Starting ModemManager" > > ModemManager --debug & > > > > But it is not running. I have made sure the scripts and directories > > are executable (a+x). But I cannot seem to get the scripts to run. > > > > Can someone help me with this please? > > NetworkManager --version > > 0.9.4.0 > > You probably also need to enable a service called NetworkManager- > dispatcher or nm-dispatcher. > > > > Question 2: I wanted to use the dispatcher script to start > > ModemManager on startup and to enable the 3G modem I have. Can it be > > done? I have seen examples of how to start a connection when an > > interface comes up but nothing that could help me with this. > > It looks very wrong to start ModemManager from a dispatcher script. > Those scripts are invoked often and at various times, you don't want to > start ModemManager every time something happens with a networking > interface. > > Instead, start ModemManager as a regular system service, just like > NetworkManager. > > > Thomas > ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list
Re: NetworkManager dispatchers
On Thu, 2016-02-25 at 17:16 -0800, Ali Nematollahi wrote: > Hi guys > > I'm trying to experiment with NM dispatchers but I can't seem to get > anything done. I have a very basic script > in /etc/NetworkManager/dispatcher.d/02test: > > #!/bin/sh -e > > echo "Starting ModemManager" > ModemManager --debug & > > But it is not running. I have made sure the scripts and directories > are executable (a+x). But I cannot seem to get the scripts to run. > > Can someone help me with this please? > NetworkManager --version > 0.9.4.0 You probably also need to enable a service called NetworkManager- dispatcher or nm-dispatcher. > Question 2: I wanted to use the dispatcher script to start > ModemManager on startup and to enable the 3G modem I have. Can it be > done? I have seen examples of how to start a connection when an > interface comes up but nothing that could help me with this. It looks very wrong to start ModemManager from a dispatcher script. Those scripts are invoked often and at various times, you don't want to start ModemManager every time something happens with a networking interface. Instead, start ModemManager as a regular system service, just like NetworkManager. 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
NetworkManager dispatchers
Hi guys I'm trying to experiment with NM dispatchers but I can't seem to get anything done. I have a very basic script in /etc/NetworkManager/dispatcher.d/02test: #!/bin/sh -e echo "Starting ModemManager" ModemManager --debug & But it is not running. I have made sure the scripts and directories are executable (a+x). But I cannot seem to get the scripts to run. Can someone help me with this please? NetworkManager --version 0.9.4.0 Question 2: I wanted to use the dispatcher script to start ModemManager on startup and to enable the 3G modem I have. Can it be done? I have seen examples of how to start a connection when an interface comes up but nothing that could help me with this. Thanks ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list