Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

sol-connman: Add sol-connman basic API #1935

Closed
wants to merge 13 commits into from

Conversation

wzhen12
Copy link
Contributor

@wzhen12 wzhen12 commented Apr 26, 2016

so-connman is for implementing connection manager features.
The APIs should be implemented in Zephyr, connman and so on.

The patches are for implementing sol-connman basic APIs to connman.
the connman D-Bus APIs are wrapped in the so-connman APIs.
The user can use the so-connman APIs to control connman.

Signed-off-by: Wu Zheng [email protected]

@wzhen12
Copy link
Contributor Author

wzhen12 commented Apr 26, 2016

To test cases, I will add more complicate cases (including connection/disconnection) after implementing the agent of connman.

@wzhen12
Copy link
Contributor Author

wzhen12 commented Apr 26, 2016

According to the comments of #1905 ,
the related issues have been fixed.
It is the version 3 of sol-connman.

  1. Modify the brief of sol connman header file.
  2. Modify the name sol-connman.h to sol-netctl.h
  3. Add the sol connman error.
  4. Modify malloc to calloc.
  5. Get manager/get service properties only is triggered once in add monitor.
  6. Other

Please check it. Thanks.

@@ -16,6 +16,16 @@ config DTLS

If unsure, say N.

config CONNMAN

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

must rename this to NETCTL too :-) and the FEATURE_CONNMAN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay

@barbieri
Copy link

Almost there. Since you're very close to merge and I'm kinda busy and taking long to review, I suggest you start to work on src/modules/flow/netctl/ and provide a src/samples/flow/netctl or something like that, try to test all API, like a way to list the services, choose one and connect/disconnect, like https://github.com/solettaproject/soletta/tree/master/src/samples/flow/power-supply (if you can find a better sample, then great :-D)

@wzhen12
Copy link
Contributor Author

wzhen12 commented Apr 27, 2016

I will investigate the example. Thanks.

@wzhen12
Copy link
Contributor Author

wzhen12 commented May 4, 2016

Sorry, I am ready for Malaysia training.
I will start the task and submit the related patches after then.
Thanks.

so-connman is for implementing connection manager features.
The APIs should be implemented in Zephyr, connman and so on.
To connman, the connman D-Bus APIs are wrapped in the so-connman
APIs. The user can use the so-connman APIs to control connman.

To invoke the D-Bus method of connman, the async call is used,
the callback function is set to get the results of async call.

The basic so-connman APIs are in the patch.
It provides the APis of getting the name, ip address... of services.
The service connect/disconnect APIs and set/get offline
are implemented too.

The further sol-connman APIs are being planned.

Signed-off-by: Wu Zheng <[email protected]>
wzhen12 added 10 commits May 18, 2016 12:26
Get the service properties APIs are implemented.
It based on connman and wraps the D-Bus APIs of connman services.
Get the name, state, type, ip address ... of services are done.

Signed-off-by: Wu Zheng <[email protected]>
sol-connman init/shutdown are implemented.
It based on connman and wraps the D-Bus APIs of connman.
init/shutdown are not true to init/shutdown sol-connman.
init_lazy/shutdown_lazy are true to init/shutdown sol-connman.

Signed-off-by: Wu Zheng <[email protected]>
sol-connman set offline are implemented.
It based on connman and wraps the D-Bus APIs of connman.
It sets the connman to offline mode.
It will close the all connection interfaces(including ethernet ...).

Signed-off-by: Wu Zheng <[email protected]>
Get connection manager state is implemented.
It based on connman and wraps the D-Bus APIs of connman.
Get connection manager state are from connman.
It includes online, ready, offline, idle.

Signed-off-by: Wu Zheng <[email protected]>
Get services properties is implemented.
It based on connman and wraps the D-Bus APIs of connman.
It only is invoked internal and in the process of init lazy.
Get services properties APIs can't invoke the D-Bus APIs of connman directly.

Signed-off-by: Wu Zheng <[email protected]>
add/del monitor are implemented.
It based on connman and wraps the D-Bus APIs of connman.
Monitor the connman services and connection manager state changed.

Signed-off-by: Wu Zheng <[email protected]>
callback are implemented.
It based on connman and wraps the D-Bus APIs of connman.
When add Monitor, callback function is registered.
when any services properties and connection manager state are changed,
the callback function can be invoked to notify the info.

Signed-off-by: Wu Zheng <[email protected]>
Network devices connect/disconnect are implemented.
It based on connman and wraps the D-Bus APIs of connman.

Signed-off-by: Wu Zheng <[email protected]>
Get services list are implemented.
It based on connman and wraps the D-Bus APIs of connman.
The user can use the API to get services list.

Signed-off-by: Wu Zheng <[email protected]>
Add sol-connman to compile files, so that sol-connman can be compiled.

Signed-off-by: Wu Zheng <[email protected]>
The test cases will test sol-connman APIs

Signed-off-by: Wu Zheng <[email protected]>
The init and shutdown process of sol-connman need add to the
init and shutdown process of sol-comms.

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12 wzhen12 closed this May 20, 2016
@wzhen12
Copy link
Contributor Author

wzhen12 commented May 20, 2016

The next version is in #2068

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants