Terminal Properties
All function will receive a return value:
if value >= 0, successful
If value < 0, an error occurred
Error number list
Open:
-1 -> open port failed
-2 -> server busy
-3 -> parameter error
0 -> OK
Close:
-4 -> port not open
0 -> OK
Write:
-4 -> port not open
-6 -> timeout
0 -> OK
Read:
-4 -> port not open
n -> n characters read
68