Connection Manager简称connman
ConnMan
核心的逻辑如下:connman维护一个信号标记并且将所有可能连接上的网络服务建成一个列表(分类成普通网络、用户喜欢的以及上次使用的网络)。做为网络服务,它可以是以太网设备,WIFI,WIMAX,或者是远程蓝牙设备(比如手机)。
这个列表的分类和排序是由connman内部实现,没必要由使用它的用户来决定怎么去将网络排序之类的。用户的决定(比如链接WIFI、关闭以太网等等)会通过connman实现,与此同时connman会重新对列表中的网络服务进行排序。
Related articles
ConnMan is a command-line network manager designed for use with embedded devices and fast resolve times. It is modular through a plugin architecture, but has native DHCP and NTP support.
Contents
Installation
Install the connman package. wpa_supplicant and bluez are optional dependencies required for Wi-Fi and Bluetooth functionality respectively.
Before enabling connman.service, ensure any existing network configuration is disabled.
Desktop clients
- cmst — Qt GUI for ConnMan.
- connman-ncurses — Simple ncurses UI for ConnMan; not all of connman functionality is implemented, but usable (with X or from terminal without X), see the wiki.
- connman-notify — Connman event notification client
- https://github.com/wavexx/connman-notify || connman-notifyAUR[broken link: archived in aur-mirror]
- ConnMan-UI — GTK3 client applet.
- connman_dmenu — Client/frontend for dmenu.
- Econnman — Enlightenment desktop panel applet.
- LXQt-Connman-Applet — LXQt desktop panel applet.
- qconnman-ui — Qt management interface used on O.S. Systems products
- https://github.com/OSSystems/qconnman-ui || qconnman-ui-gitAUR[broken link: archived in aur-mirror]
- connman-gtk — GTK client.
- gnome-extension-connman — Gnome3 extension for connman; it contains only some of the functionality without installing connman-gtk.
- https://github.com/jgke/gnome-extension-connman || https://extensions.gnome.org/extension/981/connman-extension/
Usage
This article or section needs expansion.
ConnMan has a standard command line client connmanctl. It can run in 2 modes:
- In command mode commands are entered as arguments to
connmanctlcommand, just like systemctl. - Interactive mode is started by typing
connmanctlwithout arguments. Prompt will change toconnmanctl>to indicate it is waiting for user commands, just like python interactive mode. The interactive mode supports tab completion, which makes finding the correct connection easy.
Wired
ConnMan will automatically handle wired connections.
Wi-Fi
Enabling and disabling wifi
To check if wifi is enabled you can run connmanctl technologies and check for the line that says Powered: True/False. To power the wifi on you can run connmanctl enable wifi or if you need to disable it you can run connmanctl disable wifi. Other ways to enable wifi could include using the Fn keys on the laptop to turn it on or running ip link set <interface> up.
Connecting to an open access point
The commands in this section show how to run connmanctl in command mode.
To scan the network connmanctl accepts simple names called technologies. To scan for nearby Wi-Fi networks:
$ connmanctl scan wifi
To list the available networks found after a scan run (example output):
$ connmanctl services
*AO MyNetwork wifi_dc85de828967_68756773616d_managed_psk
OtherNET wifi_dc85de828967_38303944616e69656c73_managed_psk
AnotherOne wifi_dc85de828967_3257495245363836_managed_wep
FourthNetwork wifi_dc85de828967_4d7572706879_managed_wep
AnOpenNetwork wifi_dc85de828967_4d6568657272696e_managed_none
To connect to an open network, use the second field beginning with wifi_:
$ connmanctl connect wifi_dc85de828967_4d6568657272696e_managed_none
You should now be connected to the network. Check using ip addr or connmanctl state.
Connecting to a protected access point
For protected access points you will need to provide some information to the ConnMan daemon, at the very least a password or a passphrase.
The commands in this section show how to run connmanctl in interactive mode, it is required for running the agent command. To start interactive mode simply type:
$ connmanctl
You then proceed almost as above, first scan for any Wi-Fi technologies:
connmanctl> scan wifi
To list services:
connmanctl> services
Now you need to register the agent to handle user requests. The command is:
connmanctl> agent on
You now need to connect to one of the protected services. To do this easily, just use tab completion for the wifi_ service. If you were connecting to OtherNET in the example above you would type:
connmanctl> connect wifi_dc85de828967_38303944616e69656c73_managed_psk
The agent will then ask you to provide any information the daemon needs to complete the connection. The information requested will vary depending on the type of network you are connecting to. The agent will also print additional data about the information it needs as shown in the example below.
Agent RequestInput wifi_dc85de828967_38303944616e69656c73_managed_psk
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase?
Provide the information requested, in this example the passphrase, and then type:
connmanctl> quit
If the information you provided is correct you should now be connected to the protected access point.
Settings
Settings and profiles are automatically created for networks the user connects to often. They contain fields for the passphrase, essid and other information. Profile settings are stored in directories under /var/lib/connman/ by their service name. To view all network profiles run this command from root shell:
# cat /var/lib/connman/*/settings
/var/lib/connman-vpn/.Technologies
Various hardware interfaces are referred to as Technologies by ConnMan.
To list available technologies run:
$ connmanctl technologies
To get just the types by their name one can use this one liner:
$ connmanctl technologies | awk '/Type/ { print $NF }'
Type = tech_name provides the technology type used with connmanctl commandsTo interact with them one must refer to the technology by type. Technologies can be toggled on/off with:
$ connmanctl enable technology_type
and:
$ connmanctl disable technology_type
For example to toggle off wifi:
$ connmanctl disable wifi
rfkill or bluetoothctl to (un)block devices, yet hardware keys may still work.[1] Always use connmanctl enable|disableConnection Manager简称connman的更多相关文章
- Remote Desktop Connection Manager
通过Remote Desktop Connection Manager(RDCMan),当前最新版本是 v2.7. 通过这款软件,我们便可以轻松的管理和访问数个RDP.左边的列表中我们可以创建总的分区 ...
- vpn找不到设备,win7建立新的VPN总时显示错误711,无法启动 Remote Access Connection Manager 及 Remote Access Auto Connection Manager 错误1068
试试相关服务!一.remote access connection manager是网络连接的服务,它依赖于Technology服务,现在你的这个服务已经启动,而Secure Socket Tunne ...
- Remote Desktop Connection Manager (RDCMan)
当前最新版本是 v2.7. 通过这款软件,我们便可以轻松的管理和访问数个RDP.左边的列表中我们可以创建总的分区列表(即 RDCMan Group),该列表保存采用的是RDG扩展名,使用时通过&quo ...
- Remote Desktop Connection Manager (RDCMan) 介绍
Remote Desktop Connection Manager介绍 Remote Desktop Connection Manager (RDCMan) 是微软Windows Live体验团队的主 ...
- Remote Desktop Connection Manager介绍
Remote Desktop Connection Manager (RDCMan) 是微软Windows Live体验团队的主要开发者 Julian Burger开发的一个远程桌面管理工具.简称为R ...
- Remote Desktop Connection Manager 多个远程管理
http://www.microsoft.com/en-us/download/details.aspx?id=21101 Remote Desktop Connection Manager 多个远程 ...
- openfire研究之部署连接管理器(connection manager)
http://blog.sina.com.cn/s/blog_7325f5150101bafh.html 一. Openfire Connection Manager 简介 Openfire Conn ...
- [OS] 修改屏幕分辨率(用Remote Desktop Connection 或者 用工具:Remote Desktop Connection Manager)
用Remote Desktop Connection Remote Desktop Connection Manager
- Mismatched locale IDs. The component locale ID (2052) does not match the connection manager locale ID (2057)
Snapshot: When using the 'Flat File Source' and 'OLE DB Destination' or something else components to ...
随机推荐
- NET 5 依赖注入多个服务实现类
依赖注入在 ASP.NET Core 中起中很重要的作用,也是一种高大上的编程思想,它的总体原则就是:俺要啥,你就给俺送啥过来. 服务类型的实例转由容器自动管理,无需我们在代码中显式处理. 因此,有了 ...
- 检验实时3D像素流送平台好坏的七个标准!(上)
将交互式3D像素流送技术作为有价值的企业工具之后,就该寻找像素流送服务供应商了.问题在于交互式3D像素流送是一种新兴技术,因此很难知道要问供应商的正确问题.在开始使用之前,这里有7个问题,您应该从候选 ...
- React Hook 入门使用
React Hook 是什么 1.没有比官网说的更好的 HOOK 1. React Hook 官方 2. 用我们自己的话说,它是一个钩子函数,用来处理组件间的状态的一个方法,暂时理解为一个高阶函数吧. ...
- 英特尔® 图形性能分析器(Intel® GPA)
英特尔图形性能分析器概述 英特尔 GPA 是一套软件工具,它能提供平台级游戏性能分析功能,优化应用性能. 英特尔 GPA 包含以下组件: 英特尔 GPA 监控器 - 将英特尔 GPA 连接至应用(处于 ...
- 【Go】四舍五入在go语言中为何如此困难
四舍五入是一个非常常见的功能,在流行语言标准库中往往存在 Round 的功能,它最少支持常用的 Round half up 算法. 而在 Go 语言中这似乎成为了难题,在 stackoverflow ...
- 再看C语言-算法
通常一个程序包括算法.数据结构.程序设计方法及语言工具和环境这四个方面.其中算法是核心,算法就是解决"做什么"和"如何做"的问题.算法是程序的灵魂,项目中如果接 ...
- 整合.NET WebAPI和 Vuejs——在.NET单体应用中使用 Vuejs 和 ElementUI
.NET简介 .NET 是一种用于构建多种应用的免费开源开发平台,例如: Web 应用.Web API 和微服务 云中的无服务器函数 云原生应用 移动应用 桌面应用 1). Windows WPF 2 ...
- Redis学习之路(三)常用命令总结
一.集群 查看Redis集群有多少个库 192.168.200.100:7001> config get databases 1) "databases" 2) " ...
- Solon rpc 之 SocketD 协议
1. 简介 SocketD 是一种二进制的点对点通信协议,是一种新的网络通信第七层协议.旨在用于分布式应用程序中.从这个意义上讲,SocketD可以是RSocket等其他类似协议的替代方案.它的消息协 ...
- 容器编排系统K8s之APIService资源
前文我们聊到了k8s上crd资源的使用和相关说明,回顾请参考:https://www.cnblogs.com/qiuhom-1874/p/14267400.html:今天我们来了解下k8s的第二种扩展 ...