2013-08-13 11:25 AM
I'm trying to get my STEVAL-IBD001V1 (STM32L-Discovery + STBLC01) board to operate as a BLE master. There's no example code provided in the software package to do this, nor any obvious way to scan for advertisers.
I assume I could just call hci_le_create_connection with the required information, though that only works if I know the address of the device I'm connecting to. This should be possible, since the STBLC01 claims to support BLE master mode. Is the software just crippled? Thanks! #bluetooth #ble #master #stblc012013-08-14 12:34 AM
It more seems like you've bought the wrong thing. You will need to program STM32 to make it work with STBLC01, which includes knowledge of microprocessor programming, reading datasheet of STBLC01 to understand which commands to send/receive, etc.
2013-08-14 05:44 AM
I have been programming the STM32. The example code makes it easy to implement a BLE slave device; that much works fine. I don't see any functions related to becoming a BLE master, though. For instance, there are functions to set up a response to a scan, but none to initiate a scan, nor any obvious callback that would occur when a scan (or similar) returns results (if you don't initiate it manually).
Part of the problem is that the actual interface code with the STBLC01 module is in a binary blob, which makes it somewhat problematic to even add my own master-mode functions.2013-08-14 06:15 AM
I will write that just as pure theory (did not go check for STBLC01 datasheet or programming reference). I am sure you can send SCAN command to bluetooth module, then wait for some ''interrupt'' to read scanned data and write them into some pre-defined memory space, which you then read to check which seems most equal to what you want to connect, and then issue some INFO command to get mac address (if that is not in scan response directly) and then send JOIN command to join.
Sounds simple even without examples.