solettaproject / soletta

Soletta Project is a framework for making IoT devices. With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.
http://solettaproject.org
Apache License 2.0
225 stars 108 forks source link

comms: Add sol-netctl agent API V3 #2303

Closed wzhen12 closed 8 years ago

wzhen12 commented 8 years ago

The agent is necessary in the process of network connection, that will receive input information from the user and send it to the network(such as AP and so on).

The API is based on connman D-Bus APIs, it provides register agent, input login information and so on netctl agent API.

Signed-off-by: Wu Zheng wu.zheng@intel.com

wzhen12 commented 8 years ago

The Version 3 of Add sol-netctl agent API.

  1. Modify the version 2 errors. (#2297)
  2. At current, scan feature only exists in wifi plugin in connman. The other technology plugins don't exist scan feature. Therefore, at current, wifi scan is the all technology scan. And the scan feature isn't modified in the patch.
  3. In the patches, the vector isn't released in sol_netctl_request_input API interfaces. The suggestion of Gustavo has been implemented, the system vector only provides the types of inputs. The user will create the new vector and add the all items to the vector. (including input, type and so on) At the same time, the user will release the new vector too. You can check the agent sample for how to use it.
  4. ptr_vector has been replaced by vector.
  5. WPS, Passphrase, Identity, username, password. a. It has been checked in _agent_input_properties. b. In the function of _agent_input_properties, wether the input item exists in vector or not can't be checked. (connman has done for it) c. wether the wps item has been got or not can be checked. if wps has been got, we will ignore the other items (such as Identity, passphrase and so). d. username and password will not be got with passphrase, Identity at the same time. Therefore, we don't care about username and password/passphrase and Identity. e. passphrase and Identity can be got at the same time. Therefore, we don't care about passphrase and Identity. More cases? Any suggestions? Thanks.

@cabelitos @barbieri Please check it.

wzhen12 commented 8 years ago

The compiling is failure. It is the format issue. It will be fixed in other patch.