how we read the device which is connected to our system's serial port ?
-
I have to develop an application, which can able to connect to a GPS device which is connected to serial port in our system and also able to read all the data from the device. Currently I am able to make connection to my system's serial port but not able to connect to that GPS device and also not able to read the data from the device. So in brief problem is that, "how we read the device which is connected to our system's serial port." Please help me out to solve this problem.
-
I have to develop an application, which can able to connect to a GPS device which is connected to serial port in our system and also able to read all the data from the device. Currently I am able to make connection to my system's serial port but not able to connect to that GPS device and also not able to read the data from the device. So in brief problem is that, "how we read the device which is connected to our system's serial port." Please help me out to solve this problem.
avika wrote:
Please help me out to solve this problem.
You are in wrong forum. It has nothing to with ASP.Net.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
avika wrote:
Please help me out to solve this problem.
You are in wrong forum. It has nothing to with ASP.Net.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
I have to develop this in ASP .Net web application. I got some information regarding to Serial Port classes and methods from MSDN but still not able to get it. Please help me if you have any idea regard to this.
avika wrote:
I have to develop this in ASP .Net web application.
AFAIK, this is no ASP.Net thing.
avika wrote:
Please help me if you have any idea regard to this.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
I have to develop this in ASP .Net web application. I got some information regarding to Serial Port classes and methods from MSDN but still not able to get it. Please help me if you have any idea regard to this.
Are you trying to build a web application that connects to the serial port of the clients PC? You won't be able to do that with ASP.net.
-
Are you trying to build a web application that connects to the serial port of the clients PC? You won't be able to do that with ASP.net.
I am able to connect to serial port but not able to read the data from the connected device. Here is the code which i am using to read the device- // Create the serial port with basic settings SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One); port.Handshake = System.IO.Ports.Handshake.None; port.ReadTimeout = 5000; port.Open(); //retrieve number of bytes in the buffer int bytes = port.BytesToRead; //create a byte array to hold the awaiting data byte[] comBuffer = new byte[bytes]; //read the data and store it port.Read(comBuffer, 0, bytes); string str; System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); str = enc.GetString(comBuffer); txtData.Text = str; port.Close(); when i am running this code then I get 0 in BytesToRead and comBuffer. I think i am doing something wrong but what it is not have any idea.