ocr - Serial Port listening in C# -


there loads of questions listening of devices on serial port using c#.

however couldn't find useful application , working.

now code decided use cannot see why not output anything:

namespace serialports 

{ class program { static void main(string[] args) { serialport myport = new serialport();

     myport.datareceived += myportdatareceived;      myport.portname = "com3";      myport.baudrate = 19200;      myport.databits = 7;      myport.parity = parity.even;      myport.stopbits = stopbits.one;       myport.open();       console.readline();       myport.close();    }    static void myportdatareceived(object sender,      serialdatareceivedeventargs e)   {      var myport = sender serialport;      console.writeline(myport.readline());   }     } 

}

my device ocr passort reader.

i expect string when swipe passport. nothing, no output @ all.

can please me can make output string @ least?

btw know ocr reader working since there app coming outputs data , when use apps test com data code nothing. appreciated!

regards!


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -