LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-11-2015, 05:41 PM   #1
ferite
Member
 
Registered: Jul 2014
Posts: 30

Rep: Reputation: Disabled
Command line application for managing wireless and 3G connections


Hi.

I am in the need of managing Wireless and 3G connections only by using commands on my Ubuntu minimal system, so I would like to know if is there some application or utility that already does that.

Specifically I need:

Regarding wireless connections:

1. Submit a command that outputs available connections or SSIDs.
2. Upon a given SIDD name, security type, encryption type and password, submit a "Connect" command that tries to establish a connection, and give a feedback of the operation result.
3. Submit a command that outputs the current status of the active wireless connection, if any.


Regarding 3G connections:

1. Given a dial number, APN, username and password, submit a "Connect" command that tries to establish a connection and give the feedback of the operation result.
2. Submit a command that outputs the current status of the active 3G connection, if any.

Of course, the start point for the two cases is that there is a properly configured wireless adapter and 3G modem, with an active SIM card.

The solution I'm searching for, is for my minimal Ubuntu 14.04. So I got no graphic interface, and all things have to be installed with apt-get.

Thanks for reading and your valuable help.
 
Old 03-12-2015, 02:40 PM   #2
mjolnir
Member
 
Registered: Apr 2003
Posts: 815

Rep: Reputation: 99
http://manpages.ubuntu.com/manpages/...1/nmcli.1.html
nmcli is the app I use:

Code:
carl@Wizard:~$ sudo nmcli con up id 'Verizon connection'
Code:
carl@Wizard:~$ nmcli conn
NAME                      UUID                                   TYPE              TIMESTAMP-REAL                    
Wired connection 1        26f980f1-1dbd-462b-a2cd-e56d8e794550   802-3-ethernet    Thu 12 Mar 2015 12:09:02 PM CDT   
Verizon MiFi2200 18FE     e450a094-27f4-4e5e-b68d-fe1ac3767b91   802-11-wireless   Wed 18 Feb 2015 09:13:09 AM CST   
Bushart                   84d76e2d-2a1d-438f-8aab-5a0491ca914a   802-11-wireless   never                             
AndroidAP                 6412dbd3-b15c-49ab-81b2-edd56810048a   802-11-wireless   Thu 20 Nov 2014 09:44:22 AM CST   
Greg's Phone              11295388-b262-4e70-b0f6-7fc08c23596d   802-11-wireless   never                             
Bushart Trucking          23781d57-cb74-4812-9cb9-6297f5633866   802-11-wireless   Tue 10 Mar 2015 07:27:59 AM CDT   
Jackson house             12cbd8de-b922-48b6-94de-2ae190befd79   802-11-wireless   never                             
Verizon connection        04c59da6-6729-4856-90ab-b9f87bcb7a06   cdma              Thu 12 Mar 2015 02:31:36 PM CDT   
BushartTrucking           09cc13ae-18ed-43a5-8b50-969a8a68d3d7   802-11-wireless   never
...will tell you what connections are available.
 
Old 03-12-2015, 02:45 PM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,790

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Network Manager provides CLI tools for servers without graphical environments. In particular, 'nmcli' can be used to control connections

List connections
Code:
nmcli c
Check status of active connection(s) eg
Code:
nmcli c status
NAME UUID DEVICES DEFAULT VPN MASTER-PATH
HOME bd1a6207-2ee7-4b2f-b0f8-6d266c47a748 wlan0 yes no --
For more info, do
Code:
nmcli c status id HOME
Start my 3G connection
Code:
nmcli c up id "3G_TNZ"
Stop it with
Code:
nmcli c down id "3G_TNZ"
New connections can also be defined using
Code:
nmcli con edit....
For more info
Code:
man nmcli
There is also cnetworkmanager (a CLI client for NetworkManager) available if you prefer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] managing directories of multiple linux OSs simultaneously from command line textillis Linux - Newbie 5 06-13-2013 07:20 PM
LXer: Establishing wifi connections from the command line LXer Syndicated Linux News 0 04-29-2012 06:50 AM
LXer: Drush: Managing Drupal from the Command Line LXer Syndicated Linux News 0 01-31-2012 07:40 PM
LXer: Managing LDAP from the Command Line on Linux LXer Syndicated Linux News 0 11-02-2010 05:50 AM
LXer: Managing wireless connections seamlessly with wicd LXer Syndicated Linux News 1 07-31-2007 05:10 PM

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

All times are GMT -5. The time now is 01:46 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