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

comms: Add so-netctl API #2087

Closed
wants to merge 13 commits into from
Closed

Conversation

wzhen12
Copy link
Contributor

@wzhen12 wzhen12 commented May 24, 2016

so-netctl 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-netctl
APIs. The user can use the so-netctl 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-netctl 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-netctl APIs are being planned.

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

so-netctl 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-netctl
APIs. The user can use the so-netctl 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-netctl 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-netctl APIs are being planned.

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12 wzhen12 changed the title comms: Add so-connman API comms: Add so-netctl API May 24, 2016
@wzhen12
Copy link
Contributor Author

wzhen12 commented May 24, 2016

According to the comments of #2068,
the related issues have been fixed.
It is the version 5 of sol-netctl.

  1. Modify the all connman to netctl
  2. Modify the help comments.

Please check it. Thanks.

"data_type": "string",
"description": "Name of network AP.",
"methods": {
"process": "set_disconnect_ap_name"

Choose a reason for hiding this comment

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

no reason why keep _ap_ here, refer all as service for consistency.

@barbieri
Copy link

+1 on the C API, it's ready to be merged.

The flow needs more work. You can chose to merge the C API and keep working only in the FBP, or wait until FBP is ready to merge them all together.

depends on FEATURE_NETCTL && NETWORK
help
This provides the connection manager interfaces API.
The user can use the connection manager APIs to contorl
Copy link
Contributor

Choose a reason for hiding this comment

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

s/contorl/control/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

@ceolin
Copy link
Contributor

ceolin commented May 24, 2016

the C api is good for me as well

@glima
Copy link

glima commented May 25, 2016

The proposed nodes and ports LGTM

wzhen12 added 2 commits May 30, 2016 14:10
Get the service properties is 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-netctl 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-netctl.
init_lazy/shutdown_lazy are true to init/shutdown sol-netctl.

Signed-off-by: Wu Zheng <[email protected]>
wzhen12 added 7 commits May 30, 2016 14:17
sol-netctl set offline is 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 is 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 monitors functions are implemented.
It based on connman and wraps the D-Bus APIs of connman.
After add the monitors, the connman services and connection
manager state are monitored.
After del the monitors, the related network info can't be monitored.

Signed-off-by: Wu Zheng <[email protected]>
Monitor callback functions are implemented.
It based on connman and wraps the D-Bus APIs of connman.
When Netctl monitor is added, callback function need to be registered.
when any services properties and connection manager state are changed,
the callback functions can be invoked to notify the related 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 is 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-netctl build files, so that sol-netctl API can be built.

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12 wzhen12 closed this May 30, 2016
The test cases will test sol-netctl APIs

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12
Copy link
Contributor Author

wzhen12 commented May 30, 2016

The next version is #2108.

@wzhen12
Copy link
Contributor Author

wzhen12 commented May 30, 2016

Please check #2108.

The init and shutdown process of sol-netctl need to be added to
the init and shutdown process of sol-comms.

Signed-off-by: Wu Zheng <[email protected]>
@guchaojie
Copy link
Contributor

Sorry for late reply, I am busy with QA connectivity test transfer work , I work on it and sumbit PR ASAP

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.

5 participants