- Notifications
You must be signed in to change notification settings - Fork19
ArduinoBLE library fork to support ST BLE modules
License
stm32duino/STM32duinoBLE
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This library is a fork of ArduinoBLE library to add the support of STM32WB, SPBTLE-RF, SPBTLE-1S, BLUENRG-M2SP, BLUENRG-LP and BLUENRG-M0 BLE modules.
It was successfully tested with theNUCLEO-WB15CC,P-NUCLEO-WB55RG,STM32WB5MM-DK,X-NUCLEO-IDB05A2 orX-NUCLEO-IDB05A1 orX-NUCLEO-BNRG2A1 expansion board and aNUCLEO-F401RE orNUCLEO-L476RG orNUCLEO-L053R8, withB-L475E-IOT01A,B-L4S5I-IOT01A,STEVAL-MKSBOX1V1,STEVAL-MKBOXPRO and withSTM32L562E-DK.
- In order to use this library with SM32WBxx series, you need to update the STM32WB Copro Wireless Binaries with stm32wbxx_BLE_HCILayer_fw.bin depending of your mcu:
Each subdirectories contains binaries and Release_Notes.html which explain how to update it.
- In order to use this library withSTEVAL-MKSBOX1V1, you need to update the firmware of the SPBTLE-1S BLE module mounted on that board as described in the following wiki page:
- In order to use this library with X-NUCLEO-BNRG2A1, you need to update the firmware of the BLUENRG-M2SP BLE module mounted on that expansion board as described in the following wiki page:
For more information about ArduinoBLE library please visit the official web page at:https://www.arduino.cc/en/Reference/ArduinoBLE
STM32Cube_WPAN has several configuration options, which are set in theapp_conf.h
.This package has a default configuration namedapp_conf_default.h
.The user can include the fileapp_conf_custom.h
to customize the BLE application.Options wrapped in#ifndef
,#endif
inapp_conf_default.h
can be overwritten.Additional options can be added.
The user can refer toAN5270
The user can change the Tx Power by redefiningCFG_TX_POWER
using thebuild_opt.h
file. Possible values are listed in the chapter4.2 Tx power level, default value is0x18
(-0.15dBm
). To set it at+1dBm
,CFG_TX_POWER
have to be defined at0x1A
:
-DCFG_TX_POWER=0x1A
The user can include the fileble_spi_conf.h
to define which shield and configuration to use from the following list:
- X-NUCLEO-IDB05A2
IDB05A2_SPI_CLOCK_D3
: SPI clock on D3IDB05A2_SPI_CLOCK_D13
SPI clock on D13
- X-NUCLEO-IDB05A1
IDB05A1_SPI_CLOCK_D3
: SPI clock on D3IDB05A1_SPI_CLOCK_D13
: SPI clock on D13
- X-NUCLEO-BNRG2A1
BNRG2A1_SPI_CLOCK_D3
: SPI clock on D3BNRG2A1_SPI_CLOCK_D13
: SPI clock on D13
CUSTOM_BLE_SPI
: define a custom configuration, it requires below definition:BLE_SPI_MISO
: SPI MISO pinBLE_SPI_MOSI
: SPI MOSI pinBLE_SPI_CLK
: SPI CLocK pinBLE_SPI_CS
: SPI Chip Select pinBLE_SPI_IRQ
: SPI IRQ pinBLE_SPI_FREQ
: SPI bus frequencyBLE_SPI_MODE
: can be one of the belowSPIMode
:SPI_MODE0
SPI_MODE1
SPI_MODE2
SPI_MODE0
BLE_CHIP_TYPE
: can be one of the belowBLEChip_t
:SPBTLE_RF
SPBTLE_1S
BLUENRG_M2SP
BLUENRG_M0
BLUENRG_LP
BLE_RESET
: BLE reset pin
To use theX-NUCLEO-IDB05A2 with SPI clock on D3, define inble_spi_conf.h
:
#defineIDB05A2_SPI_CLOCK_D3
This is equivalent to the below configuration using theCUSTOM_BLE_SPI
:
#defineCUSTOM_BLE_SPI#defineBLE_SPI_MISO D12#defineBLE_SPI_MOSI D11#defineBLE_SPI_CLK D3#defineBLE_SPI_CS A1#defineBLE_SPI_IRQ A0#defineBLE_SPI_FREQ 8000000#defineBLE_SPI_MODE SPI_MODE0#defineBLE_CHIP_TYPE BLUENRG_M0#defineBLE_RESET D7
If required, user can use a compatible BLE module over SPI.
In theble_spi_conf.h
, defineUSE_BLE_SPI
.
Copyright (c) 2019 STMicroelectronics. All rights reserved.Copyright (c) 2019 Arduino SA. All rights reserved.This library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
About
ArduinoBLE library fork to support ST BLE modules
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- C++64.5%
- C35.5%