This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Add CTS current time service

Hi all,

i want to add a cts service to my project. i started with ble_cts example of sdk 11.0, but it's not clear what is the correct procedure to do it. I add the service in service init and the db_ event_handler and cts_event_handler in my project. But the problem is that softdevice don't receive the BLE_GATTC_EVT_CHAR_DISC_RSP. There is other thing that i must done? What is the correct procedure to add a service current time?

Thank you!!

Parents
  • FormerMember
    0 FormerMember

    In general, when adding a service, what you need to add is everything that is specific for that service. From looking at ble_app_cts_c, it should a least be the following:

    • Services_init()
    • The discovery module:
    • db_discovery_init()
    • db_disc_handler(..)
    • ble_db_discovery_on_ble_evt(..): should be added in ble_evt_dispatch(..)
    • ble_cts_c_on_ble_evt(..): should bed added in ble_evt_dispatch(..)
    • on_cts_c_evt() :

    Functions that you may consider to take a look at:

    • on_ble_evt(..)
    • current_time_print()

    Let me know if it still doesn't work after adding everything from the above list.

Reply
  • FormerMember
    0 FormerMember

    In general, when adding a service, what you need to add is everything that is specific for that service. From looking at ble_app_cts_c, it should a least be the following:

    • Services_init()
    • The discovery module:
    • db_discovery_init()
    • db_disc_handler(..)
    • ble_db_discovery_on_ble_evt(..): should be added in ble_evt_dispatch(..)
    • ble_cts_c_on_ble_evt(..): should bed added in ble_evt_dispatch(..)
    • on_cts_c_evt() :

    Functions that you may consider to take a look at:

    • on_ble_evt(..)
    • current_time_print()

    Let me know if it still doesn't work after adding everything from the above list.

Children
Related