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.

CC2650STK battery service availability

Other Parts Discussed in Thread: CC2650STK, CC2650

How can I implement a battery service in the sensortag example to monitor battery level in a CC2650STK device?  I did notice a file named sensortag_batt.c in the sensor tag example and assumed that this may have something to do with a battery service.

I also used Gatttool to get a list of primary UUID's from the device and  0x180F Battery Service definition was not listed.

Any assistance would be greatly appreciated.

Thanx

  • Yes, you can use the battery service (battservice.c).  I'm not sure what you're doing wrong but the battery service is definitely included with the 2.2.0 sensortag project. Here are the files in the IAR project:

    Here is the service as discovered by BTool:

  • Tim,

    I apologize for not being more specific.  I'm using the TI cloud tools to build the sensortag example and flash the CC2650.  As far as I can tell, the cloud version of the sensortag example doesn't include the battery service.

    The local version does have the battery service.  Unfortunately, I cannot successfully build the example using the local Code Composer Studio version 6.13.  I spend most of my time searching for solutions to problems  that I have encountered with CCS 6.13.  My latest problem is...

    js: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/cfg/Main.xs", line 160: Error: Configuration failed!
    gmake.exe: *** [package/cfg/app_ble_pem3.xdl] Error 1
    gmake.exe: *** Deleting file `package/cfg/app_ble_pem3.xdl'
    gmake.exe: *** [package/cfg/app_ble_pem3.xdl] Deleting file `package/cfg/app_ble_pem3.h'
    gmake.exe: *** [package/cfg/app_ble_pem3.xdl] Deleting file `package/cfg/app_ble_pem3.c'
    js: "C:/ti/xdctools_3_32_00_06_core/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/linker.cmd] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    So, I believe my question should be... is there anyway to add the necessary files to the cloud sensortag example to enable battery service?

    Thanx

  • Yes I would recommend just using the same method that the local version uses. The easiest way to find this would probably be to diff the two application files (sensortag.c).

    For a better functional understanding, you could go through the simpleLink academy (software-dl.ti.com/.../overview.html) which describes how to add a service. There is also useful information in the GATT section of the SDG: www.ti.com/.../swru393
  • I believe the simplelink academy would be extremely helpful.  But I can't access it via the posted link.  I get the following error..

    The requested URL /lprf/simplelink_academy/overview.html) was not found on this server.