improved getread in case serial port is not set
merged changes from guenter