pl2303_get_line_request - failed: -32

I'm trying to use a pl2303ta usb-serial adapter with a nulsom ns-rs232 level shifter. The goal is to connect an RPi3 to an old Graphtec MP3100 pen plotter.

On its own, with tx looped back to rx using a resistor, the pl2303ta seems to work fine; opening up a screen session at 9600 baud allows me to type with no problem, everything I type shows up on the terminal window.

When I interpose the Nulsom ns-rs232 level shifter and loop pins 2 and 3 back, about five characters can be typed, then characters quit showing up in the terminal window. Screen does not exit, just quits working. Unplugging the USB connectors does cause screen to exit, plugging the connector back in lets me restart screen and type a few more characters.

Dmesg reports

[304143.580388] usb 1-1.5: New USB device found, idVendor=067b, idProduct=2303 [304143.580398] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [304143.580402] usb 1-1.5: Product: USB-Serial Controller [304143.580406] usb 1-1.5: Manufacturer: Prolific Technology Inc. [304143.581172] pl2303 1-1.5:1.0: pl2303 converter detected [304143.586617] usb 1-1.5: pl2303 converter now attached to ttyUSB0 [304160.462033] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32

Might this be a driver problem? Most references to the pl2303 are to other, presumably older, chips. Uname -a reports Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux so the OS is as up-to-date as I know how to make it.

Thanks for reading, and any ideas.

bob prohaska

Reply to
bob prohaska
Loading thread data ...

First check your power and gnd wires between the two devices it may be drawing more 5V via the USB-serial than the USB port can handle. Putting the USB-serial in a funny mode.

Check the voltage levels on the output of the USB-SERIAL, when that is the only device plugged in, to determine what power level it should be operating on. Then try powering the Nulsom ns-rs232 level shifter from the appropriate 3V3 or 5V pin on the Pi.

The PL2303TA can operate with signals at different output levels, the VCC being 3V3 or 5V determines the signal levels it sends and receives to your USB-Serial.

When you get the level shifter working, The printer probably uses MORE signals at the printer end, as many RS232 printing devices did.

Research NULL Modem cable pinouts.

More than likely at the PRINTER end the 9 way or 25 way D type connector will need links between the pins for

DTR to DSR CTS to RTS

These are flow control signals to stop, pause or resume data flow from computer. You might be able to get RTS/CTS handling by the USB-Serial passed through, but from experience these do not always work well on MANY USB-Serial adapters. See

formatting link

You still might lose characters at 9600 baud as you are ignoring the Modem flow control signals, see if you can set the printer up in XON/XOFF flow control mode, which the terminal software and device driver will be able to handle.

If you still lose characters drop baud rate to 4800 then 2400 until you get success.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
 Logic Gate Education 
     Timing Diagram Font 
    For those web sites you hate
Reply to
Paul

RTS/CTS connected or pulled up/down correctly?

--
Cheers 
Dave.
Reply to
Dave Liquorice

and

Or dump the USB serial device and connect the level shifter directly to the Pi's serial IO.

--
Cheers 
Dave.
Reply to
Dave Liquorice

Contrary to expectation, lowering the baudrate makes the problem worse. Raising it to 115200 actually seems to fix the problem. The loopback works for at least a screenful of characters, which is all I've had the patience to type using autorepeat.

Unfortunately, the plotter is limited to 9600 baud. Hardware flow control isn't required, Xon/Xoff is good enough.

Dmesg now reports

63695.621538] usb 1-1.5: new full-speed USB device number 50 using dwc_otg [363695.656491] usb 1-1.5: New USB device found, idVendor=067b, idProduct=2303 [363695.656511] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [363695.656520] usb 1-1.5: Product: USB-Serial Controller [363695.656528] usb 1-1.5: Manufacturer: Prolific Technology Inc. [363695.657965] pl2303 1-1.5:1.0: pl2303 converter detected [363695.663613] usb 1-1.5: pl2303 converter now attached to ttyUSB0 [363706.314462] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32 [363706.315696] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32

but the error seems nonfatal. The screen session is still running and characters are still being returned.

I'm stumped on what to try next.

Thanks for reading,

bob prohaska

Reply to
bob prohaska

A different make of USB-serial converter?

Some of these have always been garbage. I had good results quite a while back from a pfranc device, but that website has since vanished.

I'm currently using the one supplied by PICAXE,

formatting link

which successfully connects to a PICAXE chip on one of their experimental PCBs from a Lenovo laptop or my RPi. This is their AXE 027 cable,

formatting link

which is terminated at the PICAXE end with a stereo, i.e. three contact,

3.5mm jack. They also sell matching 3.5mm plastic sockets with pins positioned to fit a 0.1" grid breadboard.

This connection is running at 4800baud, using 8 bit characters with no parity and 1 stop bit.

I've not done a lot with it yet, except to upload compiled programs into the PICAXE and display messages returned to the RPi by test programs running on the PICAXE, but I think that much is enough to show that the cable was providing a solid connection to both computers.

--
Martin    | martin at 
Gregorie  | gregorie 
          | dot org
Reply to
Kiwi User

Worth a try, I had a PL2303 based convertor connected to an APC UPS. Every so often the adpater would disconnect from the USB and reconnect breaking the UPS Tools monitoring...

Got a FTDI FT232L based convertor and not had a sniff of the problem since.

Curiously I still have 3 of the same PL2303 adpaters in use with other devices without a hitch. Yes, I did try some of those with the UPS and they also failed in the same way.

--
Cheers 
Dave.
Reply to
Dave Liquorice

It looks as if the problem is solved. The fix was to add pulldown resistors to ground from the PL2303's rx and tx pins. It now seems to work with the ttl-rs232 level shifter down to 1200 baud. At 300 baud about one character in ten is garbled. At 110 baud the loopback test fails completely, but that's ok 8-)

