Thursday, July 3, 2014

STM32F401 Disco sensor demo with Bluetooth Low Energy

1 Introduction

stm32f4-bluenrg is a sensor demo project for STM32F401 Discovery board in conjunction with a BlueNRG module.

The BlueNRG app allows you to access the sensor data directly from the mobile device over Bluetooth Low Energy.

The STM32F401 Discovery creates a GATT (Generic Attribute Profile) vendor characteristic, and several services including the one reporting Accelerometer data. The mobile phone (BlueNRG app) connecting the board, aquires Accelerometer data, and visualizes it with a 3D cube.

2 Requirements

2.1 Hardware

Two devices are needed:

The connection between F401CDiscovery and BlueNRG board is 5-wire SPI, which is a standard 4-wire SPI with an additional IRQ pin. The IRQ pin is for BlueNRG module to notify F401CDiscovery to receive packets.

2.2 Software

BlueNRG app is available for both Android and iPhone:

3 Download, Build and Run

Clone the project:

git clone https://github.com/winfred-lu/stm32f4-bluenrg.git

Build the project:

make clean
make
make flash

Start the BlueNRG app and connect.

Demo video on YouTube:

4 comments:

kahwai said...

make: *** [Drivers/BSP/STM32F401-Discovery/stm32f401_discovery.o] Error 127

During build project i meet this error..
Can u guide me? please.. Thank you

Winfred said...

Hi Kahawai,
Please check if toolchain is installed and configured correctly.

kahwai said...

Hi Winfred,

Thanks for your help.
I check my toolchain and configuration again.

Could you share me your hardware circuit connection for STEVAL-IDB002V1 and STM32F401C Discovery kit ?

I have both of above prototype.
I need to know which port you use to link up both.

Thanks for sharing.
Regard
Kahwai

kahwai said...

Hi Winfred ..

manage to compile the code.
i think the hardware hockup is just connecting the SPI bus to between both device.
share you some update if i successful on it.

Thank
Regard
Kah Wai