* pl2303.c 110 baud not working
@ 2021-01-07 21:06 Joe Abbott
2021-01-08 9:57 ` David Laight
2021-01-08 10:13 ` Johan Hovold
0 siblings, 2 replies; 9+ messages in thread
From: Joe Abbott @ 2021-01-07 21:06 UTC (permalink / raw)
To: linux-usb
Got redirected here by GKH email-bot.
My message to him was:
I have an ASR33 teletype that I'm trying to communicate with using a
PL2303 based Benfei USB serial adapter. The ASR requires 110 baud 7E1
and it appears that the driver is defaulting to 9600 baud. (possibly
because the baud_sup array doesn't contain 110?) I've tried adding
110 to the array and recompiling but that doesn't seem to help. I did
have to comment out the '/ SPDX-License-Identifier: GPL-2.0' line in
pl2303.c to get it to compile.
The windows driver works so the hardware is capable.
I must be missing something. Any help appreciated.
Running Mint 19.3 64-bit.
I'm using stty to set baud rate like this:
stty 110 cs7 evenp -F /dev/ttyUSB0
stty reports that 110 is in use when I:
stty -F /dev/ttyUSB0
Oscope shows 150 and above changing (didn't try 75) but 110 reverts to
9600 (mentioned in pl2303.c file).
Also tried putty.
dmesg:
[ 3990.294929] usb 6-1: new full-speed USB device number 13 using uhci_hcd
[ 3990.479021] usb 6-1: New USB device found, idVendor=067b,
idProduct=2303, bcdDevice= 3.00
[ 3990.479028] usb 6-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3990.479032] usb 6-1: Product: USB-Serial Controller
[ 3990.479036] usb 6-1: Manufacturer: Prolific Technology Inc.
[ 3990.481075] pl2303 6-1:1.0: pl2303 converter detected
[ 3990.494144] usb 6-1: pl2303 converter now attached to ttyUSB0
Here is lsusb:
Bus 002 Device 002: ID 0bda:0158 Realtek Semiconductor Corp. USB 2.0
multicard reader
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 002: ID 046d:c00e Logitech, Inc. M-BJ58/M-BJ69 Optical
Wheel Mouse
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 009: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f2:b027 Chicony Electronics Co., Ltd Gateway
USB 2.0 Webcam
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Here's modinfo:
filename:
/lib/modules/5.0.0-32-generic/kernel/drivers/usb/serial/pl2303.ko
license: GPL v2
description: Prolific PL2303 USB to serial adaptor driver
srcversion: 4864FE101A0398064B5D9A8
alias: usb:v0CAAp3001d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0B8Cp2303d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0B63p6530d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11ADp0001d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v054Cp0437d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v04B8p0522d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v04B8p0521d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p0956d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p5039d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p026Bd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p3239d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p3139d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p4439d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p0B39d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p0183d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p0F7Fd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p4349d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v03F0p3524d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v5372p2303d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v05ADp0FBAd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v07AAp002Ad*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F6p2001d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v058Fp9720d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v050Dp0257d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0731p2003d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0E55p110Bd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0413p2101d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v079Bp0027d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v10B5pAC70d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v078Bp1234d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0745p0001d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v04A5p4027d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F5p0005d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F5p0004d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F5p0003d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F5p0001d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v11F7p02DFd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v6189p2068d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0731p0528d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v1453p4026d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v2478p2008d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0584pB000d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0DF7p0620d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0EBAp2080d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0EBAp1080d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v056Ep5004d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v056Ep5003d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0547p2008d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0557p2118d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0557p2022d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0557p2021d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v0557p2008d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v04BBp0A0Ed*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v04BBp0A03d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23F3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23E3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23D3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23C3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23B3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp23A3d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp2304d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067BpE1F1d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp0307d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp331Ad*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp0609d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp0612d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp0611d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067BpAAA0d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067BpAAA8d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067BpAAA2d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp1234d*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp04BBd*dc*dsc*dp*ic*isc*ip*in*
alias: usb:v067Bp2303d*dc*dsc*dp*ic*isc*ip*in*
depends: usbserial
retpoline: Y
name: pl2303
vermagic: 5.0.0-32-generic SMP mod_unload
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: pl2303.c 110 baud not working
2021-01-07 21:06 pl2303.c 110 baud not working Joe Abbott
@ 2021-01-08 9:57 ` David Laight
2021-01-08 10:13 ` Johan Hovold
1 sibling, 0 replies; 9+ messages in thread
From: David Laight @ 2021-01-08 9:57 UTC (permalink / raw)
To: 'Joe Abbott', linux-usb
From: Joe Abbott
> Sent: 07 January 2021 21:06
> My message to him was:
> I have an ASR33 teletype that I'm trying to communicate with using a
> PL2303 based Benfei USB serial adapter. The ASR requires 110 baud 7E1
...
I believe you'll also need either 1.5 or 2 stop bits (can't remember
which) and delays (usually 0 bytes) after CR (and probably LF).
Using an ASR33 with 'remote echo' is a bit like trying to talk
on a transatlantic phone line with broken echo cancellation.
Especially if the 100 baud link is being carried over acoustically
coupled modems (remember those?).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: pl2303.c 110 baud not working
2021-01-07 21:06 pl2303.c 110 baud not working Joe Abbott
2021-01-08 9:57 ` David Laight
@ 2021-01-08 10:13 ` Johan Hovold
[not found] ` <CADuz4ONNPq+mADWYPKp8+M2rZtuoMwjO=+HDXfgrO2dQ0S1vQA@mail.gmail.com>
1 sibling, 1 reply; 9+ messages in thread
From: Johan Hovold @ 2021-01-08 10:13 UTC (permalink / raw)
To: Joe Abbott; +Cc: linux-usb
On Thu, Jan 07, 2021 at 03:06:07PM -0600, Joe Abbott wrote:
> Got redirected here by GKH email-bot.
>
> My message to him was:
> I have an ASR33 teletype that I'm trying to communicate with using a
> PL2303 based Benfei USB serial adapter. The ASR requires 110 baud 7E1
> and it appears that the driver is defaulting to 9600 baud. (possibly
> because the baud_sup array doesn't contain 110?) I've tried adding
> 110 to the array and recompiling but that doesn't seem to help. I did
> have to comment out the '/ SPDX-License-Identifier: GPL-2.0' line in
> pl2303.c to get it to compile.
No, you don't need to add 110 to the baud_sup array as 110 baud is set
using divisors (i.e. pl2303_encode_baud_rate_divisor()).
> The windows driver works so the hardware is capable.
>
> I must be missing something. Any help appreciated.
>
> Running Mint 19.3 64-bit.
>
> I'm using stty to set baud rate like this:
> stty 110 cs7 evenp -F /dev/ttyUSB0
> stty reports that 110 is in use when I:
> stty -F /dev/ttyUSB0
>
> Oscope shows 150 and above changing (didn't try 75) but 110 reverts to
> 9600 (mentioned in pl2303.c file).
I just verified using a logic analyser that 110 baud works just fine
here (with even parity too) using a PL2303 HXD.
Not sure what kernel version you're on, but this should have been
supported since at least around 2015 (and I think we backported the
corresponding fix of the divisor algorithm to earlier kernels).
Try a recent mainline kernel or enable dynamic debugging and make sure
the line request is sent correctly (110 cs7 parenb):
pl2303_set_line_request - d5 0e 00 80 00 02 07
If there's some difference in how your device encodes baud rates you may
be able to compare that with what the Windows driver uses by tracing the
USB packets.
Johan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-02-01 8:44 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 21:06 pl2303.c 110 baud not working Joe Abbott
2021-01-08 9:57 ` David Laight
2021-01-08 10:13 ` Johan Hovold
[not found] ` <CADuz4ONNPq+mADWYPKp8+M2rZtuoMwjO=+HDXfgrO2dQ0S1vQA@mail.gmail.com>
2021-01-08 14:32 ` Johan Hovold
[not found] ` <CADuz4OPCnq_4Xx-sWc-ZijoQRAZR-4+MRvpOx4np2rXifoCL5A@mail.gmail.com>
2021-01-10 12:04 ` Johan Hovold
2021-01-10 22:15 ` Joe Abbott
2021-01-11 9:28 ` Johan Hovold
[not found] ` <CADuz4OO9DnauGr5MwMupuZrKOxU7Jrr54-a2_vGGXRQTCxPc1Q@mail.gmail.com>
2021-01-30 11:30 ` Joe Abbott
2021-02-01 8:43 ` Johan Hovold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.