cancel
Showing results for 
Search instead for 
Did you mean: 

How to reuse BLE HID (HOGP) from STM32WB “BLE_HID_Selfie” in a new CubeMX (.ioc) project?

m_kowalczyk
Associate

Hello,

I’m working with STM32WB55. I used this example:
STM32WB-BLE-HID-Selfie (https://github.com/stm32-hotspot/STM32WB-BLE-HID-Selfie).
I have a working Mouse HID over GATT using that project (no .ioc).

Now I want to create a new CubeMX (.ioc) project for my product (so I can configure peripherals in CubeMX), and reuse the HID logic from the Selfie example. I’m not sure what the minimal, correct set of files and steps is.

Environment

  • MCU/Board: STM32WB55 (my custom board)

  • STM32CubeWB FW pack: v1-23-0

  • STM32CubeIDE: v1.19.0

  • Wireless Coprocessor on CPU2: BLE Full Stack 

What I tried

  • Created a new .ioc project with BLE → Custom Template.

  • I can see the middleware and app files in Includes, but I’m unsure which files from the Selfie example I should copy and where.

  • I’m also not certain where to call the HID init functions in the generated code.

What I’m asking

  1. What is the minimal set of files to copy from BLE_HID_Selfie into a .ioc project? (e.g. hids.c/.h, hids_app.c/.h, hid_report_desc.c, Utilities/sequencer, and the whole Middlewares/ST/STM32_WPAN tree?)

  2. Where should I place those files in a typical .ioc project structure? (e.g. alongside STM32_WPAN/App/app_ble.c?)

  3. Which include paths / preprocessor defines are required in CubeIDE?

  4. In the generated code, where should I call HIDS_Init() and HIDSAPP_Init()? (Inside SVCCTL_Init() and after APP_BLE_Init() respectively?)

  5. Do I need to replace the linker script (.ld) with the one from Selfie (for SRAM2A/2B reservations)?

  6. Any other version-sync requirements (e.g., must the Wireless Coprocessor version match the middleware exactly)?

If someone has a small checklist or a “copy-from → paste-to” mapping for integrating the HID service into a .ioc project, that would be extremely helpful.

Thanks!

0 REPLIES 0