check if serialport exists or not in a sync way.