Get Data From USB Device

J

jborden

Hi,
I've got a programming issue that I've never faced before and was
hoping that someone could shed some light on where to begin. I'm
trying to create an automated process that reads credit card data for a
POS application. I've got a credit card magnetic stripe reader
(http://www.logiccontrols.com/web/prodMR1.htm) that connects to a USB
port. If I have Notepad open, the data dumps into there. Otherwise,
I'm not sure where it goes. I'd love to create an application that
receives the USB data and saves it in a temporary file that I can read
from, and then delete it.

Is this possible or is there a more eloquent way to do this?

Thanks in advance for any help you can offer...
 
N

Nicholas Paldino [.NET/C# MVP]

It looks like the device maps to a COM port. You will have to use the
SerialPort class, or connect to the COM port through a call to the
CreateFile API, and then reading and writing to the file handle that is
created from that call.

Hope this helps.
 
J

jborden

Nicholas,
Thanks for the insight. I will look into your reccomendation and
hopefully come to an equitable solution. Thanks!

Jeff



It looks like the device maps to a COM port. You will have to use the
SerialPort class, or connect to the COM port through a call to the
CreateFile API, and then reading and writing to the file handle that is
created from that call.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,
I've got a programming issue that I've never faced before and was
hoping that someone could shed some light on where to begin. I'm
trying to create an automated process that reads credit card data for a
POS application. I've got a credit card magnetic stripe reader
(http://www.logiccontrols.com/web/prodMR1.htm) that connects to a USB
port. If I have Notepad open, the data dumps into there. Otherwise,
I'm not sure where it goes. I'd love to create an application that
receives the USB data and saves it in a temporary file that I can read
from, and then delete it.

Is this possible or is there a more eloquent way to do this?

Thanks in advance for any help you can offer...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top