Skip to content

Conversation

@adh
Copy link

@adh adh commented Sep 15, 2023

Summary

The logic for clearing bits in termios.c_flag was reversed. That caused clearing of all the other flags than which were intended to be cleared, which in turn caused the host serial port to be stuck at random and unusable configuration (5 data bits on macOS).

Checklist

@cold-brewed
Copy link
Contributor

Thank you for the PR. Did you notice the serial port being stuck in random configurations while serial passthrough was in use, or after exiting 86Box?

@adh
Copy link
Author

adh commented Sep 15, 2023

In use. The bug this fixes made the serial passthrough essentially unusable.

@adh
Copy link
Author

adh commented Sep 15, 2023

Seems to be related to #3224

@cold-brewed
Copy link
Contributor

Alright. I was able to previously (without the fix) access a serial console in a linux guest, macOS host, using minicom. Though I did notice some odd behavior which may be related. I'll test out this PR to see if it addresses the issues I had.

@adh
Copy link
Author

adh commented Sep 15, 2023

Note that this is relevant for passthrough to a real physical host serial port (tested on macOS host with FTDI serial converter). It does not matter for ptys as the there is no hardware UART to configure.

Without the fix sending U (0x55) from the VM leads to this:
IMG_6941

ie. 5 databits, not 8 as in the configuration file. The reason for this behavior is that the expression on line 168 clears the configured number of databits.

@OBattler OBattler merged commit fafb0dd into 86Box:master Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants