How to enable Intel® AMT SOL by programming.

This blog post is a good complement to the second of Duofeng Li’s AMT Experience blog posts. In his blog, He mentioned what Intel® AMT SOL is and how to enable it by using the MEBx configuration menu. This post is about enabling it too, but by programming using WSMan and the good old, well-known EOI.

Let’s jump into code:

                if (bSupportWSMan)

                {

                    WsManDirectClient client = SetUpWsMan(ip, port, credential);

                    AMT_RedirectionServiceType rs = (AMT_RedirectionServiceType)client.Get(typeof(AMT_RedirectionServiceType));

                    if (rs == null) return;

                    rs.ListenerEnabled = true;

                    client.Put(rs);

                }

                else

                {

                    RedirectionService redSvc = SetUpEoi(ip, port, credential);

                    redSvc.SetRedirectionListenerState(true);

                }

The code shown above is simple, it supposes there is a way to know if WSMan is supported or not. If WSMan is supported, then the Listener Enabled property is set to true and the standard Put is called. If WSMan is not supported, then the web service object named RedirectionService is used by calling to the SetRedirectionListenerState with true. In both cases, the credential configuration is required, but, in the interest of simplicity, the function definition is not shown.

If you want to get more information about the standard WS-Tansfer Get, Put, Create and other operations, please read this good introduction: http://msdn.microsoft.com/en-us/library/aa384470(VS.85).aspx .

This is an important step to be performed after device provisioning, as I mentioned here (step 8), after a SCS enterprise provisioning this parameter is disabled by default, so it must be verified and/or enabled by your application.
如需更全面地了解编译器优化,请参阅优化注意事项.