3. Bluetooth Low Energy (BLE) Feature
3. Bluetooth Low Energy (BLE) Feature
The traditional Bluetooth standard is convenient for constant-flow media transfer applications such as video
streaming. The Bluetooth Low Energy standard was introduced for applications requiring a lower power
consumption profile. Data is sent in bursts, followed by periods of electrical idle.
The TWN4 MultiTech 2 BLE uses the BGM111 module from Silicon Labs. The chip implements the
Physical, Link and L2CAP Layers of the BLE Protocol. The API is implemented within the firmware of
the main TWN4 microcontroller. The 2 chips interact via the COM2 port of the microcontroller, thereby
rendering this port unavailable for custom user functions.
Devices supporting the BLE standard communicate using a protocol named Generic Attribute Profile
(GATT). GATT defines two roles: Server and Client. A GATT Server stores attributes of the device and
sends them to a Client upon request. The TWN4 MultiTech 2 BLE acts as a GATT server, receiving re-
quests for information from the link partner (ex. cellphone) and transmitting relevant attributes back.
Some attributes are pre-defined by the Bluetooth standard; they include the General Access Profile and De-
vice Information. This information is read-only and is used for identification of the device. In the case of the
TWN4 MultiTech 2 BLE module, these read-only attributes are listed in Table B.1. The UUID identifies the
attribute in a global sense; this is the ID that the GATT Client (cellphone) sees. The Attribute Handle is what
is used within the Application running on the TWN4 microcontroller. When a request for a certain UUID
comes from outside TWN4, the App running on TWN4 microcontroller requests this information from the
BGM111 module using the Attribute Handle (See API command BLEGetGattServerAttributeValue).
Developers are free to introduce custom product-specific attributes with variable (read-only, read/write)
permissions. In the case of the TWN4 MultiTech 2 BLE module, the Generic Attribute service is introduced
(Table B.2). This is the method by which a GATT Client can obtain RFID card information from the TWN4.
The GATT Client (cellphone) makes a request for a custom-defined UUID (see Table B.3). This triggers a
request for the Generic Attribute service from the BLE module. The RFID data is then sent from the BLE
module to the TWN4 microcontroller and subsequently to the GATT Client.
The list of available attribute handlers is not sent to the GATT Client at any point, and no command is
available to request it. The UUIDs must be pre-programmed into the GATT Client in advance. This is
not an issue for Bluetooth-defined UUIDs such as Device Information, but is something to be aware of
regarding the custom-defined attributes.
For more information regarding the Bluetooth Low Energy Standard please see document "Designing for
Bluetooth Low Energy"[1] from Silicon Labs.
For the description of all the BLE-related commands available, please see the TWN4 API document.
Page 7 of 14
Need help?
Do you have a question about the TWN4 MultiTech 2 BLE and is the answer not in the manual?
Questions and answers