private boolean tryPort(UserInterface ui, String portname) {
boolean found = false;
try {
Device device = new Device();
Log.info("connecting " + portname + " with " + baudrate + " baud, flowControl " + flowControl);
device.connect(portname, baudrate, flowControl);
if (sysstartWaitSec > 0) {
Log.info("waiting " + sysstartWaitSec + " sec for SYSSTART");
device.waitForSysstart(sysstartWaitSec * 1000);
}
if (device.checkForTC65()) {
found = true;
open(ui, device);
} else {
Log.info("No TC65 found on port " + portname);
device.disconnect();
}
} catch (Exception e) {
Log.info("Could not open port " + portname);
Log.debug(this.getClass(), "tryPort:" + e);
}