Service layer time synchronization
Methods and systems may be used to synchronize time across multiple IoT related entities, such as a network of resource constrained sensor and actuator type devices, IoT gateways, IoT cloud services, or IoT applications.
1. An apparatus hosting a first entity, the apparatus comprising:
a processor; and
a memory coupled with the processor, the memory comprising executable instructions that when executed by the processor cause the processor to effectuate operations comprising:
transmitting a service layer request to a service layer, the service layer request comprising data of an application and a time-based parameter corresponding with a local time of the first entity;
receiving, from the service layer in response to the service layer request, a service layer response with a time offset between the service layer and the first entity, wherein the time offset is determined based on the time-based parameter; and
adjusting the local time of the first entity by the time offset defined in the service layer response.
2. The apparatus of claim 1 , wherein the time-based parameter further indicates time correction comprises an indication to enable service layer time correction.
3. The apparatus of claim 1 , wherein the time-based parameter further indicates time correction comprises an indication of precision for service layer time correction.
4. The apparatus of claim 1 , wherein the service layer request is a request for registration with a service layer of the apparatus.
5. The apparatus of claim 1 , further operations comprising receiving a time-stamp applied to the data or the calculated offset between the time in the request and the applied timestamp.
6. The apparatus of claim 1 , wherein the apparatus comprises a mobile device.
7. A method for a first entity, the apparatus comprising:
transmitting a service layer request to a service layer, the service layer request comprising data of an application and a time-based parameter corresponding with a local time of the first entity;
receiving, from the service layer in response to the service layer request, a service layer response with a time offset between the service layer and the first entity, wherein the time offset is determined based on the time-based parameter; and
adjusting the local time of the first entity by the time offset defined in the service layer response.
8. The method of claim 7 , wherein the time-based parameter further indicates time correction comprises an indication to enable service layer time correction.
9. The method of claim 7 , wherein the time-based parameter further indicates time correction comprises an indication of precision for service layer time correction.
10. The method of claim 7 , wherein the service layer request is a request for registration with a service layer of the apparatus.
11. The method of claim 7 , further operations comprising receiving a time-stamp applied to the data or the calculated offset between the time in the request and the applied timestamp.
12. A system, the system comprising: one or more processors; and
a memory coupled with the one or more processors, the memory comprising executable instructions that when executed by the one or more processors cause the processor to effectuate operations comprising:
receiving a service layer request from a service layer, the service layer request comprising data of an application and a time-based parameter corresponding with a local time of a first entity; and
sending, from the service layer in response to the service layer request, a service layer response with a time offset between the service layer and the first entity, wherein the time offset is determined based on the time-based parameter,
wherein the local time of the first entity is adjusted by the time offset defined in the service layer response.
13. The system of claim 12 , wherein the time-based parameter further indicates time correction comprises an indication to enable service layer time correction.
14. The system of claim 12 , wherein the time-based parameter further indicates time correction comprises an indication of precision for service layer time correction.
15. The system of claim 12 , wherein the service layer request is a request for registration with a service layer of the apparatus.
16. The system of claim 12 , further operations comprising sending a time-stamp applied to the data or the calculated offset between the time in the request and the applied timestamp.
17. The system of claim 12 , wherein one or more of the operations of the system are executed by a mobile device.
18. The system of claim 12 , wherein one or more of the operations of the system are executed by a server.