This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Couple Questions on Bluetooth

Other Parts Discussed in Thread: CC2541, CC2541DK-MINI

So to get started with the keyfob, let's say I just want to make an external connection to a sensor and send to a smartphone or whatever, I have to do the following:

Configure the pins on the CC2541 so that the sensor is an input to the ADC. Cool, easy to do.

Then I get the ADC conversion using the HAL protocols inside the GATT functions to send it via bluetooth?

I'm just not clear on the system level of this device. Does the GATT interact with the microcontroller and registers via the HAL? And does the GAP broadcast the GATT?

  • I would recommend that you check out our CC2541DK-MINI kit and take a look at the KeyFobDemo sample project that is included in our SDK (www.ti.com/blestack). This should give you a good overview of how GATT is used to send data over a BLE a connection.

    In your case you would have to write an application (or modify one of our many existing sample applications) to perform an ADC read using the HAL_ADC drivers, get the data, and then set the value of a GATT characteristic to the value read from the ADC.

  • Ya, but the code samples have little to no comments and have no explanation from the software guide. Therefore, looking at it without explanation means nothing.