LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2024, 01:22 AM   #1
linuxuser371038
LQ Newbie
 
Registered: Jan 2024
Posts: 25

Rep: Reputation: 0
Is nmcli/network manager worth it (in terms of bloat) and/or how to achieve the same with wvdial for my mobile internet connection


I think the main gaps in my general understanding of networking are around routing and how IP addresses are issued in the system regardless of network interface - wired, wifi, mobile.

I had been banging my head against a wall all day trying to get wvdial to work with my 3g dongle following the archwiki: https://wiki.archlinux.org/title/Wvdial which is rather sparse.

I had edited the wvdial config file and was getting the error of No carrier. Somehow I managed to figure out I was using the wrong tty interface (0 instead of 2) which I think I garnered by looking at mmcli info and it showed main interface to be the latter.

Ok so then I change that in the wvdial conf file and then was able to get a connection and a bunch of output on the terminal which was gibberish to me.

I took that as a good sign however there was a problem in that there was no internet still and it seemed the problem was that an IP address had not been issued. Not sure what led me to this conclusion at the time but I do know dhcpcd was running as standard on my system so don't know what was missing to prevent it from being issued.

Due to the anorectic documentation generally for mobile internet connections I was at a loss how to complete that step to tie it together.

So I did some more searches on how to bring a mobile dongle online and found another article which used network manager/nmcli instead; namely this article: https://ubuntu.com/core/docs/network...ar-connections

I stopped any services related to the previous attempts and started again following that which uses network manager and lo and behold I was able to get it to work.

The missing pieces to bring it up seemed to be these two lines:

Code:
$ nmcli c add type gsm ifname <interface> con-name <name> apn <operator_apn>
$ nmcli r wwan on
I had not used network manager with any regularity before due to preferring the simplest solutions (some small profile for wired and wpa_supplicant more recently for wifi) and just making a small shell script to bring up relevant interfaces. I am wondering is network manager/nmcli worth having around despite being quite large compared to simple, individual, scripting options. If so why? Also I would like to know how to achieve the same with wvdial bearing in mind the problem I believe is that I was able to get a connection with wvdial but was not able to get ip routing to work with it.

The above nmcli commands somehow was able to set that all up for me so I am trying to better understand how it did it for general edification but also to be able to attempt with other programs should I choose to.

Unless people give good reasons to stick with network manager I think all other things being equal I would prefer individual solutions as I have done up to now. I am only using it right now as that is the only thing I got to work so far with the mobile connection. It also wiped my /etc/resolv.conf (historically I would make it immutable when programs would try to do that but not sure if that would mess up network manager's usual operation and still don't understand why certain programs do this so more understanding required here too) which I am not fond of, since the programs that change them would break the functionality of other ones that want to use it, often leaving a blank file behind (again would like to know what is up with this too if anyone can comment as an aside), and took me a little to figure out that was the issue as to why my wifi connection stopped working after having installed network manager.

Last edited by linuxuser371038; 04-19-2024 at 01:37 AM.
 
Old 04-19-2024, 08:58 AM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 780

Rep: Reputation: 248Reputation: 248Reputation: 248
My first internet connection with Linux was a PPP connection (with a Winmodem with no native support besides), which I tried to make easier with dialer front-ends like wvdial. They never worked correctly. In the end, I used pppd directly. Your time might be better spent filling out the files in /etc/ppp. I don't use NM currently.
 
1 members found this post helpful.
Old 04-19-2024, 09:05 AM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,374

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
My reason for sticking with Network Manager is that it is actively maintained, while wvdial has been archived since 2017.
 
1 members found this post helpful.
Old 04-25-2024, 10:39 AM   #4
linuxuser371038
LQ Newbie
 
Registered: Jan 2024
Posts: 25

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by allend View Post
My reason for sticking with Network Manager is that it is actively maintained, while wvdial has been archived since 2017.
Yes NM working nicely now I have gotten more used to the syntax and flow of things. Once I worked out how to get the reliable naming format of interfaces back by deleting iwd which comes with arch now things were a lot simpler!

Got both wifi and mobile connections working reliably (touch wood) now. Only thing with the modem is it seems to take a while to 'fire up'. The modem will not be recognized for sometimes a couple of minutes but once it goes up seems to be ok then.

NM does not feel like unnecessary bloat now and is just feels like a nice high level manager doing what it says on the tin. Reminds me quite a bit of python in that sense.

Last edited by linuxuser371038; 04-25-2024 at 10:41 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can nmcli device status but cannot nmcli connection up redhatwannabe Linux - Networking 4 09-27-2021 02:29 AM
nmcli connection questions chickenjoy Linux - Networking 6 11-08-2017 01:40 AM
Help with wvdial. Have wvdial not dial and wait till handshake. dragos240 Linux - Networking 2 01-14-2011 08:04 AM
GSM mobile internet connection using wvdial basheer Ubuntu 1 05-07-2010 05:59 AM
[SOLVED] Adding wvdial to start menu/desktop, running wvdial without shell. Mogget Linux - Desktop 1 08-07-2009 02:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration