Skip to content

Conversation

@vtardy-st
Copy link
Contributor

Integration of the BLE-802.15.4 concurrent mode on stm32wba based on CubeWBA release 1.7.0
Add new sample application ble-802.15.4 echo_client concurrent mode

@github-actions
Copy link

github-actions bot commented Oct 17, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff
hal_stm32 zephyrproject-rtos/hal_stm32@286dd28 (main) zephyrproject-rtos/hal_stm32#319 zephyrproject-rtos/hal_stm32#319/files

Additional metadata changed:

Name URL Submodules West cmds module.yml Blobs
hal_stm32 2x 🆕

DNM label due to: 1 project with PR revision, 1 project with metadata changes and 2 blob changes

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@github-actions github-actions bot added manifest manifest-hal_stm32 DNM (manifest) This PR should not be merged (controlled by action-manifest) Binary Blobs Added labels Oct 17, 2025
@hermabe hermabe removed their request for review October 17, 2025 08:23
@vtardy-st vtardy-st marked this pull request as draft October 17, 2025 09:33
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 37cc906 to 17625f4 Compare October 17, 2025 10:02
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 6bb9f3c to 1c54b5e Compare October 30, 2025 09:21
Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

For commit "soc: stm32: add parameter in link_layer_register_isr() function", suggested commit header line:

-soc: stm32: add parameter in link_layer_register_isr() function
+soc: st: stm32wba: hci_if: allow forcing ISR registration

I think the 3 first commits should be squashed unless what build would fail on the 1st commit and on the 2nd commits. Suggestion commit message:

soc: st: stm32wba: hci_if: allow forcing ISR registration

Add parameter to the link_layer_register_isr() ...

Update Bluetooth hci_stm32wba.c and IEEE 802.15.4 ieee802154_stm32wba.c
drivers accordingly.

Signed-off-by: ...

Can the west manifest be updated independently (in a specific commit), or is it needed regarding changes in the 3 first commits?

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 1c54b5e to 0bf002f Compare October 30, 2025 16:43
@vtardy-st
Copy link
Contributor Author

For commit "soc: stm32: add parameter in link_layer_register_isr() function", suggested commit header line:

-soc: stm32: add parameter in link_layer_register_isr() function
+soc: st: stm32wba: hci_if: allow forcing ISR registration

I think the 3 first commits should be squashed unless what build would fail on the 1st commit and on the 2nd commits. Suggestion commit message:

soc: st: stm32wba: hci_if: allow forcing ISR registration

Add parameter to the link_layer_register_isr() ...

Update Bluetooth hci_stm32wba.c and IEEE 802.15.4 ieee802154_stm32wba.c
drivers accordingly.

Signed-off-by: ...

Can the west manifest be updated independently (in a specific commit), or is it needed regarding changes in the 3 first commits?

The first three commits have been squashed as suggested

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 0bf002f to da83d2c Compare October 30, 2025 16:52
Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Some of the sonarqubecloud reports are worth to be addressed IMHO. See the few comments below.

