For the Matlab example code MainMTwRTdataViewer.m of the MT Software Suite 4.2.1 an extra true is needed in 2 functions: scanPorts and openPort.
After adding the true in the scanPorts function, the same error will occur for openPort. Also include an extra true in this function.
%% Scanning connection ports
% ports rescanned must be reopened
p_br = h.XsScanner_scanPorts(0,100,true,true);
Also search for open port:
% open port