Creating a minimal design with BGM111 requires only a few pins to be exposed and connected for a fully functional stand-alone device. The board, on which the BGM111 is to be mounted, needs to provide power supply to the module and the programming pins need to be accessible in production to program the devices with the image containing the firmware, configurations, GATT structure and the application code.
When the module is to be configured as a network co-processor an additional host interface needs to be added to the minimal design.
Attached can be found a minimal reference design schematics, with the pin connections explained in the table below.
|VCC||+3.3V power supply (2)|
|PF0||Programming pin (SWCLK)|
|PF1||Programming pin (SWDIO)|
|PA0||UART TX (1)|
|PA1||UART RX (1)|
|PA2||UART RTS (1)|
|PA3||UART CTS (1)|
(1) Optional connections for NCP mode. Factory default UART pins
(2) Please refer to the datasheet for the voltage supply extremes
NOTE: SW (Serial wire) programming pins are fixed in the module design, but UART pins can be selected freely from the available GPIOs using the module configuration options.
For layout design recommendations, please refer to the datasheet.
Demonstrates a BGScript implementation of a master/scanning device, rather than the slave/peripheral end which most other example projects implement. See architectural comments in the beginning of htm_collector.bgs file for a detailed explanation of the operational flow. Requires a separate peripheral device which implements the Health Thermometer profile.
Note: This project is for BT121 module only. A version that works with BLE11x modules can be found here.
Scanning for HTM devices will begin automatically. This project parses the advertisement packet for the Health Thermometer service UUID (0x1809), and attempts to connect to the first device it sees which advertises this service. Once connected, it locates the HTM measurement characteristic, enables indications on it, and then outputs the incoming measurements until the device goes out of range or is otherwise disconnected.
This project should work with any Bluetooth Smart device that implements the Health Thermometer profile. One possibility is to use a BT121 development board running the bgdemo example that is included in Smart Ready SDK.
By default, the application will connect to any device that advertises the Health Thermometer service. If you want the application to connect only to one specific device, there is an option in the script to limit the connection to fixed MAC address only.
This option is enabled by setting constant 'use_fixed_addr' to a non-zero value. The fixed MAC address is initialized in system_boot event.