-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: boards: stm32: Add a sample to support ST BlueNRG GUI app
Introduce a sample for BlueNRG-based devices to support interaction with ST BlueNRG GUI application based on U(S)ART protocol. Signed-off-by: Ali Hozhabri <[email protected]>
- Loading branch information
1 parent
569183b
commit d500a3f
Showing
5 changed files
with
534 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
samples/boards/stm32/bluetooth/interactive_gui/CMakeLists.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(st_interactive_gui) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.. _samples_boards_stm32_bluetooth_interactive-gui: | ||
.. zephyr:code-sample:: st_bluetooth_interactive_gui | ||
:name: Bluetooth: ST Interactive GUI | ||
:relevant-api: bluenrg_hci_driver bluetooth | ||
|
||
Expose ST BlueNRG Bluetooth network coprocessor over UART | ||
|
||
Overview | ||
********* | ||
|
||
Expose the Bluetooth network coprocessor via UART to a PC to be used | ||
with the ST BlueNRG GUI app. In this case, the main MCU becomes an intermediate level, | ||
and it passes the data between the host (PC) and controller. | ||
|
||
Requirements | ||
************ | ||
|
||
* A board based on BlueNRG BLE module such as :ref:`disco_l475_iot1_board` | ||
* `BlueNRG GUI`_ application installed on your PC | ||
|
||
Default UART settings | ||
********************* | ||
|
||
It depends on the board default settings for ``zephyr,bt-c2h-uart`` DTS property. | ||
The UART default settings are: | ||
|
||
* Baudrate: 115200 bps | ||
* 8 bits, no parity, 1 stop bit | ||
|
||
Building and Running | ||
******************** | ||
|
||
This sample can be found under :zephyr_file:`samples/boards/stm32/bluetooth/interactive_gui` in the | ||
Zephyr tree. | ||
|
||
.. _BlueNRG GUI: | ||
https://www.st.com/en/embedded-software/stsw-bnrgui.html |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CONFIG_CONSOLE=n | ||
CONFIG_STDOUT_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_INTERRUPT_DRIVEN=y | ||
CONFIG_BT=y | ||
CONFIG_BT_HCI_RAW=y | ||
CONFIG_BT_HCI_RAW_H4=y | ||
CONFIG_BT_HCI_RAW_H4_ENABLE=y | ||
CONFIG_BT_BUF_ACL_RX_SIZE=255 | ||
CONFIG_BT_BUF_CMD_TX_SIZE=255 | ||
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255 | ||
CONFIG_BT_BLUENRG_ACI=n | ||
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 | ||
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=y |
12 changes: 12 additions & 0 deletions
12
samples/boards/stm32/bluetooth/interactive_gui/sample.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sample: | ||
name: Bluetooth ST Interactive GUI | ||
description: Allows BlueNRG-based boards to connect to BlueNRG GUI application via UART | ||
tests: | ||
sample.boards.stm32.bluetooth.interactive_gui: | ||
harness: bluetooth | ||
platform_allow: | ||
- sensortile_box_pro | ||
- disco_l475_iot1 | ||
tags: | ||
- uart | ||
- bluetooth |
Oops, something went wrong.