STM32duinoBLE on STEVAL-MKSBOX1V1

All about boards manufactured by ST
Post Reply
gemelko
Posts: 3
Joined: Thu May 18, 2023 5:26 pm

STM32duinoBLE on STEVAL-MKSBOX1V1

Post by gemelko »

Help, I'm completely stuck! I can't seem to get the STM32duinoBLE library to be useful on the sensortile box: it works but seems to only set up a basic BLE device with generic interface that can't be used to move data from or to the device, and adding services seems to be non-functional.

So to make things extremely simple, I reduced my testing to two sensortile.box devices and compiled the examples from the STM32duinoBLE library "LED" and "LedControl" - control on one device, peripheral on the other device, and monitored the serial ports on both devices. They both initialize the BLE and report that they are functioning, but they never connect to each other. Here are the results:

With the default firmware loaded onto the SPBTLE-1S module: While the BLE device does start on both, they never make a connection: the BLE.available() call always returns false, thus the scanner on the control side doesn't find the peripheral device. This is true whether I use the code as-is which calls BLE.scanForUuid("19B10000-E8F2-537E-4F6C-D104768A1214") or if I change the code to use BLE.scanForName("LED") - in both instances, BLE.available() within the loop never returns true, and the control device never attempts to connect to the peripheral.

With the DTM_LLOnly.bin firmware loaded onto the SPBTLE-1S module: The BLE.begin() call always fails, and thus nothing else works.

Some additional information: When I use the default firmware on the SPBTLE-1S module and run the LED example above, I only see two generic services:
00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile
00001800-0000-1000-8000-00805f9b34fb (Handle: 5): Generic Access Profile
...and even using an Android device to connect to them, I can't seem to attach to the services Uuid's for the LED using a BT tool such as LightBlue, ST BLE ToolBox-1.3.5, or BLE Tester. The LED service should be 19B10000-E8F2-537E-4F6C-D104768A1214 however I can't connect to its characteristic 19B10001-E8F2-537E-4F6C-D104768A1214 even though I can see this service with LightBlue (for example) as an "Advertised service UUID."

But back to basics, I would hope that the out-of-the-library examples for Control and Peripheral would work, but they do not.

I read a note about using DTM_LLOnly.bin however as I said, flashing that into the boards completely breaks things as far as I can tell.

Help, anyone?!?!

Glenn
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32duinoBLE on STEVAL-MKSBOX1V1

Post by fpiSTM »

Post Reply

Return to “STM boards (Discovery, Eval, Nucleo, ...)”