Skip to content

Conversation

lylezhu2012
Copy link
Contributor

@lylezhu2012 lylezhu2012 commented Sep 5, 2025

  • Bluetooth: OBEX: Add function bt_obex_add_header_body_or_end_body()

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.

  • Bluetooth: Classic: OBEX: Expose function 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.

  • Bluetooth: classic: OBEX: Expose function 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.

  • Bluetooth: classic: Enable BIP features

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.

  • Bluetooth: shell: Add BIP shell commands.

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.

  • Bluetooth: Classic: BIP: Check features and functions of initiator

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.

  • Bluetooth: Classic: SDP: Support BIP profile

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.

  • Bluetooth: shell: Support BIP SDP record register and discovery

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.

  • Bluetooth: classic: BIP: Check if rsp func is consistent with req's

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.

  • Bluetooth: Classic: BIP: Ensure uncompleted request func consistent

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.

@zephyrbot zephyrbot added the area: Tests Issues related to a particular existing or missing test label Oct 9, 2025
@zephyrbot zephyrbot requested review from chengkai15 and nashif October 9, 2025 07:34
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]>
Copy link

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants