Opened 11 years ago

Closed 10 years ago

#68 closed defect (NoChangeNeeded)

USB-Serial converter with PL2303 fails

Reported by: robh Owned by:
Priority: major Component: basedrv
Version: 11.05 Keywords:
Cc:

Description

My USB-serial converter fails to work (under eCS) with USBCOM. A serial port (COM4) is created and responds to mode commands, but no data goes out. A write() returns with code 18.

Attachments (2)

USB-TRACE-Z68X-20131003.zip (21.8 KB) - added by robh 11 years ago.
USB formatted trace and output of 'teslog.cmd usb'
EHCD-TRACE-ROBH-20131003.zip (134.5 KB) - added by robh 11 years ago.
Trace with proper TRACEBUF statement in config.sys

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by robh

Attachment: USB-TRACE-Z68X-20131003.zip added

USB formatted trace and output of 'teslog.cmd usb'

Changed 11 years ago by robh

Trace with proper TRACEBUF statement in config.sys

comment:1 Changed 11 years ago by robh

The first trace was run without TRACEBUF in config.sys. The second trace is probably more useful.

comment:2 Changed 11 years ago by robh

I assumed (sorry!) that the problem was 'no output', but it seems the problem is with receive. When connected to a simple serial device which echoes incoming data a serial line monitor (datascope-like) shows that data is going out and echoed, but the application does not receive anything. The read returns '-1' and errno is 18. The datascope shows:

transmit 'a' receive 'A' (the serial device converts lower to upper case) transmit 'break'

Repeated 3 times. Hopefully the trace shows something similar.

comment:3 Changed 11 years ago by Lars Erdmann

For a serial converter you need to use USBSER.SYS instead of USBCOM.SYS. Yes it's confusing but USBCOM.SYS is meant to be used with USB modems. USBSER.SYS will deal with the rest.

comment:4 Changed 11 years ago by robh

Thanks Lars for explaining. Unfortunately USBSER.SYS seems not to support the PL2303 chipset. Like with USBCOM a virtual serial port (in my case COM4) becomes available, but it responds to a mode command with: "SYS0021: The drive is not ready" (and errno=18 after open). USB-serial adapters with PL2303 are pretty popular but so far all my attempts to obtain a working driver were unsuccessful. It would be nice if the support for the PL2303 could be 'copied' from USBCOM to USBSER.

comment:5 Changed 11 years ago by Lars Erdmann

There is a good chance that David can add PL2303 support to USBSER.SYS. In fact, the USBCOM.SYS and USBSER.SYS drivers are pretty similar.

comment:6 Changed 11 years ago by robh

Sounds great and hopeful! I'm ready to test it.

comment:7 Changed 11 years ago by Lars Erdmann

Can you find out USB Vendor and Product ID of the USB device that you are using ? If you have Windows you can plug in your USB device and then have a look at it with Hardware manager. The device properties notebook for the device should contain USB Vendor and Product ID.

comment:8 in reply to:  3 Changed 11 years ago by David Azarewicz

Replying to erdmann:

For a serial converter you need to use USBSER.SYS instead of USBCOM.SYS. Yes it's confusing but USBCOM.SYS is meant to be used with USB modems. USBSER.SYS will deal with the rest.

Sorry, but this is not correct. USBCOM.SYS works just fine with COM devices including the PL2303 and PL2303X

comment:9 in reply to:  5 Changed 11 years ago by David Azarewicz

Replying to erdmann:

There is a good chance that David can add PL2303 support to USBSER.SYS. In fact, the USBCOM.SYS and USBSER.SYS drivers are pretty similar.

Sorry, but no. PL2303 support is already in USBCOM.SYS and it works just fine. No need to waste time doing it again in USBSER.SYS.

comment:10 in reply to:  7 Changed 11 years ago by David Azarewicz

Replying to erdmann:

Can you find out USB Vendor and Product ID of the USB device that you are using ? If you have Windows you can plug in your USB device and then have a look at it with Hardware manager. The device properties notebook for the device should contain USB Vendor and Product ID.

There is no need for this. Obviously the driver has detected it and it is working.

The issue appears to be a common RTS/CTS problem. For hardware handshaking to work ALL participants (both ends of the cable and the cable itself) must have all the wires connected correctly and the software at both ends must be enabled for hardware (RTS/CTS) handshaking. If you do not want to use hardware handshaking you must disable it with the /Z switch:

DEVICE=d:\OS2\BOOT\USBCOM.SYS /Z

comment:11 Changed 10 years ago by robh

Sorry David for my slow reaction on your suggestion, busy with other things... With the /Z switch of USBCOM.SYS I can indeed communicate with the serial device behind the USB-serial adapter (fortunately this device happens not to use RTS/CTS handshaking!). Thanks for the hint.

So as far as I'm concerned this issue may be closed.

If it's still useful: USBDOCK reports for my USB-serial adapter: 067b:2303 On a W7 system I found similar figures of course.

comment:12 Changed 10 years ago by David Azarewicz

Resolution: NoChangeNeeded
Status: newclosed

I'm glad it worked for you.

Note: See TracTickets for help on using tickets.