Perhaps the same fix would help with your UPS.

Thanks for reading,

bob prohaska

Reply to
bob prohaska

Hello Bob,

BP>> I'm stumped on what to try next.

DL> A different make of USB-serial converter?

I have good results with this FTDI USB-RS232c cable converter:

EasySync ES-U-1001-R100 =

This USB2 to/from RS232c converter cable has all the hardware handshake lines active in it, such as DCD, DTR, DSR, RTS, CTS, Rx, Tx, Ring, and Earth, and has golplated contacts on both the USB and RS232c sides. It als has a large temperature scale to work in good condition, very nice for using at (sailing-)ships in almost all weather. It costs about Euro 50,00 incl. VAT in the Netherlands. The fun of the (very) low price of other make conversion cables is alreay gone, when the trouble of the bad working of your cheep one continues ;-(.

FTDI= Future Technology Devices International Limited. This FTDI cable works good on all machines, like Windows, MacOSX, or Linux, even on the Raspberry Pi all models: 1B, 1B+, 2 and 3 with Raspbian Linux.

I use it for a connection between a Pi 3B and an AIS-transponder on inland ships for ECDIS with OpenCPN sailing chart viewing software on European inland waters. But of course it can be used worldwide if you download and install the OpenSaeMaps of the area you want to sail at.

For Windows you need to install the appropiate USB-RS232-driver from FTDI. There a 4 versions; two for Intel 32 bit or 64 bit, and two for AMD 32 bit or 64 bit. See: for this Virtual COM Port Drivers, and manuals if necessarry. See: for the manuals.

For the AIS transponder connection you also need a 9-pole male- female cable. You can buy that at the same store to, or solder one yourself. It must be 1:1 connected, and is necessarry because the FTDI converter cable only simulates a RS232 port as was present at old machines, i.e. with bolds on it.

There is also another version with 2 RS232 ports which works good at Windows machines, but I did not test it on a Pi. It uses the same FTDI VCP drivers. EasySync ES-U-1002-M USB-2COM-M Serial 1 (RxD, TxD, Gnd) Serial 2 (RxD, TxD, Gnd) USB-B

+5 Vdc= / 150 mAdc= So I do not think it has hardware handshaking. See: Or: I tested this version with OziExplorer and OpenCPN on a Windows XP laptop computer.

UK Office (Global Headquarters) EasySYNC Limited Unit 1, 2 Seaward Place Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 418 0181 Fax: +44 (0) 141 418 0110 E-Mail (Sales): snipped-for-privacy@easysync.co.uk E-Mail (Support): snipped-for-privacy@easysync.co.uk

US Office EasySYNC Limited (USA)

7130 SW Fir Loop Tigard, OR 97223-8160 USA New! Sales and Order inquiries, call toll free: +1 (855) 531-5825 Tel: +1 (503) 547-0909 Fax: +1 (503) 547-0990 E-Mail (Sales): E-Mail (Support):

No, I do not have shares of this firm, but I hate bad quality cables for my good money. So spent a little bit more and have no troubles.

More information about ECDIS you can find here in Dutch: Infopacket selfbuilding ECDIS:

Infopacket Ships Electro:

124 schematic diagrams for ships electro.

Note: My both packages are in the Dutch NL language!. Write FidoNet mail or e-mail if you have questions.

I think the EasySync ES-U-1001-R100 is the best offer in your case. Good luck with it.

Henri.

Reply to
Henri Derksen

There are lots of products using counterfeit PL2303 around, which often don't work to spec.

--
Andrew Gabriel 
[email address is not usable -- followup in the newsgroup]
Reply to
Andrew Gabriel

On reflection, this was a really silly suggestion because it only provides a 3 wire serial connection (Tx,Rx,Grnd).

I know the OP's problem is now solved, but here are comments about other gadgets I've run across and kept references to

I have no practical knowledge about the Nulsom NS-RS232, though I have it bookmarked in case I need something like it.

However, there is another family of devices that could be useful in some circumstances: Ethernet to RS-232 interconnects. These are self-contained devices that connect a TCP/IP session to serial RS-232 lines

Gridconnect Xports are basically an enlarged RJ-45 socket that mounts on a PCB and implements CTS/RTS signals. It is expected that you'll connect it to an UART chip, so its really all about letting you use a Telnet session to talk to legacy kit with a serial port. It has a built-in HTTP and telnet servers.

The NEMO10

formatting link
is functionally similar to the Xport but without the built-in HTTP server (but they sell a cased server with a built-in web server).

Microcontroller DS203 Pros

formatting link
sell a plastic cased module with RJ-45 on one end and 9-pin RS232 on the other. It provides similar functionality to the NEMO10.

Radicom's LSDB-200

formatting link
offers the same functionality as the NEMO10 as an uncased module with RS-232, RJ45 and power sockets.

None of these are amazingly cheap (the NEMo10 cased server and the DS203 are in the $100 range) but all offer interesting expansion paths because an RPi can talk to several of them: plug a network switch onto the RPi and it can talk to a serial device on every adapter that you plug into the switch.

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Kiwi User

Missed out the URL, which is:

formatting link

--
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Kiwi User

That was something I checked shortly after purchase in 2016. The adapters worked with Prolific's drivers on a Mac running OSX, which seems to imply they're "adequately" genuine.

The fact that they spam the log files with

86806.334529] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32 [387013.952810] pl2303 ttyUSB0: error sending break = -32 [387020.897773] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32 [387020.900679] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32 [389038.293922] pl2303 ttyUSB0: error sending break = -32 is most unwelcome, but seems harmless so far.

bob prohaska

Reply to
bob prohaska

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.