Solved

USB and Delphi

Posted on 2002-03-07
5
1,002 Views
Last Modified: 2012-06-27
Okay, I have been trying for the past few days to get a non USB compliant bar code scanner to work through a USB port. The problem is that I have no idea how to actually access the port. I have been able (thanks to Robert Marquardt's code for his HIDController class), been able to catch the plug/unplug events and pull off a GUID, although I doubt that this GUID is valid. Bottom line: does anyone have any idea how I can read and write to the USB as I would a serial port? Any pointers/codes samples are greatly appreciated. I'm willing to increase the points for a  working solution.

thanks!!
0
Comment
Question by:DrDelphi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6847990
There is no way to connect a non-USB device to the USB port.
USB is a full serial bus with a complicated data protocol. it is not a serial line (RS232).
To connect a device to USB it needs a microcontroller which speaks the USB protocol.

There are several USB devices which act as converters like USB <-> RS232 bridges. They normally implement a virtual COM port on the Windows side and have a RS232 plug on the device side.

BTW i just agreed to write a text for the german Delphi magazine "Toolbox". I will write about my HID component. So a final version of this component is near at last.
0
 
LVL 6

Author Comment

by:DrDelphi
ID: 6848326
Robert,
  Cool beans! Listen, this virtual com port you mention, how would one access that? And could I read and write from that as I would an actual port? (createfile, etc,...).


Danke!
0
 
LVL 5

Expert Comment

by:Gwena
ID: 6848998
http://www.lvr.com/

Jan Axelson has a nice book about USB interfacing... lots of good links on her page too :-)
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
ID: 6849607
Best have a look at http://www.usb.org/forums/developers/webboard.html
That is the place whee USB developers meet.

Yes, a virtual COM port should work like a real one.
After all most modems are connected through such a virtual COM port.
I personally do not understand much of such drivers.
0
 
LVL 6

Author Comment

by:DrDelphi
ID: 6851437
Robert,
  I have actually solved my problem. Turns out that my "virtual" port was not configured correctly. I played around with it a little the other day and now I am good. I am giving you the points for this question because your component's source was pretty helpful (even if not exactly what I needed).


-Dave
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question