1
Answer

com port 1 programming

Photo of satheesh babu

satheesh babu

16y
2.1k
1
Hi all,

I have a device which is connected to my system com port1 and when i swipe bar code card like our office access card its having a number and that swiping machine will pass that number, then i need to catch that number and then i need to write some code to accept/deny that card.

could any one give me some suggestions to read that number and how to contact with com port1 in dot net..

thank you...

Answers (1)

0
Photo of Bechir Bejaoui
NA 20.1k 5.3m 16y

You can use Port object from System.IO.Ports  set a port parameters and read data  from  it
to set com parameters use

comport.BaudRate, comport.DataBits ,comport.StopBits ,comport.Parity ,comport.PortName ,comport.ReadTimeout


to open it make use

comport.Open();


to read data from it use


comport.ReadExisting()