Opened 11 years ago

Closed 11 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)

by robh, 11 years ago

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

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

by robh, 11 years ago

Trace with proper TRACEBUF statement in config.sys

comment:1 by robh, 11 years ago

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

comment:2 by robh, 11 years ago

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 by Lars Erdmann, 11 years ago

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 by robh, 11 years ago

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 by Lars Erdmann, 11 years ago

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 by robh, 11 years ago

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

comment:7 by Lars Erdmann, 11 years ago

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.

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

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

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

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.

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

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 by robh, 11 years ago

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 by David Azarewicz, 11 years ago

Resolution: NoChangeNeeded
Status: newclosed

I'm glad it worked for you.

Note: See TracTickets for help on using tickets.