README.md 1.32 KB
Newer Older
Ramirez, Yvan's avatar
Ramirez, Yvan committed
1
2
# BlueNRG_Scanner

3
This is a BLE scanner example for the ST BluenrgMS, it shows the device and the RSSI. This code works with the NucleoL053 and the X-Nucleo-IDB05A1 expansion board.
4

Ramirez, Yvan's avatar
Ramirez, Yvan committed
5
6
![NUCLEOL053](https://www.st.com/bin/ecommerce/api/image.PF260001.en.feature-description-include-personalized-no-cpn-large.jpg)
![BLE expansion board](https://media.digikey.com/Photos/STMicro%20Photos/X-NUCLEO-IDB05A1.JPG)
Ramirez, Yvan's avatar
Ramirez, Yvan committed
7
8
9
10

## Prerequisites

*  Download STM32CubeMX
11
*  Download X-CUBE-BLE1 (This example uses the 4.3.0 version, sometimes the 4.4.0 doesn't work)
Ramirez, Yvan's avatar
Ramirez, Yvan committed
12
*  Download either KEIL or OpenSTM32. DO NOT USE IAR or CUBEIDE (IAR and STM32cubeIDE can cause problems.)
Ramirez, Yvan's avatar
Ramirez, Yvan committed
13
14
15

### Getting Started

16
17
18
19
20
21
22
23
Open CubeMX, create a new project for the NUCLEO-L053 and configure the pinnouts as follow:
```
BLE_SCK   - SPI1_SCK    - PB3
BLE_MISO  - SPI1_MISO   - PA6
BLE_MOSI  - SPI1_MOSI   - PA7
BLE_IRQ   - GPIO_EXTI0  - PA0
BLE_CS    - GPIO_Output - PA1
BLE_Reset - GPIO_Output - PA8
Ramirez, Yvan's avatar
Ramirez, Yvan committed
24
25
            USART2_TX   - PA2
            USART2_RX   - PA3
26
27
28
29
30
31
32
```
Go to additional software and on the STMicroelectronics.X-CUBE-BLE1 select the Wireless_BlueNRG-MS list and put the following options.
```
Controller          -   Selected
HCI_TL              -   Basic
HCI_TL_INTERFACE    -   UserBoard
Utils               -   Selected
Ramirez, Yvan's avatar
Ramirez, Yvan committed
33
```
Ramirez, Yvan's avatar
Ramirez, Yvan committed
34
35
![Config image1](Images/Img1.PNG)
![Config image1](Images/Img2.PNG)