Re: SetCommState() fails with "A device attached to the system is not functioning"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:lfbcr35657sg92467bd6gte0gq4v6a0ieh@xxxxxxxxxx
My suspicion would be that the virtual control does not successfully
implement all the
IOCTL codes required. There are something like 40 IOCTLs that a serial
port must support.
If it would fail to support one of these, the consequence would probably
be the error you
are seeing.

It sounds like the fix is not in SetCommState, but in the device driver
for the virtual
device.

Short of exploring the DDK documentation in detail, to see what IOCTL is
failing, I don't
have any effective way to isolate the failure. Note that SetCommState is
nothing more
than a high-level wrapper around a set of DeviceIoControl calls.

I'd suggest downloading the file monitor from www.sysinternals.com and
study what IOCTLs
are being sent to your device (look for IRP_MJ_DEVICE_CONTROL requests)
and which one is
failing.

Thanks, Joe. The driver is the standard usbser.sys (USB serial port driver
that Windows provides). But the firmware on the device may be suspect. I
just got a new build of the firmware and will let you know if it fixes the
problem.

Thanks,
David


.



Relevant Pages

  • Re: Accessing Ndis miniport from user mode application
    ... However, within the DNE framework, we have the ability ... the driver and a user-space application. ... more complex to keep an IOCTL outstanding to receive enough data... ... "Please make sure that UDP port XYZ is available only to privileged users", ...
    (microsoft.public.development.device.drivers)
  • Re: RFC: ipath ioctls and their replacements
    ... >> That drops one ioctl. ... > There isn't usually a "right" chip device and port. ... The driver checks all units and ports under a single ...
    (Linux-Kernel)
  • Re: RFC: ATA to CAM integration patch
    ... cdrecord: Inappropriate ioctl for device. ... Cannot open SCSI driver. ... this driver and/or drive does not support cdda reading. ...
    (freebsd-current)
  • Re: BLKFLSBUF failed???
    ... What is causing this and how do I fix it? ... Lack of support for that ioctl is "causing" it (horrible choice of word ...
    (alt.os.linux)
  • Re: [RFC] What are the goals for the architecture of an in-kernel IR system?
    ... cx23885-input.c support with RC-5, and soon NEC support, in kernel. ... The LIRC ioctls() wanting to change one parameter at a time will ... The idea is that you set up the IR hardware infrequently and spend most ... I was planning on a lirc_v4l module aggregating all the lirc_dev ioctl ...
    (Linux-Kernel)