Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying the Serial port connection that givin me error that serial port CoM/com is not there
Posted
Updated 20-Dec-11 11:25am
v2

Are you using the SerialPort class for the connection.The error may be due to the invalid port name.The following code works fine here.Try this,
To Create the connection,

SerialPort port = new SerialPort("COM1");

To Opens the port

if (false == port.IsOpen)<br />
      {<br />
        port.Open();<br />
      }


To Write the data
port.Write("test");

Regards,
Vineeth
 
Share this answer
 
v2
Comments
anupkulkarni85 14-Jun-10 4:35am    
Thanks
are you sure your computer has a com that named com1?? please check it in device manager.
 
Share this answer
 
You need to post some code here - the information provided by you is certainly not enough.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900