From: Johan Hovold <johan@kernel.org>
To: Joe Abbott <jabbott@rollanet.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: pl2303.c 110 baud not working
Date: Fri, 8 Jan 2021 11:13:42 +0100 [thread overview]
Message-ID: <X/gwVvn09NFiIOWw@hovoldconsulting.com> (raw)
In-Reply-To: <CADuz4ONmN299aw460r4wXCEK5F1v9kt_cewCCrdg2hb5nJV9uQ@mail.gmail.com>
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
next prev parent reply other threads:[~2021-01-08 10:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=X/gwVvn09NFiIOWw@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=jabbott@rollanet.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox