This repository was archived by the owner on Jun 27, 2019. It is now read-only.
Add the Bluetooth agent API (for BlueZ)#2053
Closed
vcgomes wants to merge 4 commits intosolettaproject:masterfrom
Closed
Add the Bluetooth agent API (for BlueZ)#2053vcgomes wants to merge 4 commits intosolettaproject:masterfrom
vcgomes wants to merge 4 commits intosolettaproject:masterfrom
Conversation
The sol-gatt API has changed, so we must keep the none implementation up to date so it at least compiles. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The agent will be used when request user input, necessary mostly when pairing. The API is heavily based on the Zephyr's API, which maps nicely to the BlueZ D-Bus API. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The agent will allow to user input to be handled so pairing procedures and the user can properly authorize and provide input. In Bluetooth, depending on the input/output capabilities of the device the pairing may use different procedures with different security characteristics, the choice of the input/output capabilities with the agent API depend on which of the agent callbacks are implemented. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
This sample tries pairing with the device (if provided) implementing only the pairing_confirm() callback, which means that the capabilties would be equivalent to a device which implements the "DisplayYesNo" capability. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
|
|
||
| SOL_API int | ||
| sol_bt_conn_pair(struct sol_bt_conn *conn, | ||
| void (*cb)(void *user_data, bool success, struct sol_bt_conn *conn), |
There was a problem hiding this comment.
I wonder if we can have an integer success/status variable to indicate a broader range of errors
Contributor
Author
There was a problem hiding this comment.
From what I could gather from the Zephyr API, there's no way to give more information than that.
Contributor
Author
|
The new (and improved) version is at #2074, closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the concept of an agent, that will serve to receive input from the user during the pairing process primarily.
The API is pretty similar to what Zephyr provides, which is based on the BlueZ D-Bus API, so this should map pretty well to both.
When reviewing, please see if the approach of the
sol_bt_agent_reply_*family of functions is easy to understand.