0

Can I clear a STALL condition in COM device, connected by USB using c?

The program is a application, written in C using gcc.

Now I communicating with device using function CreateFile for conneting and WriteFile/ReadFile to read, write data from windows.h.

InKronos
  • 1
  • 1
  • 3
  • you need to use ioctrl https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/usbioctl/ – 0___________ May 12 '21 at 12:16
  • You may be able to do this by getting the source of the [devcon command](https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon) and porting the process equivalent to the [remove command](https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon-remove). However, that is not always possible. Also, the devices must be `CloseHandle` before processing. – kunif May 12 '21 at 23:04
  • @0___________ when I using it I get invalid handle – InKronos May 13 '21 at 16:09

0 Answers0