Fix some bugs in rs232.
Fix bugs with tcp port in wiegand.