move serial port opening operation from dialog to global app