if (ret < 0) {
LOG_ERR("Failed to set TLS_SEC_TAG_LIST option (%s): %d",
data->proto, errno);
ret = -errno;
Copy link
Contributor

Choose a reason for hiding this comment

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

As noticed by sonarqubecloud, error here is discarded. return ret seems missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure that the fact that 'set TLS_SEC_TAG_LIST option' fails is critical:
If yes, I agree 'return ret' seems missing.
Else, we could just remove 'ret = -errno;'

{
/* This means that we did not receive response in time. */
struct udp_control *ctrl = CONTAINER_OF(timer, struct udp_control, rx_timer);
struct sample_data *data = (ctrl == conf.ipv4.udp.ctrl) ? &conf.ipv4 : &conf.ipv6;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
struct sample_data *data = (ctrl == conf.ipv4.udp.ctrl) ? &conf.ipv4 : &conf.ipv6;
struct sample_data __maybe_unused *data = (ctrl == conf.ipv4.udp.ctrl) ? &conf.ipv4 : &conf.ipv6;

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from da83d2c to 615a0b8 Compare October 31, 2025 13:34
@Thalley Thalley removed their request for review November 4, 2025 12:13
@vtardy-st vtardy-st marked this pull request as ready for review November 4, 2025 13:00
@zephyrbot zephyrbot requested a review from sjanc November 4, 2025 13:02
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 615a0b8 to 91907f2 Compare November 12, 2025 08:10
@zephyrbot zephyrbot requested a review from kartben November 12, 2025 08:12
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch 2 times, most recently from d05cda2 to 219c50a Compare November 12, 2025 10:14
@erwango
Copy link
Member

erwango commented Nov 13, 2025

@jhedberg, @jukkar Do you think it could be valuable to have this concurrent mode sample put as a generic sample ? And if yes, in which area: bluetooth ? net ?

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Some minor comments.

#define _STM32WBA_LINK_LAYER_PLAT_LOCAL_H_

void link_layer_register_isr(void);
void link_layer_register_isr(bool force);
Copy link
Contributor

Choose a reason for hiding this comment

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

An line description comment would be nice to explicitly tell what force is about.

set(gen_dir ${ZEPHYR_BINARY_DIR}/include/generated/)

generate_inc_file_for_target(
app
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicking: I'd suggest 2 space char indentation, for consistency across the CMake script files.

@@ -0,0 +1,62 @@
# Private config options for ble HR - Networking echo-client sample app
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Private config options for ble HR - Networking echo-client sample app
# Private config options for BLE HR - Networking echo-client sample app

.. zephyr:code-sample:: stm32_ble_hr_802154_echo_client
:name: BLE HR - 802154 Echo client (advanced)

Implement a Bluetooth |reg| Energy Heart Rate - ieee 802154 client.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Implement a Bluetooth |reg| Energy Heart Rate - ieee 802154 client.
Implement a Bluetooth |reg| Energy Heart Rate - IEEE 802154 client.


Building and Running
********************

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remove 1 of these empty lines?

#define STATE_CONNECTED 1U
#define STATE_DISCONNECTED 2U

static void process_ble_hr(void);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add an empty line below.

Comment on lines 138 to 140
#define HAS_LED 1
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
#define BLINK_ONOFF K_MSEC(500)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#define HAS_LED 1
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);
#define BLINK_ONOFF K_MSEC(500)
#define HAS_LED 1
#define BLINK_ONOFF K_MSEC(500)
static const struct gpio_dt_spec led = GPIO_DT_SPEC_GET(LED0_NODE, gpios);


static void process_ble_hr(void)
{
int err;
Copy link
Contributor

Choose a reason for hiding this comment

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

An empty line below is welcome.

@@ -0,0 +1,465 @@
/* ble-hr-802154-echo-client.c - Ble Heart Rate - Networking echo client */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* ble-hr-802154-echo-client.c - Ble Heart Rate - Networking echo client */
/* ble-hr-802154-echo-client.c - BLE Heart Rate - Networking echo client */

}
#endif /* defined(CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) */
#endif /* defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) */

Copy link
Contributor

Choose a reason for hiding this comment

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

Could remove the extra empty line.

@jhedberg
Copy link
Member

jhedberg commented Nov 13, 2025

@jhedberg, @jukkar Do you think it could be valuable to have this concurrent mode sample put as a generic sample ? And if yes, in which area: bluetooth ? net ?

Yes, if it can be done in a generic (non-platform specific) way. Do we actually have abstractions in place for 2.4 GHz radio sharing, not just for Bluetooth and 802.15.4, but any 2.4GHz protocol (either standard or proprietary)? Not sure about the placement app, however.

@erwango
Copy link
Member

erwango commented Nov 14, 2025

Do we actually have abstractions in place for 2.4 GHz radio sharing, not just for Bluetooth and 802.15.4, but any 2.4GHz protocol (either standard or proprietary)? Not sure about the placement app, however.

@jukkar, @rlubos maybe ?

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 219c50a to eb1b593 Compare November 14, 2025 10:35
@vtardy-st
Copy link
Contributor Author

There is no test part in the sample.yaml of the concurrent mode sample because the KConfig BUILD_ONLY_NO_BLOBS is not supported for stm32 board.
A test part will be added once BUILD_ONLY_NO_BLOBS will be supported for stm32 board.

Add parameter to the link_layer_register_isr() to force
or not the link layer isr registration in case of multiple
function calls

Update Bluetooth hci_stm32wba.c driver and
IEEE 802.15.4 ieee802154_stm32wba.c driver accordingly.

Signed-off-by: Vincent Tardy <[email protected]>
Integration of the BLE-802.15.4 concurrent mode on stm32wba.

Signed-off-by: Vincent Tardy <[email protected]>
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from eb1b593 to 33d57f2 Compare November 14, 2025 10:55
Add sample Bluetooth Heart Rate - 802154 Echo Client

Signed-off-by: Vincent Tardy <[email protected]>
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 33d57f2 to f49cb30 Compare November 14, 2025 15:36
@sonarqubecloud
Copy link

@vtardy-st
Copy link
Contributor Author

sample.yaml files has been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants