move serial port opening operation from dialog to global app

Signed-off-by: Wangbaoyun <wangbaoyun@hhcn.com>