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.

CC2541: Iphone "built-in" Current Time Service explained

Part Number: CC2541

I recently tested  the TimeApp example from the BLE-CC254x-1.4.0 stack and for my surprise, After establishing connection, the cc2541 board running the TimeApp example discovered a CTS service on the IPhone and retrieved the current time. Could anybody explained how this is possible ?

What other built-in services are available ?

What about Android ?

Tested with phones running IOS v: 9.3.6 and  15.1

  • Hey Itamar,

    The basic operation is detailed in the SDK's "TI_BLE_Sample_Applications_Guide.pdf", located in the docs folder of the SDK install directory. I welcome you to read through Section 16 that explains the example in more detail.

    Put simply, the example implements Bluetooth SIG defined profiles (listed in the doc). The CTS service is one of them. When the TimeApp connects, it searches for the characteristics displayed by the phone and retrieves it (if available). There are other services listed as well, like DST Change Service, Battery Service, etc.

    What about Android ?

    This depends on the smartphone that is used. You may find similar behavior with certain phones if the characteristic information is available on the device and exposed to peripherals that connect.

  • Hey Ammar

    What surprise me is that there is actually a (built-in) CTS service on the  the IPhone without installing any App that  expose such service.

    You wrote: "There are other services listed as well, like DST Change Service, Battery Service, etc.".As I understand it,  the CTS and DST services are what the TimApp is searching for on the IPhone, while the battery Service is expose by the TimeApp To be consumed by the Iphone or an App running on it. 

    Am I missing something here ?

  • I believe the example will actually discover the battery service on the iphone and extract the cell phone's battery level. If you take a look at the example code, you will find the function that discovers the battery service if it exists in timeapp_discovery.c::TimeAppDiscBatt() 

    Of course, this can be done the other way around as well and you can expose the battery level of the embedded device.