TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 References Included with Texas Instruments Bluetooth low energy v1.4.1 Stack Release (All path and file references in this document assume that the BLE development kit software has been installed to the default path C:\Texas Instruments\BLE-CC254x-1.4.1\): [1] Texas Instruments Bluetooth®...
The purpose of this document is to give an overview of the sample applications that are included in the Texas Instruments CC2540/41 Bluetooth® low energy (BLE) software development kit. It is recommended that you read [1] before attempting to use these sample applications, as some knowledge of the CC2540/41 BLE protocol stack and software is required.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 The peer device may also discover the device information service for more information such as mfg and serial number. Once blood pressure measurements have been enabled the application will begin sending data to the peer containing simulated measurement values.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 bpServiceCB: This is the blood pressure service callback. It handles enabling or disabling measurements. TimeAppPairStateCB: This is a GAPBOND callback to handle pairing states. TimeAppPasscodeCB: Returns the passcode of 0.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 When in a connection or configured to take measurements, this increases the temperature by 1 degree Celsius. After 3 degrees in temperature rise, the interval will be set to 30 seconds and if configured, this will indicate to the peer an interval change initiated at the thermometer.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 called to set up the GAP functions of the application. Then GAPBondMgr_Register is called to register with the bond manager. 3.2.2 Event Processing The application has two main event processing functions, Thermometer_ProcessEvent and Thermometer_ProcessOSALMsg.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 3.2.7 Thermometer Measurement Format Temperature Time Stamp Temperature Type Flags Measurement Value (if present) (if present) Size 1 octet 4 octets 0 or 7 octets 0 or 1 octet...
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 The application is implemented in the file heartrate.c. 4.2.1 Initialization The initialization of the application occurs in two phases: first, the HeartRate_Init function is called by the OSAL. This function configures parameters in the peripheral profile, GAP, and GAP bond manager.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Speed and Cadence Profile. This profile also makes use of the optional Device Info Service, which has default values that may be altered at compile or runtime to aid in identifying a specific BLE device.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 The application is implemented in the file cyclingSensor.c. 5.2.1 Initialization Initialization of the application occurs in two phases: first, the CyclingSensor_Init function is called by the OSAL. This function configures parameters in the peripheral profile, GAP, and GAP bond manager.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Total distance Multiple sensor locations Sending a read request to the Sensor Location characteristic triggers a response packet containing the set position of the sensor on the bicycle. This value may be set by writing to the control point (see below), requesting a sensor location update.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 6.1.2 Basic Operation Power up the device and press the right button to enable advertising. From a RSC collector peer device, initiate a device discovery and connection procedure to discover and connect to the cycling sensor.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Function cycling_ProcessOSALMsg handles OSAL messages as follows: KEY_CHANGE message: Call function sensor_HandleKeys to handle key presses. 6.2.3 Callbacks The application callback functions are as follows: SensorGAPStateCB: This is the GAP event callback. It processes GAP events for startup and link connect/disconnect.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 6.2.8 Neglect Timer This device has a compile time option that allows the sensor to terminate a connection if it sees no user input for 15 seconds. In the context of this application, this means that after the device has connected and notifications are disabled, the application starts a timer.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 To disconnect press Joystick Center again. To reconnect to the same device again press Joystick Center again. 7.1.3 Record Filter Configuration Glucose record requests use filters to select the records that will be operated on by the request.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 GlucCollPairStateCB: This is the GAP bond manager state callback. It displays the status of pairing and bonding operations. GlucCollPasscodeCB: This is the GAP bond manager passcode callback. It generates and displays a passcode.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 When not connected, the keyfob's right button is used to toggle advertising on and off. When in a connection, the keyfob's left button sends a glucose measurement and glucose context.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 GlucoseCB: This is the glucose service callback. It handles enabling or disabling of indications of the glucose measurement, context, glucose measurement context, and record access control point.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 The project contains one configuration, CC2540DK-MINI Keyfob Slave, using the keyfob hardware platform. 10.1.1 User Interface When not connected and not already advertising, pressing either button will initiate advertising.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Function HidEmuKbd_ProcessOSALMsg handles OSAL messages as follows: KEY_CHANGE messages: Call function HidEmuKbd_HandleKeys to handle keypresses. 10.3.3 Callbacks The application callback functions are as follows: hidEmuKbdRptCB: This is the HID device report callback. It processes HID reports received from the HID host.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 hidDevScanParamCB: This is the scan parameters service callback. Handle a scan parameters service event. 10.4.4 GATT Read and Write Callbacks The HID device profile GATT read and write callbacks, HidDev_WriteAttrCB and HidDev_ReadAttrCB handle reading and writing of all HID characteristics.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Link Loss (for Proximity Profile, Reporter role; see [14] and [16]) Immediate Alert (for Proximity Profile, Reporter role and Find Me Profile, Target role; see [14], [15], and [17]) ...
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 A value of “00” indicates that neither key is pressed. A value of “01” indicates that the left key is pressed. A value of “02” indicates that the right key is pressed. A value of “03” indicates that both keys are pressed.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 13 SensorTag The SensorTag is a BLE peripheral slave device which runs on the CC2541 SensorTag hardware platform. The Sensor Tag includes five peripheral sensors with a complete software solution for sensor drivers interfaced to a GATT server running on TI BLE stack.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 Left and Right Buttons: The Simple Keys service on the SensorTag allows the device to send notifications of key presses and releases to a central device. 14 SimpleBLECentral The SimpleBLECentral project implements a very simple BLE central device with GATT client functionality.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 16.1.2 Basic Operation When the application powers up it displays "Time App", the BD address of the device, and a default time and date of "00:00 Jan01 2000". To connect, press Joystick Up to start advertising then initiate a connection from a peer device.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 START_DEVICE_EVT: Start the device, as described in the previous section. START_DISCOVERY_EVT: Start service discovery. CLOCK_UPDATE_EVT: Update the clock display. Function timeApp_ProcessOSALMsg handles OSAL messages as follows: ...
MCU to change firmware without using the CC Debugger. There are project options for both UART and SPI. 17.1.1 SBL Developer’s Guide A detailed guide on the serial bootloader can be found on the Texas Instruments wiki page. http://processors.wiki.ti.com/index.php/SerialBootLoader 17.2 Target Requirements The target must be setup with the SBL (Serial Bootloader).
OAD image client (OAD target). There is also a method for performing encrypted OAD using the hardware AES engine. 19.1 OAD Developer’s Guide A detailed guide on the entire OAD process can be found on the Texas Instruments wiki page. http://processors.wiki.ti.com/images/8/82/OAD_for_CC254x.pdf 19.2 Target Requirements The target must be setup with a BIM (Boot Image Manager) and at least one image with OAD profile support.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 19.3 Server Requirements The installer includes a server application compatible with the SBL Tool which runs on the SmartRF board. The project allows the user to connect load an image over the serial port, and then transfer it over the air to the target.
TI CC2540 Bluetooth low energy Sample Applications Guide v1.4.1 SWRU297 Version 1.4.1 20 General Information 20.1 Document History Table 1: Document History Revision Date Description/Changes 2011-07-13 Initial release, documenting sample applications included in BLEv1.1 release 2012-02-07 Updated to align with BLEv1.2 release sample applications.
Page 36
TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Applications Amplifiers amplifier.ti.com...
Need help?
Do you have a question about the CC2540 and is the answer not in the manual?
Questions and answers