Serial Port Write Timeout Exception
1 - I have a problem with the serial port, i wrote a simple program to chat betwen 2 PC and it worked perfectly. Now I'm trying to connect to an 'Advanced ID ST500 RFID Reader' the program sends the data normally and it is recieved by the reader correctly but when receiving the program throws a Timeout exception even for timeouts of 10 seconds. The problem the serialMonitor rogram for the serial port detects and reads the data correctly, so why isn't the program. 2 - Also how can i make the reading take place automatically without requiring me to invoke readline() every time, i mean to make the availability of data to be read invoke an event handler? Here is my code: ---------------------- SerialPort sp = new SerialPort(); sp.BaudRate = 38400; sp.Parity = Parity.None; sp.DataBits = 8; sp.StopBits = StopBits.One; sp.PortName = 'COM1'; sp.WriteLine('Any Text Here'); richTextBox4.Text = sp2.ReadLine(); // this always gives Timeout exception when talking with the reader when infact there is data recieved and it was read by a Serial Port monitor!!! How Can i solve the Timeout Problem?
How Can i make the read process automatic without the need to invoke readline manytime()? Hey i've tried the code but i'm facing some problems all types of the read mathods (readline,read.etc) throws a timeout exception. Only ReadExisting works but it doesnt read the entire data sent, it sometimes reads a charecter, two or a collection but not the whole + it always ignores the first charecter sent if by chance it read the whole string.I am currently exploring this SerialPort class.
Represents a serial port resource. Writes a specified number of characters to the serial port using data from a buffer. Write(String) Write(String) Write.
©2018 Control4 Corporation; Portal. Forgot Password ©2018 Control4 Corporation. We are leading experts in Control4 and offer driver and application development services to OEMs around the world. Domaudeo Serial Splitter. A simple driver that. Easy serial driver control4 login. Manufacturer: Samsung: Model: PN58A650 [IR] Creator: Control4: Modified Date: Tue May 22 11:31:09 UTC 2012: Device Type: PLASMA: Control Method: IR.
I believe that I am using ReadExisting, but I tried ReadLine before, and it seems to work fine. Have you tried to perform this following lines?