Skip to main content

System time setting in RI

2 replies [Last post]
shobanapeter
Offline
Joined: 2006-07-29
Points: 0

If RI mpe parses the stt, there is no way the platform could know the system time. There is no API to set the system time to the platform. The platform might need the system time for logging purposes.Though mpeos is allowed to parse the STT, on that case most of the code in mpe has to be replicated in mpeos which includes Revision detection and monitoring.

So why not RI have a set API in mpeos to set the system time to platform?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
greg80303
Offline
Joined: 2008-07-03
Points: 0

The problem lies in the fact that the RI has a "smoothing" algorithm that it uses to interpolate the current value of STT with the time returned by the platform. This prevents large jumps and, more importantly, backwards jumps in time due to differences in the MPEOS-provided system clock and the clock provided by the STT. Even if we were to pass the STT value to the platform, it is not guaranteed to be the actual value used by the rest of the stack. The smoothing algorithm is run each time the stack makes a call to retrieve the time. The value is constantly being refined using the latest STT and the clock from the platform.

You can find the smoothing code in $OCAPROOT/mpe/mgr/osmgr/osmgr.c (setSTTTime())

If you have some suggestions as to how we could provide a reliable value to the platform, please create an issue in our JIRA database and provide us with your comments.

G

suntec
Offline
Joined: 2010-10-13
Points: 0

I have a similar concern for RI mpe have no API to the parsed value of STT table but it is not only the system time but also the GPS_UTC_offset.

According to CCIF 9.10, the host should send the system_time() APDU in response to the system_time_inq() APDU from CableCARD.

This APDU has the two fields of system_time (representing the current system time) and GPS_UTC_offset.

To set the correct values for those two fields, I think that one of the system_time in STT or the "smoothed" time from MPE and the GPS_UTC_offset in STT should be passed to the the platform.

If other sources are available to set those field, please let me know.