2025-03-26 9:24 AM
Hi,
I've been struggling with this for 2 weeks now so I'm reaching out desperate for help.
Our custom PCB uses an STM32U575 and the BLE module is BLUENRG-355MC.
I want to use the module in NCP mode. I discovered that this was being called DTM in Wise studio. After spending probably about 3 days getting Wise studio to work (java versions, JNI support etc.), eventually with the JVM bundled with Cube, and getting an openocd connection running via the command line I managed to get DTM onto the chip in a way I could debug both ends.
On the MCU end I get back invalid params for many of the HCI commands.
So I update to X-CUBE-BLEMGR version 4.0.0 and discover that it seems to insist I using when SPI when I'm using UART for the connection. No UART option in the custom bus for a "user board" etc. So I hack round all that to get it to work with the UART and I try a thing called "Bluetooth Manager" which just seems to be an abstraction of the HCI.
During this, and with much googling, I work out that the BLUENRG-355MC is now a STM32W... something. There appears to be no table of what has become what. After comparing specs I setting on it now being called a STM32WB07CC. I install the cube support and import the projects from the package.
No DTM. Hours more googling... it's now "Transparent Mode'.
Get it compiled and get it running, this time via Cube so debugging is easier.
Send some commands, the command lengths are wrong.
The first one from the MCU, "ble_status_t aci_gatt_srv_init(void)" needs sends a command length of 0. The "Transparent Mode" dtm_cmd_db.c handler expects a command length of 1.
OK, so hack round that:
// Transparent mode wants a command length of 1
rq_t.cparam = &command;
rq_t.command_len = 1;
And I get to the next failure, aci_gap_init. The MCU sends a command length of 4, but the "Transparent Mode" dtm_cmd_db.c handler expects a command length of 2 or (1 + 1) as it says.
I download every repository of ST-based BLE firmware I can find and grep it all but I cannot find any example of the host sending anything other than 4.
I am completely and utterly and hopelessly lost and exasperated. I chose this module over our usual SiLabs for this project because we are standardised on Cube and thought it would be trivial to integrate, but the whole ecosystem seems to be in a state of flux and as far as I can tell right now, there is no working configuration.
I'm sorry about the meandering nature of this but can someone please please please tell me what I need to do to have a compilable NCP, sorry DTM, sorry "Transparent Mode" code base for the module, and a matching library on the host MCU.
Many thanks for listening!
Jo