Usb to Serial RS232 adapter with full handshake/flowcontrol support

07
2014-07
  • Tobia

    I need a usb to serial RS232 DB9 adapter to connect a printer. I bought an adapter with a very common-used Prolific PL2303XHD chip, but I have many many troubles with flowcontrol. I tried to switch to hardware than to software but this adapter always fails to manage flowcontrol and fills the printer's input buffer. I'm quite sure the problem is in this adapter because I also try with a pci serial board and with the same configuration the connection works stopping its flow while the printer are printing a long job. I tried to change the usb adapter, I bought another one, but inside I found the same chip and obviously it has the same problem. Do you have any experience with flowcontrol and usb-serial adapter? I can use both XON/XOFF or CTS/RTS flowcontrol.

    Thanks.

  • Answers
  • Tobia

    For me the definitive answer is to use FTDI chip instead of Prolific.


  • Related Question

    windows - RS232 to USB conversion
  • Moayad Mardini

    I want to connect some old device (with a RS232 port) to my laptop which doesn't have serial ports. I bought an adapter which is made in China and comes with no drivers CD. After searching I downloaded a driver called "PL-2303 Vista Driver" that was installed successfully. I wanted to test the adapter using Hyperterminal which couldn't open the COM port that was created by the driver, and told me to check the driver's settings. Unfortunately there are many options to set (Bits per second, Data bits, Stop bits, ...etc.) which I don't know how to set properly to make sure if the adapter/driver is working or not.

    Any help with those settings or any tips to know where the problem is? Thanks.


  • Related Answers
  • RBerteig

    If hyperterm can't open the port, then something is more seriously wrong then the baud rate and other serial port configuration.

    Even on a laptop with no visible physical COM ports, I'd be leery of letting any USB serial adapter think it is COM1 or COM2. Even COM3 and COM4 are suspect because they also had common legacy practice for their I/O addresses and IRQ assignments that might leak assumptions into poorly written programs. Personally, I reserve those four names for COM ports that are implemented by actual UARTS that are physically attached to the motherboard (either built-in or on the ISA or PCI buses).

    Some things to try, in an order that should work:

    • Make sure you reconfigured the driver to change the assigned port to COM5 or above.
    • Unplug and plug the adapter into the USB port.
    • Make sure you put it in the same USB connector every time because many cheap adapters come without USB serial numbers causing Windows to use the specific USB port to distinguish it from other devices. This will haunt you with a laptop.

    To check the port

    At a command prompt, type mode COM5 where COM5 is the port you assigned. You will see one of three results. First, if the adapter is attached, configured, and working, you will get a dump of the COM port configuration:

    C:...>mode com5
    
    Status for device COM5:
    -----------------------
        Baud:            19200
        Parity:          None
        Data Bits:       8
        Stop Bits:       1
        Timeout:         ON
        XON/XOFF:        OFF
        CTS handshaking: OFF
        DSR handshaking: OFF
        DSR sensitivity: OFF
        DTR circuit:     ON
        RTS circuit:     ON
    
    C:...>
    

    Second, if the adapter is connected, configured and happy, but some other program has the port in use, then you will get an error saying so:

    C:...>mode com5
    Device COM5 is not currently available.
    
    C:...>mode com1
    

    Third, if you don't have the right name of the port or the adapter is not as correctly configured as you think, you will get a less descriptive error:

    C:...>mode com5
    Illegal device name - COM5
    
    C:...>mode com1
    

    Actually getting the serial port itself configured for your device is a rather open-ended problem. You can safely try listening to the device at a variety of baud rates, set for 8-bit no parity. When you start to see data that make sense, then you probably have the baud rate set right and may only need to adjust the parity and word length for best results. Note that there exist devices that used different baud rates for send and receive, as well as requiring odd combinations of word length and stop bits. Your best source of configuration knowledge would be the manual for the device. Your second best might be to ask a second question here in the form of "does anyone know how to talk to an X".

    Although it is conceivable that the Hyperterm shipped with Vista is less buggy than prior releases, I always recommend getting a decent terminal emulator to replace it if you need to use it regularly. (I debug a lot of embedded system projects with serial ports.) My recommendation is TeraTerm, which is free and open source. It does everything Hyperterm can do and more, and without the bugs. It also can talk to Telnet devices which is handy for configuring some routers or dealing with serial ports over ethernet.

  • Greg Buehler

    You might have installed the wrong driver. There are two common chipsets used in Serial/RS232 to USB conversion.

    Either the Prolific or FTDI. It seems you are currently using a Prolific driver, you might want to try a FTDI driver

  • caliban

    The default "fail-safe" settings for RS232 ports are traditionally :

    Baud Rate : 9600

    Data Bits : 8

    Parity : None

    Stop Bits : 1

    Flow Control : None

    Start from these settings, and gradually improve things.