In MeshCMD, amtterm will only show when using with latest version of the agent.

Ylian Saint-Hilaire committed Aug 3, 2022 at 12:30 UTC 4cd99c5b2f8062203b92cb10f528de4508480e77
3 files changed +5 -6
agents/MeshCmd-signed.exe
Binary files a/agents/MeshCmd-signed.exe and b/agents/MeshCmd-signed.exe differ
agents/MeshCmd64-signed.exe
Binary files a/agents/MeshCmd64-signed.exe and b/agents/MeshCmd64-signed.exe differ
agents/meshcmd.js
+5 -6
@@ -25,7 +25,6 @@ limitations under the License.
25 //console.displayStreamPipeMessages = 1; // Display stream pipe and un-pipes
26 //var __gc = setInterval(function () { console.log('GC'); _debugGC() }, 2000); //
27
28 -setModulePath('modules_meshcmd');
28 var fs = require('fs');
29 var os = require('os');
30 var net = require('net');
@@ -213,7 +212,7 @@ function run(argv) {
212 console.log(' AmtWake - Intel AMT Wake Alarms.');
213 console.log(' AmtRPE - Intel AMT Remote Platform Erase.');
214 console.log(' AmtDDNS - Intel AMT DDNS settings.');
216 - console.log(' AmtTerm - Intel AMT Serial-over-LAN terminal.');
215 + if (console.canonical != null) { console.log(' AmtTerm - Intel AMT Serial-over-LAN terminal.'); }
216 console.log('\r\nHelp on a specific action using:\r\n');
217 console.log(' meshcmd help [action]');
218 exit(0); return;
@@ -442,7 +441,7 @@ function run(argv) {
441 console.log(' --set [disabled/dhcp/enabled] Set the dynamic DNS mode.');
442 console.log(' --interval [minutes] Set update interval in minutes, default is 1440, minimum is 20.');
443 console.log(' --ttl [seconds] Set time to live, default is 900.');
445 - } else if (action == 'amtterm') {
444 + } else if ((action == 'amtterm') && (console.canonical != null)) {
445 console.log('AmtTerm is used to connect to the Serial-over-LAN port. Example usage:\r\n\r\n meshcmd amtterm --host 1.2.3.4 --user admin --pass mypassword');
446 console.log('\r\nRequired arguments:\r\n');
447 console.log(' --host [hostname] The IP address or DNS name of Intel AMT, 127.0.0.1 is default.');
@@ -837,7 +836,7 @@ function run(argv) {
836 if ((settings.password == null) || (typeof settings.password != 'string') || (settings.password == '')) { console.log('No or invalid \"password\" specified, use --password [password].'); exit(1); return; }
837 if ((settings.username == null) || (typeof settings.username != 'string') || (settings.username == '')) { settings.username = 'admin'; }
838 performAmtFeatureConfig(args);
840 - } else if (settings.action == 'amtterm') {
839 + } else if ((settings.action == 'amtterm') && (console.canonical != null)) {
840 if (settings.hostname == null) { settings.hostname = '127.0.0.1'; }
841 if ((settings.password == null) || (typeof settings.password != 'string') || (settings.password == '')) { console.log('No or invalid \"password\" specified, use --password [password].'); exit(1); return; }
842 if ((settings.username == null) || (typeof settings.username != 'string') || (settings.username == '')) { settings.username = 'admin'; }
@@ -3004,13 +3003,13 @@ var solTimer = null;
3003
3004 // Called to start serial-over-lan terminal
3005 function performAmtTerm(args) {
3007 - try {
3006 + //try {
3007 sol = require('amt-redir-duk')(require('amt-sol')());
3008 sol.onStateChanged = onSolStateChange;
3009 sol.m.onData = onSolData;
3010 sol.m.debug = (settings.debuglevel > 0);
3011 sol.Start(settings.hostname, (settings.tls == true) ? 16995 : 16994, settings.username ? 'admin' : settings.username, settings.password, settings.tls);
3013 - } catch (ex) { console.log(ex); }
3012 + //} catch (ex) { console.log(ex); }
3013 }
3014
3015 // Called when the serial-over-lan connection state changes