Author Topic: Can I use a usb port as a com-port?  (Read 33445 times)

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: Can I use a usb port as a com-port?
« Reply #45 on: March 25, 2017, 05:39:45 pm »
the problem of the two errors that sometimes occur in the starting of the plate
In the relays.cmd file, I change this two lines and now is work 100% ok.
from this rc = RxUsbCtrlMessage(Handle,RequestType,Request,Value,Index,1,Data,100);
to rc = RxUsbCtrlMessage(Handle,RequestType,Request,Value,Index,1,Data,1000);
and in
from rc = RxUsbCtrlMessage(Handle,RequestType,Request,Value,Index,NumBytes,,100);
to rc = RxUsbCtrlMessage(Handle,RequestType,Request,Value,Index,NumBytes,,1000);
The power supply has no influence at all. The important thing is to disconnect it (from the power supply, like the usb) before starting the usbrelays.cmd
Saludos

Thank you Roberto.

To Lars - This is something to update in the source of USBCOM.SYS as well. In COMSTRAT.C the VendorRW routine line 1411 increase the timeout value from 100 to 1000.
« Last Edit: March 25, 2017, 05:41:19 pm by Wim Brul »

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Can I use a usb port as a com-port?
« Reply #46 on: March 26, 2017, 03:01:28 pm »
Hi Wim,

done, see SVN rev 1716. Should I ever find the time I am going to get rid of the blocking and properly implement this as asynchronous notification (as all the other commands are treated).

Lars