diff --git a/sld131-bluetooth-getting-started-demos-examples/index.md b/sld131-bluetooth-getting-started-demos-examples/index.md index fcfad21..4cc5f63 100644 --- a/sld131-bluetooth-getting-started-demos-examples/index.md +++ b/sld131-bluetooth-getting-started-demos-examples/index.md @@ -90,25 +90,31 @@ See [Dynamic Multiprotocol Development with Bluetooth and Proprietary Protocols ### NCP Host Examples -NCP host examples are located in \\app\bluetooth\example_host. +NCP host examples are located in \\bluetooth_le_app\example_host. -- **bt\_host\_empty:** Minimal host-side project structure, used as a starting point for NCP host applications. Use it with the **Bluetooth – NCP** target application flashed to the radio board. +- **bt\_aoa\_host\_locator:** A locator host sample app that works together with a **Bluetooth AoA – NCP Locator** target app. It receives IQ samples from the target and estimates the Angle of Arrival (AoA). For more information see [Application Development with Silicon Labs’ RTL Library](https://docs.silabs.com/rtl-lib/latest/direction-finding-solution-guide/). -- **bt\_host\_ota\_dfu:** Demonstrates how to perform an OTA DFU on a Silicon Labs Bluetooth Device. It requires a WSTK with a radio board flashed with NCP firmware to be used as the GATT client that performs the OTA. +- **bt\_cs\_host:** This is the host application for the Channel Sounding (CS) NCP target application. -- **bt\_host\_uart\_dfu:** Demonstrates how to perform a UART DFU on a Silicon Labs Bluetooth Device running NCP firmware. +- **bt\_host\_cpc\_hci\_bridge:** A background application to be run when HCI interface is exposed via CPC. This application retrieves the HCI commands/events from the CPC messages and forwards them toward the Bluetooth host running on the PC. Similarly, it forwards the HCI commands from the host toward the target over CPC. -- **bt\_host\_voice:** On a WSTK programmed with NCP firmware, it to connects to the **Bluetooth – SoC Voice** example, sets the correct configuration on it, receives audio via Bluetooth, and stores audio data into a file. +- **bt\_host\_empty:** Minimal host-side project structure, used as a starting point for NCP host applications. Use it with the **Bluetooth – NCP** target application flashed to the radio board. -- **bt\_aoa\_host\_locator:** A locator host sample app that works together with a **Bluetooth AoA – NCP Locator** target app. It receives IQ samples from the target and estimates the Angle of Arrival (AoA). For more information see [Application Development with Silicon Labs’ RTL Library](https://docs.silabs.com/rtl-lib/latest/direction-finding-solution-guide/). +- **bt\_host\_esl\_ap:** This Python example implements the functionality of an Access Point as specified by the Bluetooth Electronic Shelf Label Profile specification using an NCP ESL AP target. -- **bt\_host\_positioning:** Connects to multiple **bt\_aoa\_host\_locator** sample apps (via MQTT) and estimates a position from Angles of Arrival (AoA). For more information, see *QS175: Application Development with Silicon Labs’ RTL Library.* +- **bt\_host\_ncp\_test:** This Network Co-Processor (NCP) host application serves 2 purposes. It demonstrates (1) how to use user NCP commands and (2) how to implement a simple application to test NCP performance using the default user commands. -- **bt\_host\_positioning\_gui:** Connects to the **bt\_host\_positioning** sample app (via MQTT), reads out the position estimations and displays the tags and locators on a 3D GUI. This sample app is python based. For more information, see [Application Development with Silicon Labs’ RTL Library](https://docs.silabs.com/rtl-lib/latest/direction-finding-solution-guide/). +- **bt\_host\_ota\_dfu:** Demonstrates how to perform an OTA DFU on a Silicon Labs Bluetooth Device. It requires a WSTK with a radio board flashed with NCP firmware to be used as the GATT client that performs the OTA. + +- **bt\_host\_positioning:** Connects to multiple **bt\_aoa\_host\_locator** sample apps (via MQTT) and estimates a position from Angles of Arrival (AoA). For more information, see *QS175: Application Development with Silicon Labs’ RTL Library.* - **bt\_host\_throughput:** Tests the throughput capabilities of the device in NCP mode and can be used to measure throughput between two devices as well as between a device and a smartphone. -- **bt\_host\_cpc\_hci\_bridge:** A background application to be run when HCI interface is exposed via CPC. This application retrieves the HCI commands/events from the CPC messages and forwards them toward the Bluetooth host running on the PC. Similarly, it forwards the HCI commands from the host toward the target over CPC. +- **bt\_host\_uart\_dfu:** Demonstrates how to perform a UART DFU on a Silicon Labs Bluetooth Device running NCP firmware. + +- **bt\_host\_voice:** On a WSTK programmed with NCP firmware, it to connects to the **Bluetooth – SoC Voice** example, sets the correct configuration on it, receives audio via Bluetooth, and stores audio data into a file. + +- **bt\_host\_positioning\_gui:** Connects to the **bt\_host\_positioning** sample app (via MQTT), reads out the position estimations and displays the tags and locators on a 3D GUI. This sample app is python based. For more information, see [Application Development with Silicon Labs’ RTL Library](https://docs.silabs.com/rtl-lib/latest/direction-finding-solution-guide/). ## Code Examples diff --git a/sld596-bluetooth-network-coprocessor-mode/03-ncp-host-development.md b/sld596-bluetooth-network-coprocessor-mode/03-ncp-host-development.md index 1b0f676..bcfe348 100644 --- a/sld596-bluetooth-network-coprocessor-mode/03-ncp-host-development.md +++ b/sld596-bluetooth-network-coprocessor-mode/03-ncp-host-development.md @@ -8,13 +8,9 @@ Bluetooth NCP Commander is an easy-to-use tool that can be used for testing diff ### Built-in Version -1. To open the built-in Bluetooth NCP Commander, select the target board in the **Debug Adapters** view, and check that the preferred SDK is set to **Gecko SDK Suite vn.n.n**. Select the **Compatible Tools** tab, and click **Launch** next to Bluetooth NCP Commander. +1. To open the built-in Bluetooth NCP Commander, select **Tools** tab on the left side, browse **Bluetooth NCP Commander** and click **Open Tool**. - ![Compatible Tools](resources/an1259-v14-tools-tab.png) - - Alternatively, you can open the built-in Bluetooth NCP Commander from the **Tools** menu. - - ![Tools dialog](resources/an1259-v14-tools-menu.png) +![Compatible Tools](resources/an1259-launch-Bluetooth-NCP-Commander.png) 2. Select the target device, and click **Connect**. @@ -22,7 +18,7 @@ Bluetooth NCP Commander is an easy-to-use tool that can be used for testing diff ### Standalone Version -1. To open the standalone tool, navigate to *C:\SiliconLabs\SimplicityStudio\v5\developer\adapter_packs\ncp_commander*, and start NcpCommander.exe. +1. To open the standalone tool, navigate to *C:\Users\\\\\.silabs\slt\installs\archive\ncpcommander-vx.y.z*, and start NcpCommander.exe. 2. In the standalone tool, provide the UART interface settings, and then select the COM port on which the device can be accessed. @@ -166,7 +162,7 @@ In **Settings**, if the **Reset Mesh Node before Initializing as Provisioner** o ## Building the NCP Host Examples on Windows -The Silicon Labs v3.x Bluetooth SDK contains a generic NCP Host example project for the PC. This example can be compiled on Windows or any POSIX OS. This section goes through the build process on Windows. +Simplicity Studio SDK contains NCP Host example projects for PC. These examples can be compiled on Windows or any POSIX OS. This section goes through the build process on Windows. >**Note**: The host example projects in the SDK use the dynamic GATT database feature. They are to be used with the **Bluetooth – NCP** target application. @@ -184,39 +180,36 @@ The Silicon Labs v3.x Bluetooth SDK contains a generic NCP Host example project ![msys2 mingw 64-bit](resources/an1259-msys2-mingw-64-bit.png) -5. Change to the NCP Host example folder, where \ varies by SDK version: - - ```C - cd c:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\v3.x\app\bluetooth\example_host\bt_host_empty\ - ``` - - or - - ```C - cd c:\Users\\SimplicityStudio\SDKs\gecko_sdk\app - ``` - -6. Create an export of the example with the command `make export`. After the project files are exported, the export directory will be a working directory that is completely detached from the SDK but has the same folder structure inside. The benefit of using an export is that changes in the (config) files during development will not affect the SDK content, and multiple instances can coexist, for example for testing different variants. You can also use `make export EXPORT_DIR=/my/custom/export/path` to export the example to a custom directory. - -7. Within the export folder navigate to the */app/bluetooth/example_host/bt_host_empty* folder. - -8. If you want to add any service/characteristic to the GATT database, edit the */config/btconf/gatt_configuration.btconf* file. Edit it either with a text editor or drag-and-drop the file onto Simplicity Studio to edit it with the GATT Configurator. Do not forget to save the file after editing. +5. Create a new **Bluetooth - Host Empty** project in Simplicity Studio 6 -9. Generate GATT database source files from the .*btconf* file by running `make gattdb` (in the */bt_host_empty* folder). Note: The generator script requires installing Python 3 and the Jinja2 package by calling `pip install jinja2`. + ![studio6 host app generation](resources/an1259-studio6-host-app-generation.png) + +6. At the Target Device select the option **Part** and **WIN32** + ![studio6 select os](resources/an1259-studio6-select-os.png) -10. Build the exported project with the command: `make`. (Run it in the */bt_host_empty* folder, where you can find the makefile). - -11. The build output is created in a new *exe* folder. Go to this folder with `cd exe`, and then run`bt_host_empty.exe`. The COM port and the IP address of the target are passed as command line parameters. The COM port should be the same as the one used by the JLink CDC UART Port, as shown in [NCP Host Development](./03-ncp-host-development). To see how to pass the different parameters, first run the exe with the `-h` (help) switch. +7. Navigate to the project folder in MSYS2 MinGW 64-bit. +8. Build the project in MSYS2 MinGW 64-bit ```C - .\bt_host_empty.exe -h + make -f bt_host_empty.Makefile ``` - -12. Once the UART connection with the device is established, you should see the following: - - ![started advertising message](resources/an1259-figure-3-6.png) - -13. Now you can connect to the device over Bluetooth. +9. The build output is created in a new *build/debug/* folder. Navigate to this folder, and then run`bt_host_empty.exe` with the interface as an argument. + +10. Once the UART connection with the device is established, the following should appear: + +``` + MINGW64 ~/SimplicityStudio/v6_workspace_2226/bt_host_empty + $ ./build/debug/bt_host_empty.exe -u COM30 + [D] Timer function intialized + [I] NCP host initialised. + [I] Press Crtl+C to quit + + [I] Rebooting NCP target (0)... + [I] Bluetooth stack booted: v11.0.1+0e13429e + [I] Bluetooth public device address: 04:87:27:E7:07:5D + [I] Started advertising. +``` +10. The device advertises and ready for Bluetooth connection. ## Using Python for Host Side Development diff --git a/sld596-bluetooth-network-coprocessor-mode/04-secure-ncp.md b/sld596-bluetooth-network-coprocessor-mode/04-secure-ncp.md index f9ef642..41fd522 100644 --- a/sld596-bluetooth-network-coprocessor-mode/04-secure-ncp.md +++ b/sld596-bluetooth-network-coprocessor-mode/04-secure-ncp.md @@ -12,34 +12,42 @@ By default, the NCP target boots without using this encryption. It will be reque ## Host Side -To build the NCP Host project with secure mode, use the following command: +1. Create a new **Bluetooth - Host Empty** project in Simplicity Studio 6 -```C -make SECURITY=1 -``` + ![studio6 host app generation](resources/an1259-studio6-host-app-generation.png) -This requires the openssl package to be installed. Install it to your MSYS2 environment with: +2. At the *Target Device* select the option *Part* and the desired OS + ![studio6 select os](resources/an1259-studio6-select-os.png) + +3. Add `Secure NCP communication layer for host projects` component to the project +4. Secure mode requires the openssl package to be installed. It can be installed to the MSYS2 environment if necessary with: ```C pacman -S mingw-w64-x86_64-openssl ``` -After the project is built, the encryption can be enabled by calling the .exe file with the command line parameter `-s`: +5. Build the project in MSYS2 MinGW 64-bit + ```C + make -f bt_host_empty.Makefile + ``` +6. The build output is created in a new *build/debug/* folder. After the project is built, the encryption can be enabled by calling the .exe file with the command line parameter `-s`: ```C -.\empty.exe -s +.\bt_host_empty.exe -s ``` ```C -$ ./empty.exe -u COM21 -s +$ ./build/debug/bt_host_empty.exe -u COM<*> -s +[D] Timer function intialized [I] NCP host initialised. -[I] Resetting NCP target... -[I] Press Ctrl+C to quit -[I] Start encryption +[I] Press Crtl+C to quit + +[I] Rebooting NCP target (0)... +[I] Start encryption using OpenSSL 3.0 [I] Communication encrypted -[I] Bluetooth stack booted: v3.2.1-b216 -[I] Bluetooth public device address: 00:0B:57:A7:84:15 +[I] Bluetooth stack booted: v11.0.1+0e13429e +[I] Bluetooth public device address: 04:87:27:E7:07:5D [I] Started advertising. ``` -Running the exe file without this option will start a normal NCP Host application without encryption. +Running the exe file without `-s` parameter will start a normal NCP Host application without encryption. diff --git a/sld596-bluetooth-network-coprocessor-mode/05-using-ncp-with-cpc.md b/sld596-bluetooth-network-coprocessor-mode/05-using-ncp-with-cpc.md index d35935d..e3b08b8 100644 --- a/sld596-bluetooth-network-coprocessor-mode/05-using-ncp-with-cpc.md +++ b/sld596-bluetooth-network-coprocessor-mode/05-using-ncp-with-cpc.md @@ -4,7 +4,7 @@ The purpose of the Co-Processor Communication (CPC) Protocol is to act as a serial link multiplexer that allows data sent from multiple applications to be transported over a secure shared physical link. In CPC, data transfers between processors are segmented in sequential packets over endpoints. Transfers are guaranteed to be error-free and sent in order. -Find more information about the CPC at [https://docs.silabs.com/gecko-platform/4.1/service/cpc/overview](https://docs.silabs.com/gecko-platform/4.1/service/cpc/overview). +Find more information about the CPC at [https://docs.silabs.com/gecko-platform/latest/platform-cpc-overview/](https://docs.silabs.com/gecko-platform/latest/platform-cpc-overview/). ## Usage @@ -12,7 +12,9 @@ The CPC daemon acts as a bridge between the host and the target application. It ![CPC daemon](resources/an1259-cpc-daemon.png) -The NCP host by default does not contain usage of CPC. You need to build the application with the command line option `CPC=1`. +The NCP host by default does not contain usage of CPC. You need to build the application with **Host NCP CPC adapter (Linux only)** component. + +>**Note**: The Host NCP CPC adapter (Linux only) component is Experimental currently. ## Use Cases @@ -24,7 +26,13 @@ Adding the CPC functionality is recommended for the following use cases, as they ## Building the Target -To make the target use CPC communication, replace the USART component in the **bt_ncp** sample application with **CPC Secondary - UART (USART)** or **CPC Secondary – SPI (USART)**. This adds all the necessary components to enable CPC communication on the target. Set the pins of the selected communication interface according to the hardware design of the project. +To make the target use CPC communication, replace the USART component in the **bt_ncp** sample application with **CPC Secondary - UART (USART)** or **CPC Secondary – SPI (USART)**. This adds the necessary components to enable CPC communication on the target. Set the pins of the selected communication interface according to the hardware design of the project. + +In NCP setup **Bluetooth NCP Transport over CPC** component is required. + +>**Note**: The Bluetooth NCP Transport over CPC component is Experimental currently. + +![Add Target NCP CPC](resources/Studio6-target-app-CPC.png) The encryption of the communication is enabled by default. For developing and debugging, Silicon Labs recommends adding the **CPC SECURITY NONE** component so that the packet traces can be easier analyzed. @@ -44,9 +52,20 @@ If the **CPC SECURITY NONE** component was added to the target, set **disable_en ### Step 2: Build the host application -Find the *ncp_host_bt.mk* file in the \/app/Bluetooth/component_host/ folder, and set `CPC_DIR` to the path of the CPC daemon folder on your machine. +1. Create a new **Bluetooth - Host empty** project in Simplicity Studio 6 + ![studio6 host app generation](resources/an1259-studio6-host-app-generation.png) + +2. At the *Target Device* select the option *Part* and *Linux* + ![studio6 select os](resources/an1259-studio6-select-os.png) -Next, go to the **bt_host_empty** sample application in \/app/Bluetooth/example_host/bt_host_empty, and build it with this command line option to enable CPC: `make CPC=1`. +3. Add *Host NCP CPC adapter (Linux only)* component + ![Add Host NCP CPC](resources/Studio6-host-app-CPC.png) +>**Note**: The Host NCP CPC adapter (Linux only) component is Experimental currently. +4. Build the project + ```C + make -f bt_host_empty.Makefile + ``` +5. The build output is created in a new *build/debug/* folder. ### Step 3: Run the application diff --git a/sld596-bluetooth-network-coprocessor-mode/06-example-project-walkthrough.md b/sld596-bluetooth-network-coprocessor-mode/06-example-project-walkthrough.md index 60e570d..11a344b 100644 --- a/sld596-bluetooth-network-coprocessor-mode/06-example-project-walkthrough.md +++ b/sld596-bluetooth-network-coprocessor-mode/06-example-project-walkthrough.md @@ -4,13 +4,13 @@ This page describes the structure of the example NCP Host and Target projects, a ## NCP Target -This section focuses on the NCP-specific part of the **Bluetooth - NCP** SSv5 project. You can find a general project description in [Silicon Labs Bluetooth C Application Developers Guide](https://docs.silabs.com/bluetooth/latest/bluetooth-c-soc-dev-guide-sdk-v9x/). +This section focuses on the NCP-specific part of the **Bluetooth - NCP** SSv6 project. You can find a general project description in [Silicon Labs Bluetooth C Application Developers Guide](https://docs.silabs.com/bluetooth/latest/bluetooth-c-soc-dev-guide-sdk-v9x/). The **Bluetooth - NCP** example does not contain a GATT database. The dynamic GATT API can be used for building it. This is recommended because the target code does not need to be modified and synchronized with the Host code when the GATT database is updated. ### Project File Structure -A common directory and file structure are used across all examples in the Bluetooth SDK v3.x. The following figure shows this layout. +A common directory and file structure are used across the examples in the Bluetooth SDK. The following figure shows this layout. ![project file structure](resources/an1259-v10-bt-ncp-project.png) @@ -24,9 +24,7 @@ These files and directories are present in the root directory of the project: - *bt_ncp.slps* – the project properties XML file -- *GNU ARM v\* – the build directory - -- *gecko.sdk_3.\* – the Bluetooth SDK source code +- *simplicity_sdk_.\* – the Bluetooth SDK source code - *config* – the C configuration files of the hardware and Bluetooth stack. This directory contains the output files of the Pin Tool and Component Manager. @@ -111,9 +109,9 @@ This is a code snippet that corresponds to the `main` function. Because the Blue ![code snippet of main function](resources/an1259-figure-4-8.png) -Once the USART and Bluetooth stack are initialized, the main loop continuously calls the component as well as the application state machine. The corresponding functions are `sl_system_process_action()` and `app_process_action()` respectively. +Once the USART and Bluetooth stack are initialized, the main loop continuously calls the component as well as the application state machine. The corresponding functions are `sl_main_process_action()` and `app_process_action()` respectively. -The `sl_system_process_action()` handles Silicon Labs tasks and routines. It must *not be removed* from the loop. +The `sl_main_process_action()` handles Silicon Labs tasks and routines. It must *not be removed* from the loop. The default USART settings are mentioned in the Host example section. Make sure that the target and the host use the same configuration. The configuration can be adapted with the help of the Pin Tool and the Project Configurator. @@ -159,39 +157,22 @@ The remote wake-lock (direction: out) functionality can be used to wake up the h ## PC Host -The PC host application project that comes with the SDK is written in C. The host-side source files for this project are found in folders, for GSDK 3.x: - -*c:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\\\app\bluetooth\example_host\empty\* - -or, for GSDK 4.0 and higher: - -*c:\Users\\\SimplicityStudio\gecko_sdk\app\bluetooth\example_host* +The PC host application project that comes with the SDK is written in C. The host-side source files for this project are copied / linked after a host project is generated from Simplicity Studio 6. -The projects comprise only a few source and header files. Note, however, that many other files are referenced from the SDK in the makefile. For example, many utility functions are implemented under: - -*\\app\bluetooth\common_host\* - -but the Bluetooth protocol folder is also heavily used as described later. To copy all the files related to the project into a single folder, take advantage of the export feature described in [Host Side](./04-secure-ncp.md#host-side). +The projects comprise only a few source and header files. Note, however, that many other files are referenced from the SDK in the makefile. +For further details about the host side application please refer to [Host Side build](./04-secure-ncp.md#host-side). ### BGAPI Support Files While the files in the previous section contain all of the application logic, the actual BGLib implementation code containing the BGAPI parser and packet generation functions is found elsewhere, in other subfolders. -Default location in GSDK 3.x, where \ will vary by SDK version: - -- `c:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\\protocol\bluetooth\inc\sl_bt_ncp_host.h` +Default location for SiSDK 2025.12.x and above: -- `c:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\\protocol\bluetooth\src\sl_bt_ncp_host.c` +- `C:\Users\\.silabs\slt\installs\conan\p\\p\protocol\bluetooth\inc\sl_bt_ncp_host.h` -- `c:\SiliconLabs\SimplicityStudio\v5\developer\sdks\gecko_sdk_suite\\protocol\bluetooth\src\sl_bt_ncp_host_api.c` +- `C:\Users\\.silabs\slt\installs\conan\p\\p\protocol\bluetooth\src\sl_bt_ncp_host.c` -Default location in GSDK 4.0 and higher: - -- `c:\Users\\SimplicityStudio\SDKs\gecko_sdk\protocol\bluetooth\inc\sl_bt_ncp_host.h` - -- `c:\Users\\SimplicityStudio\SDKs\gecko_sdk\protocol\bluetooth\src\sl_bt_ncp_host.c` - -- `c:\Users\\SimplicityStudio\SDKs\gecko_sdk\protocol\bluetooth\src\sl_bt_ncp_host_api.c` +- `C:\Users\\.silabs\slt\installs\conan\p\\p\protocol\bluetooth\src\sl_bt_ncp_host_api.c` The SDK’s specific arrangement of files is one possible way the BGAPI protocol can be used, but it is also possible to create your own library code that implements the protocol correctly with a different code architecture. The only requirement here is that the chosen implementation must be able to create BGAPI command packets correctly and send them to the module over UART. Similarly, it must be able to receive BGAPI response and event packets over UART and process them into whatever function calls are needed to trigger the desired application behavior. @@ -251,15 +232,19 @@ The *sl_bt_ncp_host.c* file contains the implementation of the packet management ```C // Poll Bluetooth stack for an event and call event handler - static void sl_bt_step(void) + void sl_bt_step(void) { - sl_bt_msg_t evt; - // Pop (non-blocking) a Bluetooth stack event from event queue. - sl_status_t status = sl_bt_pop_event(&evt); - if (status != SL_STATUS_OK) { - return; - } - sl_bt_on_event(&evt); + sl_bt_msg_t evt; + + // Run the Bluetooth host stack processing step + sl_bt_run(); + + // Check the length of the next event, if any, and verify that the application + // can process it. To prevent data loss, the event will be kept in the stack's + // queue if the application cannot process it at the moment. + size_t event_len = sli_bgapi_device_peek_event_len(&sli_bt_bgapi_device); + if ((event_len == 0) || (!sl_bt_can_process_event(event_len))) { + return; } ``` diff --git a/sld596-bluetooth-network-coprocessor-mode/08-adding-a-new-service-to-the-ncp-example-with-dynamic-gatt-api.md b/sld596-bluetooth-network-coprocessor-mode/08-adding-a-new-service-to-the-ncp-example-with-dynamic-gatt-api.md index 1c4eb85..ff6a4ef 100644 --- a/sld596-bluetooth-network-coprocessor-mode/08-adding-a-new-service-to-the-ncp-example-with-dynamic-gatt-api.md +++ b/sld596-bluetooth-network-coprocessor-mode/08-adding-a-new-service-to-the-ncp-example-with-dynamic-gatt-api.md @@ -12,7 +12,7 @@ To implement this application, you need to make these changes: ## Adding New Attributes Using the Configuration File -Beginning with SDK version 3.3, the NCP host sample applications contains a .btconf file with a basic GATT configuration. This configuration can be edited with the GATT Configurator. Although PC host examples are not handled by Simplicity Studio, .btconf files can still be edited individually. Open the Simplicity IDE perspective in Simplicity Studio and drag-and-drop the .btconf file onto the editor area. GATT Configurator will automatically open. Edit the file as described in [GATT Configurator User’s Guide for Bluetooth SDK v3.x](https://docs.silabs.com/bluetooth/latest/gatt-configurator-users-guide-ble-btmesh/) and save it. To be compatible with the code snippets, create a custom service and then add a custom characteristic with the following properties: +Beginning with SDK version 3.3, the NCP host sample applications contains a .btconf file with a basic GATT configuration. This configuration can be edited with the GATT Configurator as described in [GATT Configurator User’s Guide for Bluetooth SDK v3.x](https://docs.silabs.com/bluetooth/latest/gatt-configurator-users-guide-ble-btmesh/). To be compatible with the code snippets, create a custom service and then add a custom characteristic with the following properties: - ID: my_data @@ -20,10 +20,6 @@ Beginning with SDK version 3.3, the NCP host sample applications contains a .btc - Value length: 20 bytes -Once the .btconf file is saved it must be turned into source code by running `make gattdb`. Run this command in the root folder of your example, where you can find the makefile. Note that the generator script requires installing Python 3 and the Jinja2 package by calling `pip install jinja2`. - -![make gattdb](resources/an1259-v08-make-code-snippet.png) - The output (gatt_db.c / gatt_db.h) is located in the autogen folder. These values will be used as parameters for the dynamic GATT APIs. The database will be created (that is, built on the NCP target with the dynamic GATT API) automatically in the initialization phase before the boot event is sent to the application. The application is still able update the GATT database with the dynamic GATT commands, as described in the next section. >**Note**: If your database contains included services, the included ones need to be defined before the ones including them. @@ -106,7 +102,7 @@ Now you can rebuild the host application. See the build process with MinGW in [B ## Testing -1. Start the host application from the *\exe* folder. +1. Start the host application from the *\build\debug* folder. 2. Once the PC is connected to WSTK (via UART), the WSTK starts advertising on Bluetooth. diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-host-app-CPC.png b/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-host-app-CPC.png new file mode 100644 index 0000000..8d47eeb Binary files /dev/null and b/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-host-app-CPC.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-target-app-CPC.png b/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-target-app-CPC.png new file mode 100644 index 0000000..d2fb199 Binary files /dev/null and b/sld596-bluetooth-network-coprocessor-mode/resources/Studio6-target-app-CPC.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-figure-4-8.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-figure-4-8.png index 4f1d190..f564bb7 100644 Binary files a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-figure-4-8.png and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-figure-4-8.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-launch-Bluetooth-NCP-Commander.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-launch-Bluetooth-NCP-Commander.png new file mode 100644 index 0000000..cb6bf17 Binary files /dev/null and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-launch-Bluetooth-NCP-Commander.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-host-app-generation.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-host-app-generation.png new file mode 100644 index 0000000..7644aaa Binary files /dev/null and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-host-app-generation.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-select-os.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-select-os.png new file mode 100644 index 0000000..cc33e3d Binary files /dev/null and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-studio6-select-os.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v10-bt-ncp-project.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v10-bt-ncp-project.png index b70f7b0..ce9dd07 100644 Binary files a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v10-bt-ncp-project.png and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v10-bt-ncp-project.png differ diff --git a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v14-connection-manager.png b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v14-connection-manager.png index f7e234f..dd43548 100644 Binary files a/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v14-connection-manager.png and b/sld596-bluetooth-network-coprocessor-mode/resources/an1259-v14-connection-manager.png differ