STMicroelectronics Development Tools for BLE

发布人是

In the competitive Bluetooth Low Energy chips, STMicroelectronics differentiates itself from the competition thanks to unique development tools and a standalone solution with no application embedded microcontroller. An external microcontroller is necessary and communicates via an SPI bus with the BLUENRG-MS.

参阅相关产品

BLUENRG-MSQTR

STMicroelectronics 蓝牙 查看

A great tool is the BlueNRG Current Consumption, which allows you to visualize which parameters have the most influence on the power consumption. For instance, if we advertise 10 byte long data every 100 ms or 20 bytes every 200 millisecond, the difference of current consumption is around 40% for the same data rate. 

0217 STMicro BLE Image 1

0217 STMicro BLE Image 2

But if the data rarely changes and 10 seconds is good enough, the current consumption decreases by 98%. 

0217 STMicro BLE Image 3

This application allows you to simulate all the configurations: scanning, advertising, connection in slave or master mode, number of channels for advertising, accuracy of the crystal and all the timings that are specified by the Special Interest Group (SIG). So before entering in the programming details to optimize the microcontroller, it is important to adequately specify the application requirements and understand the consequences of current consumption for each specification. This tool, whatever the final designed product, helps you to decide about trade-offs.

Because it can be tedious to develop and test their silicon when writing embedded programming firmware, STMicroelectronics offers the option to use Python. A software called BlueNRG GUI works in conjunction with a USB dongle that can be ordered as P/N STEVAL-IDB006V1M.

The tab script allows you to launch Python scripts. 

0217 STMicro BLE Image 4

All the specific Python commands are explained in the user manual UM2058.

0217 STMicro BLE Image 5

When installing the BlueNRG GUI software, many examples of Python scripts are provided. Let's explain the script shown below.

0217 STMicro BLE Image 6

The beginning of the program is a set-up. The hardware is reset followed by the mode configuration. Four modes are available. As we want only one connection as a slave, we need to choose mode 2. The public address must be defined as in general advertising, the payload always contains the 6 bytes of the advertising device address. The address can be entered as a parameter, but that is optional. With no parameter, the Python script automatically decides the address. With the windows at the bottom, we have access to the raw packets and meaning of each byte. By double clicking, a window pops up showing the raw packet. In our case, the address is 0x0280E1008BC5.

0217 STMicro BLE Image 7

The transmission power level is equal to -2 dBm as shown by the correspondence table between enable high power, PA level and transmission power.

0217 STMicro BLE Image 8

The GATT and GAP are initialized, the GAP as a peripheral. Then it is time to set up the service as a primary service that returns the service handle and add the characteristic inside the service. The parameters for each function are self-explanatory. All the details are available through the BlueNRG GUI or with the user manual UM1865 as shown for the add characteristic below. 

0217 STMicro BLE Image 9

There is an optional scan response, and the advertising discoverable parameters are written with the local name 'test'.

When the script is running, a sniffer can be used to monitor the packets sent by BLE devices.

0217 STMicro BLE Image 10

In the AdvData section, it is verified that sent data matches the code. The payload has the following meaning:

- 02 01 06: 2 bytes; for flag 01 classic Bluetooth not supported and general discoverable mode for BLE

- 05 08 74 65 73 74: 5 bytes; with shortened name 'test'

- 05 12 06 00 08 00 : 5 bytes; flag 12 for slave connection internal range, and the minimum and maximum equal to parameters when we called the ACI_GAP_SET-DISCOVERABLE function

- 02 0A FE: 2 bytes for flag 0A (transmission power) and FE means -2dbm

We confirm these are the values that are entered in the code.

We finally wait for the connection, and in an infinite loop, a random number is generated, the characteristic value is updated and the system sleeps for one second. The script just needs to be uploaded in the Blue NRG GUI, and then you can push the “run script” button.

Once the Python script meets the requirements, you are ready to write an embedded program and take advantage of the ST ecosystem. Indeed, the BlueNRG also comes with an Arduino shield that can be plugged directly to an STM32 boardSTMicroelectronics is a leader in cortex M microcontrollers thanks to its large family of STM32. 

Python script, a USB dongle, an Arduino board easily pluggable to microcontroller boards and current consumption simulation are the key tools from STMicroelectronics that will allow you to develop a Bluetooth Low Energy application in a quick and efficient manner.

最新消息

Sorry, your filter selection returned no results.

请仔细阅读我们近期更改的隐私政策。当按下确认键时,您已了解并同意艾睿电子的隐私政策和用户协议。

本网站需使用cookies以改善用户您的体验并进一步改进我们的网站。此处阅读了解关于网站cookies的使用以及如何禁用cookies。网页cookies和追踪功能或許用于市场分析。当您按下同意按钮,您已经了解并同意在您的设备上接受cookies,并给予网站追踪权限。更多关于如何取消网站cookies及追踪的信息,请点击下方“阅读更多”。尽管同意启用cookies追踪与否取决用户意愿,取消网页cookies及追踪可能导致网站运作或显示异常,亦或导致相关推荐广告减少。

我们尊重您的隐私。请在此阅读我们的隐私政策。