Re: pl2303.c 110 baud not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux