Author Topic: Simplest way to send and receive data in the USB  (Read 48754 times)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #15 on: January 07, 2011, 10:33:43 am »
1. A bulk transfer ends when the expected amount of data has transferred (depends on the driver) or on transferring a short packet (less than max packet size).

2. The driver.

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #16 on: January 07, 2011, 01:27:02 pm »
Hi Jan,

Assuming that each manufacturer creates its own hardware and driver but the communication between them follow the same protocol.
If a developer creates an application in C# for example, using the driver and the hardware from manufactures "A", it is possible that this application works with the hardware of manufacturer "B", ie is it possible to use the driver from manufacturer "A" in the hardware from manufacturer "B"?

thank you.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #17 on: January 07, 2011, 03:51:33 pm »
yes

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #18 on: January 10, 2011, 06:51:04 am »
Hello Jan,

But from what I understand, if the device class is vendor specific, the operating system selects the driver according to the Vendor ID and Product ID defined in the INF file that comes with the driver, and in the case of different manufacturers these two values will be different

So, how the SO will accepts the driver from manufacturer "A" in the hardware from manufacturer "B"?

thank you.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #19 on: January 10, 2011, 11:41:00 am »
The user might have to move or delete the INF file for the unwanted driver.

Also see:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;279112&sd=tech

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #20 on: January 10, 2011, 12:12:56 pm »
Hi Jan,

I think you misunderstood me. I do not want to change the driver, I want the driver to work with different Vendors and Products IDs.

thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #21 on: January 10, 2011, 12:32:31 pm »
To assign the driver to a device, provide an INF file that contains the Vendor ID and Product ID. If the system already has an INF file that assigns a different driver to the device, see my previous response.

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #22 on: January 10, 2011, 12:52:07 pm »
Hello Jan,

In the case of a USB stick, how it installs the same driver on several different USB sticks? There is a way to do the same with a device that uses the vendor defined class.

thank you

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #23 on: January 10, 2011, 01:10:50 pm »
The host assigns the driver to flash drives according to their class (mass storage). Vendor-defined devices all have the same class (FFh), so you have to use another means (Vendor ID, Product ID) to locate the driver.

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #24 on: January 10, 2011, 01:45:54 pm »
Hi Jan,

So, it's impossible to create a driver for a vendor defined class that works with different hardwares (different Vendor ID and Product ID), without edit the INF file.

Thank you.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #25 on: January 10, 2011, 05:45:34 pm »
Yes, the host system needs a way to identify the driver to use with the device.

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #26 on: January 10, 2011, 05:54:48 pm »
Hello Jan,

1 - When I use an API like JCommUSB, from what I understand it accesses the device independent of the driver being used. How does this work?

2 - In Windows the driver is a dll file or am I confusing things?

thanks

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #27 on: January 10, 2011, 09:00:27 pm »
1. I haven't used it but it looks similar to other generic drivers.

2. Kernel-mode client drivers are .sys files. User-mode drivers are .dlls. For example, winsub.sys, winusb.dll.

Jan

diegogalanti

  • Member
  • ***
  • Posts: 15
Re: Simplest way to send and receive data in the USB
« Reply #28 on: January 12, 2011, 06:47:26 am »
Hi Jan,

The driver only has access to the device if the operating system choose it to the device?

thank you.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Simplest way to send and receive data in the USB
« Reply #29 on: January 12, 2011, 10:04:53 am »
yes

Jan