Connman introduction

Btw: I decide to write my techinical blog in English to save up my time. I always need to ‘translate’ them back to Chinese word in my brain. ;-). There’re too many things that I can write related with oFono/Connman/BlueZ…

Connman is a lightweight connection manager that target in the Embedded system like MID (mobile internet device), handset and tablet. It is created by Intel&Nokia in 2009. The latest release of connman is 0.60 and it has been adopted into Meego, Google Chrome OS, Ubuntu 10.10 Netbook edition and other distribution.

Why Connman is better than Network-manager?

There’re lots of legacy components in network manager. NM is heavy weight and exposes some unnessary interface to the end user. Connman is designed to hide those complexies and be a light weight, faster, smaller daemon for the embedded market.

Build & Install connman

git clone git://git.kernel.org/pub/scm/network/connman/connman.git

./bootstrap && /
    ./configure --enable-ethernet=builtin /
        --enable-wifi=builtin /
        --enable-dhclient=builtin /
        --enable-bluetooth=builtin /
        --enable-loopback=builtin /
        --enable-dnsproxy=builtin /
        --enable-ofono=builtin /
        --enable-openconnect=builtin /
        --enable-threads /
        --localstatedir=/var /
        --prefix=/usr /
        --with-openconnect=/usr/bin/openconnect /
        --enable-tools /
        CFLAGS='-Werror -Wall'

make; sudo make install

or you can install connman directly from respository. E.g., from my Ubuntu 9.10, I can install connman:

sudo apt-get install –y connman connman-dev connman-gnome

What does Connman have?

As a network manager, it supports ethernet, wifi, Bluetooth PANU, WiMax, 3G data connection, VPN and other various connection methods.

image

Connman can be divided into three parts: core, plugins and libs. Plugins implement various plugin for different device, like wifi, ethernet etc. Libs provide extra/common functionality that requires for specific connections, like Wifi, DHCP etc.

 

Device

Connman is based on device mode, which means it replies on udev to detect and create device instance at runtime. Meanwhile, it loads all supported device driver at start up. Once a new device is detected, it tries to scan the device tree to find a matchable driver and invoke probe(), enable(), disable() method to complete operations on different devices.

Device->Network->Service

image

Device: A physical device that is detected by kernel and recognized by udev

Network: A network instance from this device. It could be 1:N relationship. For instance, a wifi device could detect many available wireless gateway.

Service: An active network that provide connected service.

struct connman_device_driver {
    name;
    type;
    probe();
    remove();
    enable();
    disable();
}

struct connman_network_driver {
    name;
    type;
    probe();
    remove();
    connect();
    disconnect();
    setup();
}

Service manage

image

 

Summary

Connman is working closely with oFono/BlueZ and other Linux component to provide connection service. It supports IPv4, IPv6, VPN, multiconnections and lots of other features. It is a promosing project that still under heavy development.

 

Reference

[1] http://connman.net/

[2] git://git.kernel.org/pub/scm/network/connman/connman.git

[3] https://wiki.ubuntu.com/ConnMan

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值