This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Testing of Current time service

Hi,

I am unable to test current time service example.I followed all the steps mentioned to test CTS Example.But, below are the log messages:

Again if I try to reset and try to connect to the device.The log messages are as below:

Please suggest me to rectify the errors and also the right way to test CTS example with 1SDK and mobile application.

Thanks & Regards,

Swathi P.

  • So, if you download the nRF Connect smartphone application and go into the "Configure GATT Server" menu, then you should add the Current Time Service, and give it a Current Time characteristic - in which you input the initial value as specified in the CTS example documentation.

    I understood by the CTS Document  that I should set initial value after step3. 

    • After the security procedure is complete, verify that the Current Time Service on the server has been discovered. The message "Current Time Service discovered on server." will be printed on the UART.
    • On the connecting device, set the values of the Current Time characteristic (UUID 0x2A2B) to 'C2 07 0B 0F 0D 25 2A 06 FE 08' and click 'Write'.

    I have already configured gatt server on my mobile.Do I need to give on to the characteristic value before connection i.e while creating gatt server itself?

    Thanks & Regards,

    Swathi P

  • Hello again,

    swathi p said:
    I have already configured gatt server on my mobile.

    That is good to hear.
    Have you tested your implementation against the device running the CTS example?
    Could you provide the log of the serial output by the device, when you connect it to your application(like you did when you submitted the ticket?).
    The important part would be that the message "Current time service discovered on server" is printed on the UART - that would mean you have configured the GATT server to have the CTS service correstly.

    swathi p said:
    Do I need to give on to the characteristic value before connection i.e while creating gatt server itself?

    I do not understand you question. You will also need to give the Current Time Service a Current Time characteristic, if the device is to query for the current time.

    Best regards,
    Karl

  • Hi,

    Have you tested your implementation against the device running the CTS example?
    Could you provide the log of the serial output by the device, when you connect it to your application(like you did when you submitted the ticket?).
    The important part would be that the message "Current time service discovered on server" is printed on the UART - that would mean you have configured the GATT server to have the CTS service correstly.

    Below is the log capture:

    if you download the nRF Connect smartphone application and go into the "Configure GATT Server" menu, then you should add the Current Time Service, and give it a Current Time characteristic - in which you input the initial value as specified in the CTS example documentation.

    I didn't understand that whether we have to give initial value after discovering Service or we have to give while configuring server like while setting properties and giving value.According to the CTS Document we have to write initial value after discovering service.

    Please let me know what does the error in the log exactly mean?

    Thanks & Regards,

    Swathi P

  • And the other thing which I didn't understand is ,in Apple it was displaying time on UART after 2 times connect and disconnect operation and then connect discover service and press button.For third time it is discovering service.But confusing part is I haven't configured any gatt server on iPhone.

  • Hello Swathi P,

    swathi p said:
    Please let me know what does the error in the log exactly mean?

    Please see the line roughly centered in the log, it reads:
    "<info> app: Current Time Service not found on serv<info> app: Current Time Service not found on server." 
    This leads me to believe that you still have not configured your GATT server to provide the CTS service correctly.
    You might find this answer by my colleague helpful to have a look at. Notice especially the Android CTS server Application he references in his reply.
    Again, I would highly recommend that you test this example with the nRF Connect application for Android first, to verify that you have understood and setup the GATT server and example correctly. The description of how to do this is provided as a step-by-step in the example documentation.

    swathi p said:
    I didn't understand that whether we have to give initial value after discovering Service or we have to give while configuring server like while setting properties and giving value.

     You will have to setup the Current Time characteristic on the Current Time Service server before you may discover it on your CTS peripheral device.

    swathi p said:
    in Apple it was displaying time on UART after 2 times connect and disconnect operation and then connect discover service and press button.For third time it is discovering service.But confusing part is I haven't configured any gatt server on iPhone.

    This is as expected, since CTS is a native service on iOS - it is provided to all connected BLE devices.

    Best regards,
    Karl

Related