Skip to contentSkip to conversation

New: USB-serial (mct_u232): bit7=1 when tty is set to cs7?

Bug 208959 [email protected] 2 participants 6 messages Aug 19, 2020 – Aug 26, 2020 USB

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=208959

            Bug ID: 208959
           Summary: USB-serial (mct_u232): bit7=1 when tty is set to cs7?
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.7.0
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: USB
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

I'm not 100% certain this is a bug, please let me know if this is expected behavior.

I have hooked an old serial mouse up to a USB serial device, USB ID 0711:0230 (part of an circa 2000 Targus port replicator)

when I configure it with the appropriate 1200 baud and 7 bit char width, the bytes that come through /dev/ttyUSB0 all have bit7 set to 1.

This behavior is in contrast to an old serial port on a box running a 2.4.19 kernel.

Is there a standard for the value that non-data bits should be set to?

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw
Quoted 24 lines · On Wed, Aug 19, 2020 at 02:52:47AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=208959

            Bug ID: 208959
           Summary: USB-serial (mct_u232): bit7=1 when tty is set to cs7?
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.7.0
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: USB
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

I'm not 100% certain this is a bug, please let me know if this is expected behavior.

I have hooked an old serial mouse up to a USB serial device, USB ID 0711:0230 (part of an circa 2000 Targus port replicator)

Quoted 7 lines

when I configure it with the appropriate 1200 baud and 7 bit char width, the bytes that come through /dev/ttyUSB0 all have bit7 set to 1.

This behavior is in contrast to an old serial port on a box running a 2.4.19 kernel.

Is there a standard for the value that non-data bits should be set to?

This sounds like a configuration issue. If the mouse is indeed using 7n1 and the converter is expecting 8n1 you could end up with bit 7 always set on input.

Can you verify that the converter is configured correctly, for example, by reading out the termios settings, enabling debugging and/or connecting it to another serial port configured for 7n1?

Johan

#2 lore raw

[Bug 208959] USB-serial (mct_u232): bit7=1 when tty is set to cs7?

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=208959

--- Comment #1 from Johan Hovold ([email protected]) ---

Quoted 24 lines · On Wed, Aug 19, 2020 at 02:52:47AM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=208959

            Bug ID: 208959
           Summary: USB-serial (mct_u232): bit7=1 when tty is set to cs7?
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.7.0
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: USB
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

I'm not 100% certain this is a bug, please let me know if this is expected behavior.

I have hooked an old serial mouse up to a USB serial device, USB ID 0711:0230 (part of an circa 2000 Targus port replicator)

Quoted 7 lines

when I configure it with the appropriate 1200 baud and 7 bit char width, the bytes that come through /dev/ttyUSB0 all have bit7 set to 1.

This behavior is in contrast to an old serial port on a box running a 2.4.19 kernel.

Is there a standard for the value that non-data bits should be set to?

This sounds like a configuration issue. If the mouse is indeed using 7n1 and the converter is expecting 8n1 you could end up with bit 7 always set on input.

Can you verify that the converter is configured correctly, for example, by reading out the termios settings, enabling debugging and/or connecting it to another serial port configured for 7n1?

Johan

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 208959] USB-serial (mct_u232): bit7=1 when tty is set to cs7?

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=208959

--- Comment #2 from [email protected] ([email protected]) --- Please clarify what you mean by "converter" here.

FYI to test I was just doing this:

# stty -F /dev/ttyUSB0 1200 cs7
# dd if=/dev/ttyUSB0 bs=1|hd
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

Re: [Bug 208959] USB-serial (mct_u232): bit7=1 when tty is set to cs7?

Quoted 4 lines · On Tue, Aug 25, 2020 at 03:20:48PM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=208959

--- Comment #2 from [email protected] ([email protected]) --- Please clarify what you mean by "converter" here.

I was referring to the USB-serial device.

Quoted 3 lines

FYI to test I was just doing this:

# stty -F /dev/ttyUSB0 1200 cs7

What is the output of "stty -a -F /dev/ttyUSB0" after this?

Quoted 1 line
# dd if=/dev/ttyUSB0 bs=1|hd

Try using a terminal program instead and connect the device to another USB-serial device (e.g. ftdi or pl2303) and see if you can get 7-bit words to work.

You can also try enabling debugging and provide the relevant bits from dmesg when you connect, configure and read from the device:

echo module mct_u232 +p > /sys/kernel/debug/dynamic_debug/control

Johan

#5 lore raw

[Bug 208959] USB-serial (mct_u232): bit7=1 when tty is set to cs7?

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=208959

--- Comment #3 from Johan Hovold ([email protected]) ---

Quoted 4 lines · On Tue, Aug 25, 2020 at 03:20:48PM +0000, [email protected]…

https://bugzilla.kernel.org/show_bug.cgi?id=208959

--- Comment #2 from [email protected] ([email protected]) --- Please clarify what you mean by "converter" here.

I was referring to the USB-serial device.

Quoted 3 lines

FYI to test I was just doing this:

# stty -F /dev/ttyUSB0 1200 cs7

What is the output of "stty -a -F /dev/ttyUSB0" after this?

Quoted 1 line
# dd if=/dev/ttyUSB0 bs=1|hd

Try using a terminal program instead and connect the device to another USB-serial device (e.g. ftdi or pl2303) and see if you can get 7-bit words to work.

You can also try enabling debugging and provide the relevant bits from dmesg when you connect, configure and read from the device:

echo module mct_u232 +p > /sys/kernel/debug/dynamic_debug/control

Johan

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.