Re: USB test




"Victor" <vdecampos@xxxxxxxxxx> wrote in message
news:37b9e$45f93ae1$544ae2a1$10326@xxxxxxxxxxxxxxxxxx
Hello,

I'm searching for a PC software that to send commands through a USB
port.
Does anyone know about one ?
The problem here is that USB, is not a simple interface like the serial
port. Everything is packetised, and involves layers of negotiation from
both ends. The 'host', will normally send a packet, with a type,
direction, device address, and endpoint number defined. Then there is a
packet either to or from the host (depending on direction), or a 'no data'
indication. Then there is an acknowledgement from the other end. There are
more complex forms with an extra packet.
At the driver 'end', there is the USB stack (handling the packets), and
then the PC side driver, talking to this.
There are a number of 'standard' packet forms (HID device etc.), where the
driver is present in Windows, and the simplest USB implementations, will
take advantage of these. A lot of the initial communication, is the same
whatever the device, so the hub driver, will receive a notification when a
device is attached, and automatically develops a 'request device
identifier' packet, and then sets up the initial 'pipe'.
A connection to a specific device, is a 'pipe', and you can generate an
IRP (I/O request packet), to the PC host controller, which then handles
the physical translation across the USB interface.
So the problem is that you can't just 'send a command', and expect
anything to happen. There has to be a complete packet, with all the
handling associated with this, and several parts of this will
automatically happen when a device is attached, without any further
software being needed.
There are dozens of 'USB monitor' applications (some free), which allow
you to snoop on the transactions, and in some cases allow them to be
displayed ordered by device, and command type. These are pretty much
essential when configuring a new device.

Best Wishes


.



Relevant Pages

  • RE: PATCH: Further aacraid work
    ... currently unanswered email "error recovery and command completion" on ... > Enabling unmasked SIMD FPU exception support... ... > usbcore: registered new driver usbfs ... > USB Universal Host Controller Interface driver v2.2 ...
    (Linux-Kernel)
  • Re: USB Mass Storage problems/5.0
    ... I think many people who are going to struggle with the MS USB code will ... First things I fixed was the Unit Test Ready command that I mentioned in earlier post. ... Removing the CBW error handling we may unstabilize the USBMSC driver so that some ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [opensuse] Olympus VN-4100PC Digital Recorder (OPENSUSE 10.2)
    ... software and I have a windows machine however i refuse to use windows. ... bash: lsub: command not found ... You could write to Olympus for information and maybe try to write a driver. ... I must admit that when I looked into writing a USB driver for an ADF image scanner I found it incomprehensibly complex, but I tried to do it from first principles instead of looking at existing code which probably wasn't the most effective approach. ...
    (SuSE)
  • Question about USB ISO IN transfer
    ... I set the flag USBD_SHORT_TRANSFER_OK to tell the USB ... host driver that a short transfer is supposed to be ok, ... the CPU is very busy when receiving isochronous data (packet size ...
    (microsoft.public.development.device.drivers)
  • Re: OHCI IssueBulkTransfer problem
    ... to send packet when requested. ... David Liao wrote: ... USB OHCI or SetClrearFeature is send out but your function device ignor it. ... //Pack sent before transfer timeout and received and returned ...
    (microsoft.public.windowsce.platbuilder)