ST的蓝牙4.0小板子收到了,采用集成了蓝牙4.0协议栈的BlueNRG系列芯片,兼容arduino-U3接口的shield形式的板子。
试用过程需要如下资料,请在ST官网查看。
DM00116524_UM1765_X-NUCLEO-IDB04A1 Bluetooth low energy expansion board based on BlueNRG for STM32 Nucleo
DM00116526_AN4493_X-NUCLEO-IDB04A1 Bluetooth low energy expansion board based on BlueNRG for STM32 Nucleo
x-cube-idb04_l0
支持android、iphone、ipad手机(必须支持蓝牙4.0的软硬件,即android4.3以上, iphone4S以上,且ios版本>=6)
安装对应的App,我把android的apk文件列在附件了, 各位可以下载。官方也可以下载android和iphone的app的源代码,不过我注册了没收到验证邮件, 就没下载了。
使用Keil或者IAR打开x-cube-idb04_l0里的 X-CUBE-IDB04\Projects\STM32L053R8-Nucleo\Applications\Bluetooth_LE\SensorDemo的项目文件, 编译(keil编译之前可以修改option里面的debug,选择STlink,而不是原来的ulink), 下载到L053-Nucleo开发板中,就可以了。
@par Example Description
Main function to show how to use the BlueNRG Bluetooth Low Energy
shield to send data from a Nucleo board to a smartphone with
the support BLE and the "BlueNRG" app freely available on both GooglePlay and iTunes.
The URL to the iTunes for BlueNRG is
http://itunes.apple.com/app/bluenrg/id705873549?uo=5
The URL to the GooglePlay is
https://play.google.com/store/apps/details?id=com.st.bluenrg
The source code of the "BlueNRG" app, both for iOS and Android, is freely downloadable
from the developer website at
http://software.g-maps.it/
NO SUPPORT WILL BE PROVIDED TO YOU BY STMICROELECTRONICS FOR THIS OR ANY OF THE
ANDROID .apk FILES OR SOURCE CODES INCLUDED IN OR REFERENCED BY THIS PACKAGE.
The board will act as Server-Peripheral.
After connection has been established:
- by pressing the USER button on the board, the cube showed by
the app on the smartphone will rotate on the x-axis in one direction;
- by moving the USER joystick on the board, the cube showed by
the app on the smartphone will rotate accordingly (FEATURE NOT AVAILABLE YET).
The communication is done using a vendor specific profile.
在手机上安装好app后,打开,搜索,连接,OK!
效果如下图。
采用我编译的android-SDK自带的BLE-demo,截图如下:
ST官方的Bluenrg-App(android)
com.st.bluenrg.rar
(1.22 MB, 下载次数: 383)
android-SDK自带的BLE-demo的App
Android_BLE_GattSample(androidSDK自带例程_Mars4zhu编译).rar
(308.38 KB, 下载次数: 200)