6

I've been trying to find some free and working code on the net about how to send and receive data (or frames as its seemed to be called) to and from a specific USB device by using VID and PID.

Does anybody know how to do this in delphi?

There seems to be nothing about this for delphi, at all!

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
xaid
  • 740
  • 6
  • 18
  • There is no way to talk "raw USB" from user mode, to NON-HID class devices, that I know of. As far as I know, the only thing that can talk raw USB is the USB-stack built into Windows. You don't even write a raw driver for it, you create a plugin for the Windows USB stack. Maybe the situation is different in Linux but on Windows, you don't do direct data comms via USB. Class based (HID, CDC, etc) or nothing, from user mode. – Warren P Feb 20 '12 at 14:22
  • Warren, do you know any good links about this USB stack thingy? – xaid Feb 20 '12 at 16:20

1 Answers1

6

See Robert Marquardt's HID controller suite for Delphi.

It will give you communication possibilities with a USB device. This unit is incorporated in Project Jedi as well.

See also Jan Axelson's HID page for examples. I think he has written book also. USB Complete. On his page are som Delphi references.

If you are using Delphi 2009 or newer, follow the link given in the answer on SO question :using-hidcontroller-on-delphi-2010

Community
  • 1
  • 1
LU RD
  • 34,438
  • 5
  • 88
  • 296
  • thank you very much. the last two links in that other stackoverflow post you gave me do not work. the HIDComponent does work for me but it doesnt list any devices. Any other ideas maybe? – xaid Feb 20 '12 at 13:00
  • There are some sample applications following the HIDcontroller component. If I'm not mistaken one of them (BasicDemo) lists the connected devices. (And you have to plug in the device(s) after program has started I think). – LU RD Feb 20 '12 at 13:11
  • alright thanks. HIDController is also contained in the JEDI project and in the JEDI project it works fine, it lists all my HID devices but it freezes whenever I connect the specific device I want to process. GAAA my luck haha – xaid Feb 20 '12 at 13:58
  • The RMarquart HID link (first link in post) is not working for me. – Warren P Aug 20 '12 at 23:06