WiNet Architecture

From Tizen Wiki
Jump to: navigation, search

This document is still in draft mode. Some section content may change.

About New Tizen WiNet(WiFi & Network) Framework

Welcome to the New Tizen WiNet Framework Architecture wiki.

WiNet Framework is the core middleware of TIZEN WiFi & Network. TIZEN is the OS of everything, and it needs to provide middleware with high performance, low memory consumption, clear design, good extensibility, and easy to develop apps basing on it. But currently on TIZEN, different WiFi & network related features are implemented in different daemons and libraries, which can’t meet the requirements mentioned above. New WiNet Framework aims to unify all the related features in the middleware with a much more clear/simple design, it will provide unified and simplified CAPI interfaces and make d-bus operations transparent, provide TIZEN specific operations which can't be merged into ConnMan and wpa_supplicant, be easier to extend, maintain and port to other TIZEN verticals, also it will save many daemons and improve the performance a lot. So New WiNet Framework is a more competitive middleware for TIZEN.

The New Tizen WiNet Framework Architecture wiki is used for showing the WiNet Architecture and the related documents.

WiNet Framework Role

The following picture show the role of WiNet Framework on Tizen
Tizen-WiFi-Stack.png

WiNet Framework Role in Tizen

1.Provides Simple, Uniform, Stable CAPI interface for Apps/UI
2.Integrates ConnMan into Tizen elegantly and Handles Tizen specific WiFi & Network operations

  • Easy to maintain, extend
  • High performance, low memory consumption

3.Easily to port to different verticals/branch/Platform

WiNet Architecture

Old Tizen WiNet Framework

The following picture is Old WiNet Framework Architecture

Old-WiNet-Framework-Architecture.png

The Old WiNet Framework needs to be improved

1.Over complicated, performance issue, maintaining issue
2.Difficult to port to other Tizen verticals or branches

  • Verticals/branches may have different apps/UI, vconf, configure …

3.No unified interface for apps/UI

  • Some apps call CAPI; while others access libnet-client
  • Apps/UI are not easy to write and maintain

4.Libnet-client uses Dbus-glib, which has been replaced by GDbus lib

New Tizen WiNet Framework

The following picture is New Tizen WiNet Framework Architecture

New-WiNet-Framework-Architecture.png

New Design Philosophy
1.Unified CAPI for Apps/UI
2.All Tizen specific non-UI functions are merged in WiNet-service daemon
3.Apps/UI access ConnMan directly
4.ConnMan-lib facilitates ConnMan services access

  • Hide the DBus operation details
  • Easily to migrate to new version of ConnMan

5.Vertical plugin

  • Easy to port to other vertical/platform

Comparasion between two WiNet frameworks

The operation of New Tizen WiNet Framework is more simple than the old one.
WiNet-Framework-Comparison.png


Current Development Status

0.1 version is released, and it supports the basic Tethering and WiFi Station feature, now we are working on multi-user support, some CAPI adaption and the WiFi P2P feature.

ConnMan lib:

  • WiFi Station feature is done.
  • Tethering feature is done.
  • WiFi Direct feature is on-going.

WiNet Service Daemon:

  • HLD done.
  • Framework of network-service has been setup. mainly about Tethering, Agent modules.
  • Platform plugins enabled, and a platform-geek plugin has been added.
  • Main interface Agent has been implemented.

CAPI adaption implementation:

  • Tethering CAPI: Most of them are completed, others are supposed to be done soon.
  • WiFi Station CAPI: Most of them are completed, others are supposed to be done soon.
  • Connection CAPI: Not started yet.
  • WiFi Direct CAPI: Not started yet.

How to Get New WiNet Framework Source Code

From the introduction above, New WiNet framework is composed by 3 layers, ConnMan-lib, WiNet service daemon and CAPI layer, and the related source codes have been merged into tizen.org repo, and you can git clone them from the locations below:

1. ConnMan-lib:

platform/core/connectivity/connman-lib    (tizen_devel branch)

2. WiNet service daemon:

platform/core/connectivity/winet-service  (tizen_devel branch)

3. CAPI:

CAPI layer contains several packages, which provide WiNet related features to upper layer, such as wifi station, tethering, connection, wifi direct and so on. Currently we have completed most of the CAPI adaption of wifi station and tethering, and you can get the code from:

platform/core/api/wifi                    (tizen_devel branch)
platform/core/api/tethering               (tizen_devel branch)

How to Test New WiNet Framework

WiNet framework is composed by 3 layers, so that it provides test program at every layer. When we build the related source code successfully by gbs, a test package will be created as well, and we can install the test package to the target device to test the related of WiNet framework. And the test steps for different layers are introduced below:

   Note: For QA, generally it is OK to only test the CAPI layer to verify WiNet framework related features,
         for if it can work from CAPI layer, it means winet service dameon and connman-lib layer can work as well,
         these 2 layers test cases are mainly used by developers for debugging.

1. ConnMan-lib:

   1). Install the ConnMan-lib package: connman-lib-xxx.rpm to the target device.
   2). Install the ConnMan-lib test package: connman-lib-test-xxx.rpm to the target device.
       When this test package is installed, it will copy a test program "connman-lib-test"
       to the folder: /usr/lib/connman/connman_lib_test/.
   3). Run the test program: connman-lib-test.
       Input "help", it will show the related test cases defined in the test program, then you can test them one by one.
   Note: Please make sure that ConnMan is running when you make connman_lib test.

2. WiNet service daemon:

   1). Install the winet service daemon package: winet-xxx.rpm to the target device.
   2). Install the winet service lib package: winet-lib-xxx.rpm to the target device.
   3). Install the winet service test package: winet-test-xxx.rpm to the target device.
       When this test package is installed, it will copy 2 test programs
       "test-winet" and "winet-lib-test" to the folder: /usr/lib/winet/test/.
   4). Reboot system.
   5). Run the test program: test-winet to test winet service daemon,
       and it will show the related test cases defined in the test program, then you can test them one by one.
   6). Run the test program: winet-lib-test to test winet service lib,
       and it will show the related test cases defined in the test program, then you can test them one by one.
   Note: Please make sure winet service daemon is running when you make winet service daemon test.

3. CAPI:

a). wifi station capi:

   1). Install the Wifi station CAPI package: capi-network-wifi-xxx.rpm to the target device.
   2). Install the ConnMan-lib test package: capi-network-wifi-test-xxx.rpm to the target device.
       When this test package is installed, it will copy a test program "capi-wifi-test"
       to the folder: /usr/lib/winet-capi-test/.
   3). Run the test program: capi-wifi-test.
       Input "help", it will show the related test cases defined in the test program, then you can test them one by one.

b). tethering capi:

   1). Install the tethering CAPI package: capi-network-tethering-xxx.rpm to the target device.
   2). Install the ConnMan-lib test package: capi-network-tethering-test-xxx.rpm to the target device.
       When this test package is installed, it will copy a test program "capi-tethering-test"
       to the folder: /usr/lib/winet-capi-test/.
   3). Run the test program: capi-tethering-test.
       Input "help", it will show the related test cases defined in the test program, then you can test them one by one.
   Note: Please make sure ConnMan and winet service daemon are running when you make capi layer test.

Links

Multi-user WiNet