From: Johan Hovold <johan@kernel.org>
To: Joe Abbott <jabbott@rollanet.org>
Cc: Johan Hovold <johan@kernel.org>, linux-usb@vger.kernel.org
Subject: Re: pl2303.c 110 baud not working
Date: Mon, 11 Jan 2021 10:28:33 +0100 [thread overview]
Message-ID: <X/waQXmnsYGX3d1b@hovoldconsulting.com> (raw)
In-Reply-To: <CADuz4OPhcFSdRhw9pmjzhEwaLJMih+X-suZg=NRR-QwOq8410A@mail.gmail.com>
On Sun, Jan 10, 2021 at 04:15:41PM -0600, Joe Abbott wrote:
> > Look for the set-line-request control request:
> >
> > bmRequestType 0x21
> > bRequest 0x20 (SET_LINE_REQUEST)
> > wValue 0
> > wIndex 0
> > wLength 7
> >
> > the data stage should contain the corresponding 7 bytes of request data
> > for 110/cs7/parenb:
> >
> > d5 0e 00 80 00 02 07
>
> Windows wireshark URB_CONTROL_OUT packets
> using putty set to at 110 baud 7E1
>
> The windows usb captures have these 7 bytes for 110 baud:
> a8 a6 01 80 00 02 07
Interesting...
> and these 7 bytes for 9600 baud:
> 80 25 00 00 00 02 07 0x2580 = 9600
>
> --------------------------------------------------------------------
> Linux wireshark URB_CONTROL_OUT packet
> using stty 110 evenp
>
> usb capture for 110 baud 7E1
> d5 0e 00 80 00 02 07
>
> I tried hard coding the first four 110 baud bytes into buf[0] - buf[3]
> in the divisor subroutine and
> 110 baud work fine. Possible problem in the divisor routine?
Or rather a new feature which do not yet support (or understand).
I tried hardcoding the same request with a HXD and it doesn't give me
110 baud. Instead the unsupported bits appears to be ignored and the
current divisor algorithm is applied so that
a8 a6 01 80 00 02 07
gives the same result as if
a8 06 00 80 00 02 07
had been requested (~35720 baud).
So in any case, we'd need to key this off of the device type.
I noticed that
12000000 / 0x1a6a8 ~= 110.9
Possibly just a coincidence, especially as 0x1aa22 would be closer
match. But perhaps you can try a few more rates not in baud_sup and see
if you can figure it out.
Johan
next prev parent reply other threads:[~2021-01-11 9:29 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
[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 [this message]
[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/waQXmnsYGX3d1b@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