11# STM32duinoBLE  
22
3- This library is a fork of ArduinoBLE library to add the support of STM32WBxx , SPBTLE-RF and  SPBTLE-1S BLE modules.
4- It was successfully tested with the NUCLEO-WB15CC, P-NUCELO_WB55RG, STM32WB5MM-DK, X-NUCLEO-IDB05A2 or 
5- X-NUCLEO-IDB05A1 or X-NUCLEO-BNRG2A1 expansion board and a NUCLEO-F401RE or NUCLEO-L476RG or NUCLEO-L053R8, 
6- with B-L475E-IOT01A and with STEVAL-MKSBOX1V1. 
7- 
8-   -  In order to use this library with SM32WBxx series, you need to update the STM32WB Copro Wireless Binaries   
9- with stm32wbxx_BLE_HCILayer_fw.bin depending of your mcu:   
10- https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries      
3+ 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.
4+ 
5+ It was successfully tested with the  [ NUCLEO-WB15CC ] ,  [ P-NUCLEO-WB55RG ] ,  [ STM32WB5MM-DK ] ,  [ X-NUCLEO-IDB05A2 ]  or  [ X-NUCLEO- IDB05A1]  or [ X-NUCLEO-BNRG2A1]  expansion board and a [ NUCLEO-F401RE]  or [ NUCLEO-L476RG]  or [ NUCLEO-L053R8] , with  [ B-L475E-IOT01A ] ,  [ B-L4S5I-IOT01A ] ,  [ STEVAL-MKSBOX1V1 ] ,  [ STEVAL-MKBOXPRO ]  and with  [ STM32L562E-DK ] . 
6+ 
7+   -  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: 
8+ 
9+ https://github.com/STMicroelectronics/STM32CubeWB/tree/master/Projects/STM32WB_Copro_Wireless_Binaries 
10+ 
1111  Each subdirectories contains binaries and Release_Notes.html which explain how to update it.
1212
13-  -  In order to use this library with STEVAL-MKSBOX1V1, you need to update the firmware of the SPBTLE-1S BLE module   
14- mounted on that board as described in the following wiki page:   
15- https://github.com/stm32duino/wiki /wiki/STM32duinoBLE#stm32duinoble-with-steval_mksbox1v1 
13+  -  In order to use this library with [ STEVAL-MKSBOX1V1] , you need to update the firmware of the SPBTLE-1S BLE module mounted on that board as described in the following wiki page: 
14+ 
15+ https://github.com/stm32duino/Arduino_Core_STM32 /wiki/STM32duinoBLE#stm32duinoble-with-steval_mksbox1v1 
1616
17- -  In order to use this library with X-NUCLEO-BNRG2A1, you need to update the firmware of the BLUENRG-M2SP BLE module   
18- mounted on that expansion board as described in the following wiki page:   
19- https://github.com/stm32duino/wiki /wiki/STM32duinoBLE#stm32duinoble-with-x-nucleo-bnrg2a1 
17+ -  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: 
18+ 
19+ https://github.com/stm32duino/Arduino_Core_STM32 /wiki/STM32duinoBLE#stm32duinoble-with-x-nucleo-bnrg2a1 
2020
2121For more information about ArduinoBLE library please visit the official web page at:
22- https://github.com/ arduino-libraries /ArduinoBLE 
22+ https://www. arduino.cc/en/Reference /ArduinoBLE 
2323
2424# Configuration  
25+ 
26+ ### STM32WB  
27+ 
2528STM32Cube_WPAN has several configuration options, which are set in the ` app_conf.h ` .
2629This package has a default configuration named ` app_conf_default.h ` .
2730The user can include the file ` app_conf_custom.h `  to customize the BLE application.
2831Options wrapped in ` #ifndef ` , ` #endif `  in ` app_conf_default.h `  can be overwritten.
2932Additional options can be added.
3033
34+ ### Shield  
35+ 
36+ The user can include the file ` ble_spi_conf.h `  to define which shield and configuration to use from the following list:
37+ 
38+  *  [ X-NUCLEO-IDB05A2] 
39+     *  ` IDB05A2_SPI_CLOCK_D3 ` : SPI clock on D3
40+     *  ` IDB05A2_SPI_CLOCK_D13 `  SPI clock on D13
41+  *  [ X-NUCLEO-IDB05A1] 
42+     *  ` IDB05A1_SPI_CLOCK_D3 ` : SPI clock on D3
43+     *  ` IDB05A1_SPI_CLOCK_D13 ` : SPI clock on D13
44+  *  [ X-NUCLEO-BNRG2A1] 
45+     *  ` BNRG2A1_SPI_CLOCK_D3 ` : SPI clock on D3
46+     *  ` BNRG2A1_SPI_CLOCK_D13 ` : SPI clock on D13
47+  *  ` CUSTOM_BLE_SPI ` : define a custom configuration, it requires below definition:
48+     *  ` BLE_SPI_MISO ` : SPI MISO pin
49+     *  ` BLE_SPI_MOSI ` : SPI MOSI pin
50+     *  ` BLE_SPI_CLK ` : SPI CLocK pin
51+     *  ` BLE_SPI_CS ` : SPI Chip Select pin
52+     *  ` BLE_SPI_IRQ ` : SPI IRQ pin
53+     *  ` BLE_SPI_FREQ ` : SPI bus frequency
54+     *  ` BLE_SPI_MODE ` : can be one of the below ` SPIMode ` :
55+       *  ` SPI_MODE0 ` 
56+       *  ` SPI_MODE1 ` 
57+       *  ` SPI_MODE2 ` 
58+       *  ` SPI_MODE0 ` 
59+     *  ` BLE_CHIP_TYPE ` : can be one of the below ` BLEChip_t ` :
60+       *  ` SPBTLE_RF ` 
61+       *  ` SPBTLE_1S ` 
62+       *  ` BLUENRG_M2SP ` 
63+       *  ` BLUENRG_M0 ` 
64+       *  ` BLUENRG_LP ` 
65+     *  ` BLE_RESET ` : BLE reset pin
66+ 
67+ #### Examples  
68+ 
69+ To use the [ X-NUCLEO-IDB05A2]  with SPI clock on D3, define in ` ble_spi_conf.h ` :
70+ ``` C 
71+ #define  IDB05A2_SPI_CLOCK_D3 
72+ ``` 
73+ This is equivalent to the below configuration using the ` CUSTOM_BLE_SPI ` :
74+ ``` C 
75+ #define  CUSTOM_BLE_SPI 
76+ #define  BLE_SPI_MISO     D12 
77+ #define  BLE_SPI_MOSI     D11 
78+ #define  BLE_SPI_CLK      D3 
79+ #define  BLE_SPI_CS       A1 
80+ #define  BLE_SPI_IRQ      A0 
81+ #define  BLE_SPI_FREQ     8000000 
82+ #define  BLE_SPI_MODE     SPI_MODE0 
83+ #define  BLE_CHIP_TYPE    BLUENRG_M0
84+ #define BLE_RESET       D7
85+ ``` 
86+ 
87+ #### Using a SPI BLE module on STM32WB 
88+ 
89+ If required, user can use a compatible BLE module over SPI. 
90+ 
91+ In the `ble_spi_conf.h`, define `USE_BLE_SPI`. 
92+ 
3193## License 
3294
3395``` 
@@ -48,3 +110,19 @@ You should have received a copy of the GNU Lesser General Public
48110License along with this library; if not, write to the Free Software
49111Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
50112``` 
113+ 
114+ 
115+ B-L475E-IOT01A: https://www.st.com/en/evaluation-tools/b-l475e-iot01a.html 
116+ B-L4S5I-IOT01A: https://www.st.com/en/evaluation-tools/b-l4s5i-iot01a.html 
117+ NUCLEO-F401RE: https://www.st.com/en/evaluation-tools/nucleo-f401re.html 
118+ NUCLEO-L053R8: https://www.st.com/en/evaluation-tools/nucleo-l053r8.html 
119+ NUCLEO-L476RG: https://www.st.com/en/evaluation-tools/nucleo-l476rg.html 
120+ NUCLEO-WB15CC: https://www.st.com/en/evaluation-tools/nucleo-wb15cc.html 
121+ P-NUCLEO-WB55RG: https://www.st.com/en/evaluation-tools/p-nucleo-wb55.html 
122+ STEVAL-MKSBOX1V1: https://www.st.com/en/evaluation-tools/steval-mksbox1v1.html 
123+ STEVAL-MKBOXPRO: https://www.st.com/en/evaluation-tools/steval-mkboxpro.html 
124+ STM32L562E-DK: https://www.st.com/en/evaluation-tools/stm32l562e-dk.html 
125+ STM32WB5MM-DK: https://www.st.com/en/evaluation-tools/stm32wb5mm-dk.html 
126+ X-NUCLEO-BNRG2A1: https://www.st.com/en/ecosystems/x-nucleo-bnrg2a1.html 
127+ X-NUCLEO-IDB05A2: https://www.st.com/en/ecosystems/x-nucleo-idb05a2.html 
128+ X-NUCLEO-IDB05A1: https://www.st.com/en/ecosystems/x-nucleo-idb05a1.html 
0 commit comments