USB port

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Im new to .net. I would like to upgrade an existing application to .net and
add USB support.
How do i write a .net application with USB support?
We used "mscomm" in vs 6 for serial (rs232) ports. Is there a similar driver
in .net for USB ports? any tutorial page out there?

Thanks in advance,
Aaron
 
Aaron said:
Im new to .net. I would like to upgrade an existing application to .net
and add USB support.
How do i write a .net application with USB support?
We used "mscomm" in vs 6 for serial (rs232) ports. Is there a similar
driver in .net for USB ports? any tutorial page out there?

USB is a /bus/, not a port. Typically communication with a special device
is done over DLLs/drivers provided by the connected device's manufacturer.
 
so how can i read data from the usb port, since i am the device
manufacturer.
for serial ports i just need to load the mscomm.dll and start reading.
 
If anyone can offer any info, links etc please do, I am also interested in
this thread

Regsrds



Aaron said:
so how can i read data from the usb port, since i am the device
manufacturer.
for serial ports i just need to load the mscomm.dll and start reading.
 
Hi

If you've been using mscomm, then following this link:

http://www.hardandsoftware.net/

will get you started - Dick Grier's website / book are a good place to get
the information you need.

HTH

Nigel Armstrong

Starbuck said:
If anyone can offer any info, links etc please do, I am also interested in
this thread

Regsrds
 
If you're saying that you can just treat the device like a serial port, then
there's a number of libraries out there that provide serial support for
..NET:

http://www.gotdotnet.com/Community/...mpleGuid=b06e30f9-1301-4cc6-ac14-dfe325097c69

Here's one that's supposed to be very similar to mscomm:

http://www.gotdotnet.com/workspaces/workspace.aspx?id=0a680784-1d84-4e0a-8a62-9dcbcf79e1fb

Hope this helps,
Scott Swigart
http://blog.swigartconsulting.com


Aaron said:
so how can i read data from the usb port, since i am the device
manufacturer.
for serial ports i just need to load the mscomm.dll and start reading.
 
but how do you treat the usb port like a serial port?
im very suprised by the amount of documentation available on this topic. i
thought there would be a dedicated class in the .net framework for this
purpose, since most devices use USB nowadays.


Scott Swigart said:
If you're saying that you can just treat the device like a serial port,
then there's a number of libraries out there that provide serial support
for .NET:

http://www.gotdotnet.com/Community/...mpleGuid=b06e30f9-1301-4cc6-ac14-dfe325097c69

Here's one that's supposed to be very similar to mscomm:

http://www.gotdotnet.com/workspaces/workspace.aspx?id=0a680784-1d84-4e0a-8a62-9dcbcf79e1fb

Hope this helps,
Scott Swigart
http://blog.swigartconsulting.com
 
but how do you treat the usb port like a serial port?
im very suprised by the amount of documentation available on this
topic. i thought there would be a dedicated class in the .net
framework for this purpose, since most devices use USB nowadays.

I think the problem is that writing a USB driver is still a low level
function - .NET 1.0 doesn't expose enough low level functions to allow you
to write a USB driver effective. As a result, you need to write the USB
driver in a language like C++ and then expose the device via an API to
..NET. In short, I don't think you can access USB hardware directly without
an interface or a specialized component like DriverX for USB.
 
Hi,

You can use any serial port methods. You can download NETComm.ocx from my
homepage, for example. There are a number of .NET serial port classes
available for download, and I have one in my book, with lots of examples,
naturally. Also, there is a .NET serial dll in the Visual Basic Developer's
kit, which is available from Microsoft (free download).

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004. See
www.mabry.com/vbpgser4 to order.
 
Hi
Im new to .net. I would like to upgrade an existing application to .net and
add USB support.
How do i write a .net application with USB support?
We used "mscomm" in vs 6 for serial (rs232) ports. Is there a similar driver
in .net for USB ports? any tutorial page out there?

There is a low level USB library for .NET:

http://www.icsharpcode.net/OpenSource/SharpUSBLib

Regards
Mike
 

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

Back
Top