Intel® Business Client Software Development
Support for Intel® vPro™ software development and technologies associated with Intel vPro platforms.

vPro Alarm Clock working only on full hours

Patryk_M_
Beginner
509 Views

Hello.

I have trouble setting the Alarm Clock properly. I am using the C++ API ver. 8.1. The documentation says that in the start time I'm supposed to fill in year, month, day, hour, and minutes, and that seconds have to be 0. Yet, whenever I try to set the minutes to something other than 0, we get the "XML invalid" exception. Can this be circumvented, so that I'm able to set the alarm with better precision than hours?

Thanks in advance and best regards,

Patryk

0 Kudos
4 Replies
Gael_H_Intel
Moderator
509 Views

Which tool are you using to initiate an Alarm?  I just tried it with the vPro Platform Solution Manager as well as the Open DTK and both accept minutes.

0 Kudos
Gael_H_Intel
Moderator
509 Views

Patryk - are you trying to set an alarm to go off (for testing) for a few minutes after you set it?

The following code will set the alarm on my system to go off in 3 minutes.  If your system acknowledges Daylight Savings time then that would change the AddHours from 8 to 7 (I was just testing my system without any time adjustments.)

Another thing to check is to make sure your System Time and your ME time are synced.

DateTime NextAMTAlarmTime = DateTime.Now;  (This is your Local Time)
//NextAMTAlarmTime = NextAMTAlarmTime.AddSeconds(60 - NextAMTAlarmTime.Second);// the seconds must be 0.
NextAMTAlarmTime = NextAMTAlarmTime.AddSeconds(60 - NextAMTAlarmTime.Second);
Console.WriteLine("\nCurrent Date time is:{0}\n", NextAMTAlarmTime);
NextAMTAlarmTime = NextAMTAlarmTime.AddMinutes(3);
NextAMTAlarmTime = NextAMTAlarmTime.AddHours(8);  (This is UTC Time)


You can also try this code: Instead of adding 8 hours and getting confused in each country with a different offset you can use:

NextAMTAlarmTime = NextAMTAlarmTime.AddMinutes(3).ToUniversalTime();  (Adds 3 minutes to your local time.)


0 Kudos
Patryk_M_
Beginner
509 Views

Gael, 

Thanks for your input. I wasn't using any tools, just the C++ libraries. I managed to set the minutes now, although I'd say that my current solution is equivalent to the one I had before, but I may be wrong. I ahve no idea why it wouldn't work earlier, but now does. I was trying to set it for few hours ahead, so the potentian timezone/DST difference wouldn't matter. Regardless of reason, everything is now fine. Thanks again and best regards.

0 Kudos
Gael_H_Intel
Moderator
509 Views

Note also that when you are creating an alarm, you can't give it the name of an existing alarm - but that is an error that would happen when you ran your code, not when you were compiling it.  I never got the error that you were getting when I was trying out making changes to the sample code.  My issue was that I wasn't taking the UTC offset into consideration so it could not create the alarm due to the time was in the past.

Anyway, I'm glad you got it working.

0 Kudos
Reply