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 zephyrproject-rtos/hal_stm32@50fcec6 (main) zephyrproject-rtos/[email protected]

Additional metadata changed:

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

DNM label due to: 1 project with metadata changes and 8 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 2 times, most recently from 3fde8f3 to fce5a3e Compare November 26, 2025 11:43
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from fce5a3e to 05e6e49 Compare November 28, 2025 16:58
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

To be honest, it is not clear to me what the sample is supposed to demonstrate and how it should be used: Are 2 boards required ? What are the features supported ?

IMO, it's better to focus on a minimal sample for which the purpose is clear and where all the possible configurations have been validated.
Otherwise, we'll get users raising questions, using it with wrong purpose or raising issues on options that are not essential.

************

This sample has been tested on the STMicroelectonics NUCLEO-WBA65RI board
(nucleo_wba65ri).
Copy link
Member

Choose a reason for hiding this comment

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

If 2 boards are required, please specify it here.

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 05e6e49 to 3b20eeb Compare December 2, 2025 13:08
@zephyrbot zephyrbot requested a review from erwango December 2, 2025 13:10
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch 2 times, most recently from 4988d73 to cae1152 Compare December 2, 2025 13:52
@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from cae1152 to da8327d Compare December 2, 2025 16:24
@zephyrbot zephyrbot requested a review from erwango December 2, 2025 16:26
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

I had a build test and some more changes would be required:

Building the default configuration reports warnings:

warning: MAX_THREAD_BYTES (defined at arch/Kconfig:405) was assigned the value '3' but got the value
''. Check these unsatisfied dependencies: USERSPACE (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MAX_THREAD_BYTES and/or look up
MAX_THREAD_BYTES in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: NET_IF_MAX_IPV4_COUNT (defined at subsys/net/ip/Kconfig.ipv4:14) was assigned the value '3'
but got the value ''. Check these unsatisfied dependencies: NET_IPV4 (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NET_IF_MAX_IPV4_COUNT and/or look up
NET_IF_MAX_IPV4_COUNT in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.

This should be fixed.

Buidling UDP=n/TCP=y reports errors. If only UDP is supported conditional code around UDP should be fixed (target_sources_ifdef(CONFIG_NET_UDP app PRIVATE src/udp.c) but maybe other a well)

Sample should be moved to samples/boards/st/bluetooth.

Finally, html rendered sample documentation could be read here: https://builds.zephyrproject.io/zephyr/pr/97773/docs/samples/boards/st/ble_802154/ble_hr_802154_echo_client/README.html#stm32_ble_hr_802154_echo_client
Looks ok to me, but please check if enhancements could be made (clear enough for reader).

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from da8327d to 4ce9db5 Compare December 3, 2025 10:00
@zephyrbot zephyrbot requested a review from erwango December 3, 2025 10:02
@vtardy-st
Copy link
Contributor Author

In the prj.conf of the sample, many IPV4 configuration are setting while NET_IPV4 is setting to 'n'.
This implementation is herited from echo-client sample (samples/net/sockets/echo_client) in order to enable/disable IPV4/IPV6 through the prj.conf.

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 4ce9db5 to bfd0ccd Compare December 4, 2025 14:20
@vtardy-st
Copy link
Contributor Author

Sample has been moved to samples/boards/st/bluetooth.

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 bfd0ccd to 1dfac3e Compare December 4, 2025 15:27
@vtardy-st
Copy link
Contributor Author

SonarCloud notifies issue related to CONTAINER_OF(), k_fifo_put()/_get() but I don't understand why

@vtardy-st vtardy-st force-pushed the stm32wba_1_7_0_ble_802154_concurrent branch from 1dfac3e to 2408f30 Compare December 8, 2025 13:57
Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

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

The echo-client sample is copied from network samples and just duplicates lot of code. It would better if we could add needed functionality to already existing sample instead of copying parts of it.

Copy link
Contributor

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

Comment on lines 8 to 10
target_sources( app PRIVATE src/echo-client.c)
target_sources( app PRIVATE src/app_ble.c)
target_sources( app PRIVATE src/udp.c)
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
target_sources( app PRIVATE src/echo-client.c)
target_sources( app PRIVATE src/app_ble.c)
target_sources( app PRIVATE src/udp.c)
target_sources(app PRIVATE src/echo-client.c)
target_sources(app PRIVATE src/app_ble.c)
target_sources(app PRIVATE src/udp.c)

or

Suggested change
target_sources( app PRIVATE src/echo-client.c)
target_sources( app PRIVATE src/app_ble.c)
target_sources( app PRIVATE src/udp.c)
target_sources(app PRIVATE
src/echo-client.c
src/app_ble.c)
src/udp.c
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

********

The sample application implements a concurrent mode BLE - IEEE 802.15.4.
Both wireless protocols Bluetooth |reg| Energy and IEEE 802.15.4 coexist :
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
Both wireless protocols Bluetooth |reg| Energy and IEEE 802.15.4 coexist :
Both wireless protocols Bluetooth |reg| Energy and IEEE 802.15.4 coexist:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

wait for the data to be sent back, and then verify it matches
the data that was sent.
The BLE part exposes the HR (Heart Rate) GATT Service. Once a device
connects it will generate dummy heart-rate values.
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
connects it will generate dummy heart-rate values.
connects, it will generate dummy heart-rate values.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

/* Ensure the IRQ is disabled before enabling it at run time */
irq_disable(RADIO_SW_LOW_INTR_NUM);

irq_connect_dynamic(RADIO_SW_LOW_INTR_NUM, RADIO_SW_LOW_INTR_PRIO,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, maybe outside PR scope: any reason for using dynamic IRQs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could be done in another PR

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 2408f30 to 5f73e4a Compare December 8, 2025 15:06
@vtardy-st
Copy link
Contributor Author

vtardy-st commented Dec 8, 2025

The echo-client sample is copied from network samples and just duplicates lot of code. It would better if we could add needed functionality to already existing sample instead of copying parts of it.

The possiblity was submitted earlier :
app_ble.c, echo-client.c and udp.c come from zephyr sample. At the beginning, we just modify echo-client.c to add ble functions and remove main() function in app_ble.c

Because there is no concurrent mode sample in zephyr samples section, we prefer to keep our sample in ST specific section

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

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.

7 participants