This looks easy to implement in Espruino so device/smartwatch can be used as source of time for other devices around - will try it.
As for putting it into advertisement/scan response what about using same format - like including manufacturer data in format
2A2B + 10 bytes + 2A0f + 2 bytes - that's 18 bytes total.
The advertisement packet could just advertise CTS service GUID 1805 as a marker to look for this data and the 18byte data could be in scan response (if it fits). Or could be splitted - the 2byte one in advertisement (timezone, shorter but less interesting) and the 10 byte one (time) in scan reply.
Main idea is to prefix data with 16bit characteristics id so it could be detected inside manufacturer data. Or is there better way to put it there somehow directly (out of manufacturer data)?
EDIT: it is more complex, found also some cypress definition of the service and there is one more characteristics Reference Time Information
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Was looking into synchronizing time and found this topic.
Is this about CTS - Current Time Service or something else?
service guid 00001805-0000-1000-8000-00805f9b34fb
+2 characterictics
2A2B - Current Time
10 bytes
2A0F - Local Time Information
2 byte
as mentioned here?
https://github.com/RideBeeline/android-bluetooth-current-time-service/blob/master/currenttimeservice/src/main/java/co/beeline/android/bluetooth/currenttimeservice/CurrentTimeService.java#L32
Implementation is in 2 methods here https://github.com/RideBeeline/android-bluetooth-current-time-service/blob/master/currenttimeservice/src/main/java/co/beeline/android/bluetooth/currenttimeservice/TimeData.java#L44 and here
https://github.com/RideBeeline/android-bluetooth-current-time-service/blob/master/currenttimeservice/src/main/java/co/beeline/android/bluetooth/currenttimeservice/TimeData.java#L67
This looks easy to implement in Espruino so device/smartwatch can be used as source of time for other devices around - will try it.
As for putting it into advertisement/scan response what about using same format - like including manufacturer data in format
2A2B + 10 bytes + 2A0f + 2 bytes - that's 18 bytes total.
The advertisement packet could just advertise CTS service GUID 1805 as a marker to look for this data and the 18byte data could be in scan response (if it fits). Or could be splitted - the 2byte one in advertisement (timezone, shorter but less interesting) and the 10 byte one (time) in scan reply.
Main idea is to prefix data with 16bit characteristics id so it could be detected inside manufacturer data. Or is there better way to put it there somehow directly (out of manufacturer data)?
EDIT: it is more complex, found also some cypress definition of the service and there is one more characteristics Reference Time Information
The CTS specs are listed here https://www.bluetooth.com/specifications/gatt/ linking to CTS PDF here so just those three characteristics are there and only the first one is mandatory. And Nordic client implementation https://github.com/espruino/Espruino/blob/master/targetlibs/nrf5x_12/components/ble/ble_services/ble_cts_c/ble_cts_c.c is reading just the 10 byte 'current time' one.