-
Notifications
You must be signed in to change notification settings - Fork 8k
Bluetooth: Classic: Enable BIP features #95534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lylezhu2012
wants to merge
10
commits into
zephyrproject-rtos:main
Choose a base branch
from
nxp-upstream:classic_enable_bip
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bluetooth: Classic: Enable BIP features #95534
lylezhu2012
wants to merge
10
commits into
zephyrproject-rtos:main
from
nxp-upstream:classic_enable_bip
+8,943
−4
Conversation
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
1b1802a
to
112c4b3
Compare
40bb6a2
to
f338fa1
Compare
f338fa1
to
b1bf805
Compare
b1bf805
to
645f5e6
Compare
645f5e6
to
37e7fe5
Compare
26 tasks
37e7fe5
to
da6b8aa
Compare
A new function bt_obex_add_header_body_or_end_body() is added to help to add the body/end body header. When the tail room of the buffer is more than the passed body room, and the total length of buffer is not more than the mopl if the body has been added, the header end body will be added. Or, the header body will be added. Signed-off-by: Lyle Zhu <[email protected]>
The `bt_obex_string_is_valid()` is used to check whether the sending or receiving UTF-16 string is valid or not. Expose function "bt_obex_string_is_valid()" to support external checking of UTF-16 strings. Signed-off-by: Lyle Zhu <[email protected]>
The function `bt_obex_has_header()` is used to check whether the specific header is in the buffer. It is required by upper layer to check the header from the receiving buffer. Signed-off-by: Lyle Zhu <[email protected]>
Add functions to manage BIP transport connect and disconnect both for l2cap and rfcomm. Add functions to register and unregister primary and secondary OBEX servers. Add functions to send OBEX connect/disconnect request and response. Add functions to send OBEX get/put request and response with different type defined by BT_BIP_HDR_TYPE_*. Add functions to send abort request and response. Signed-off-by: Lyle Zhu <[email protected]>
Add commands for transport over RFCOMM, including `register-rfcomm`, `connect-rfcomm`, and `disconnect-rfcomm`. Add commands for transport over L2CAP, including `register-l2cap`, `connect-l2cap`, and `disconnect-l2cap`. Add command `alloc-buf` and `release-buf` to allocate and release TX buffer. Add command set `add-header` to add the OBEX headers to allocated TX buffer. Add command set `client` to send BIP client requests with allocated TX buffer. Add command set `server` to send BIP responses with allocated TX buffer. Signed-off-by: Lyle Zhu <[email protected]>
Add function `bt_bip_set_supported_capabilities()` to set the supported caps of responder. Add function `bt_bip_set_supported_features()` to set the supported features of responder. Add function `bt_bip_set_supported_functions()` to set the supported functions of responder. Check the supported features of responder when sending OBEX connect request on initiator side. Check the supported functions of responder when sending OBEX get/put request on initiator side. Signed-off-by: Lyle Zhu <[email protected]>
Add protocol `BT_SDP_PROTO_OBEX`. Add define `BT_SDP_SUPPORTED_CAPABILITIES` to define supported capabilities attribute. Add define `BT_SDP_SUPPORTED_FUNCTIONS` to define supported functions attribute. Add function `bt_sdp_get_functions()` to get the remote supported functions. Add function `bt_sdp_get_goep_l2cap_psm()` to get the remote GOEP L2CAP PSM. Signed-off-by: Lyle Zhu <[email protected]>
Add command `reg` to register the BIP responder SDP record. Add command `set_caps`, `set_features`, and `set_functions` to set the supported capabilities, features, and functions for BIP responder. Add command `discover` to discovery the BIP responder SDP record. And parse the response data to get the supported features and functions. Add command `set_feats_funcs` to set the discovered supported features and functions. Signed-off-by: Lyle Zhu <[email protected]>
The response function should be consistent with the function of request when server responses the request of client. Check whether the BIP function in the server response function is consistent with the client request. Signed-off-by: Lyle Zhu <[email protected]>
For the uncompleted BIP request, the following BIP request function should be same with the previous. Keep the first request function type, and check it with the following request function type. Signed-off-by: Lyle Zhu <[email protected]>
da6b8aa
to
8ba5c11
Compare
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Bluetooth Classic
Bluetooth Classic (BR/EDR)
area: Bluetooth Host
Bluetooth Host (excluding BR/EDR)
area: Bluetooth
area: Tests
Issues related to a particular existing or missing test
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.
A new function bt_obex_add_header_body_or_end_body() is added to help to add the body/end body header. When the tail room of the buffer is more than the passed body room, and the total length of buffer is not more than the mopl if the body has been added, the header end body will be added. Or, the header body will be added.
bt_obex_string_is_valid()
The
bt_obex_string_is_valid()
is used to check whether the sending or receiving UTF-16 string is valid or not.Expose function "bt_obex_string_is_valid()" to support external checking of UTF-16 strings.
bt_obex_has_header()
The function
bt_obex_has_header()
is used to check whether the specific header is in the buffer.It is required by upper layer to check the header from the receiving buffer.
Add functions to manage BIP transport connect and disconnect both for l2cap and rfcomm.
Add functions to register and unregister primary and secondary OBEX servers.
Add functions to send OBEX connect/disconnect request and response.
Add functions to send OBEX get/put request and response with different type defined by BT_BIP_HDR_TYPE_*.
Add functions to send abort request and response.
Add commands for transport over RFCOMM, including
register-rfcomm
,connect-rfcomm
, anddisconnect-rfcomm
.Add commands for transport over L2CAP, including
register-l2cap
,connect-l2cap
, anddisconnect-l2cap
.Add command
alloc-buf
andrelease-buf
to allocate and release TX buffer.Add command set
add-header
to add the OBEX headers to allocated TX buffer.Add command set
client
to send BIP client requests with allocated TX buffer.Add command set
server
to send BIP responses with allocated TX buffer.Add function
bt_bip_set_supported_capabilities()
to set the supported caps of responder.Add function
bt_bip_set_supported_features()
to set the supported features of responder.Add function
bt_bip_set_supported_functions()
to set the supported functions of responder.Check the supported features of responder when sending OBEX connect request on initiator side.
Check the supported functions of responder when sending OBEX get/put request on initiator side.
Add protocol
BT_SDP_PROTO_OBEX
.Add define
BT_SDP_SUPPORTED_CAPABILITIES
to define supported capabilities attribute.Add define
BT_SDP_SUPPORTED_FUNCTIONS
to define supported functions attribute.Add function
bt_sdp_get_functions()
to get the remote supported functions.Add function
bt_sdp_get_goep_l2cap_psm()
to get the remote GOEP L2CAP PSM.Add command
reg
to register the BIP responder SDP record.Add command
set_caps
,set_features
, andset_functions
to set the supported capabilities, features, and functions for BIP responder.Add command
discover
to discovery the BIP responder SDP record. And parse the response data to get the supported features and functions.Add command
set_feats_funcs
to set the discovered supported features and functions.The response function should be consistent with the function of request when server responses the request of client.
Check whether the BIP function in the server response function is consistent with the client request.
For the uncompleted BIP request, the following BIP request function should be same with the previous.
Keep the first request function type, and check it with the following request function type.