Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmds] Ktcp enhancements and various small cleanups #592

Merged
merged 1 commit into from
Apr 27, 2020
Merged

[cmds] Ktcp enhancements and various small cleanups #592

merged 1 commit into from
Apr 27, 2020

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Apr 27, 2020

Add '-s baudrate' option to ktcp, requested in #539. Modified /etc/rc.d/rc.sys, no need to run stty separately beforehand anymore.

Set new VMIN/VTIME serial line parameters for ktcp slip testing for @pawosm-arm, from #515.

Fixed lots of compiler warnings in ktcp, many more still there.

Add process ID to kernel sys_brk process out of memory errmsg, discussed off-topic in #586.

Temporary change to telnetd to exec /bin/login rather than /bin/sh for @pawosm-arm testing.

Quick one-line guess/fix to ash/mkinit.c to try to debug the occasional GitHub CI build errors that are seen just after merges/push to GitHub. This is the 'invalid character in file' that is generated and stops the build (see picture).

mkinit

@ghaerr ghaerr merged commit 2c50047 into ghaerr:master Apr 27, 2020
@pawosm-arm
Copy link
Contributor

The new -s ktcp option looks ok, I'm not sure about the other changes though (~ECHOE, VMIN, VTIME), a telnet connection from ELKS to custom-made telnet server running on Linux seems extremely slow, no matter what speed I tried (up to 4800, as for 9600 the telnet connection could not even be established).
I couldn't benefit from IDs printed along with sys_brk failure message: changing sh to login solved the problem (so I guess it wasn't telnetd to blame). Unfortunately, I couldn't experience Linux to ELKS connection: although login process was spawned (as seen by ps output on ELKS), nothing appeared in telnet client on Linux. I suspect serial communication issue.

Generally, this (already merged) PR gives some benefit and addresses the matter of this ticket, yet underlying issue of interrupt-driven serial communication remains.

@ghaerr
Copy link
Owner Author

ghaerr commented Apr 27, 2020

I'm not sure about the other changes though (~ECHOE, VMIN, VTIME)

Those changes will help, they don't change the serial port directly but allow larger data counts per read to be passed back to ktcp.

a telnet connection from ELKS to custom-made telnet server running on Linux seems extremely slow, no matter what speed I tried (up to 4800, as for 9600 the telnet connection could not even be established).

It appears your original issue is not solved. Did this fix allow your system to work faster than 300 baud? I am interested in results of any improvement. The kernel will now display serial overruns, so that is not apparently your problem.

changing sh to login solved the problem (so I guess it wasn't telnetd to blame).

Good to know. I will be able to debug sh vs login when I am able to get QEMU setup for networking, I need help on that.

Unfortunately, I couldn't experience Linux to ELKS connection: although login process was spawned (as seen by ps output on ELKS), nothing appeared in telnet client on Linux. I suspect serial communication issue.

I see. Did this not work at 300 baud either?

Generally, this (already merged) PR gives some benefit and addresses the matter of this ticket, yet underlying issue of interrupt-driven serial communication remains

Thanks. Agreed.

How do we know that your system UART chip in fact works correctly? Does this repeat on other machines? I'm sorry if you've already explained, but am just wondering about hardware possibilities at this point. We haven't got the full test results from @Mellvik on the improved sercat and serial handling yet, which is important.

@pawosm-arm
Copy link
Contributor

Did this fix allow your system to work faster than 300 baud?

Nah, it was possible before to go as fast as 4800bps, but the quality of service was deteriorating with growing speed. It's just that 300bps allows to sustain established telnet communication for longer. Note that many times it was just a matter of luck how long the communication worked before stalled, and this didn't change. The only improvement I see is that deterioration (at faster speeds) less often cause the system to hang and even with connection stuck, it's still keyboard-responsible.

How do we know that your system UART chip in fact works correctly?

It works on FreeDOS at all speeds available. I'm either redirecting FreeDOS console to serial (using ctty command) or use Telix which allows to connect at greater speeds (it is possible since Telix makes use of hardware control flow lines, and a full hardware control null-modem cable is the only one I have here). Yet it's easy with DOS: it's a single process system, hence the communication program is never preempted.
Also, I've installed Windows 3.0 on top of FreeDOS (the last Windows version one could install on 8086/8088, the next version, Windows 3.1, required 80286 at least), it has the HyperTerminal program. Although its top speed is limited to 19200, it also offers stable communication with the other side.

@ghaerr
Copy link
Owner Author

ghaerr commented Apr 27, 2020

It was possible before to go as fast as 4800bps, but the quality of service was deteriorating with growing speed.

So previous to all the serial mods in the last weeks, it worked better? Dang!

The only improvement I see is that deterioration (at faster speeds) less often cause the system to hang and even with connection stuck, it's still keyboard-responsible.

The recent changes have helped the system in general, I think, and are needed for higher throughput. But none of these changes seem related to the core issue with your machine.

It works on FreeDOS at all speeds available.

Great news, its a software problem! :) Time to look at the FreeDOS serial driver.

(it is possible since Telix makes use of hardware control flow lines, and a full hardware control null-modem cable is the only one I have here).

Oh. Maybe it isn't a software only problem - hardware flow control is needed for high speeds on your machine? We'll wait for @Mellvik's driver, since I don't (yet) have hardware to easily test with.

Can you confirm that you get high-speed data INPUT on FreeDOS without using the hardware null-modem cable? We're not using interrupt-driven serial output (yet).

Thanks for your testing!

@pawosm-arm
Copy link
Contributor

pawosm-arm commented Apr 27, 2020

Time to look at the FreeDOS serial driver.

I don't think it's the right stuff to examine. DOS serial port is hard to deal with (even its 'mode' command to configure communication parameters doesn't expose all the options both Telix and HyperTerminal have). Most of the DOS programs talk to the hardware directly (bypassing DOS) and have ability to provide ioports and IRQ.

Can you confirm that you get high-speed data INPUT on FreeDOS without using the hardware null-modem cable? We're not using interrupt-driven serial output (yet).

As I said, I don't have any other null-modem cable. Yet I managed to do some test with a DOS software that definitely can't handle hardware flow control. Up to speed 2400bps it's fine and stable. At 4800bps the inbound traffic (a longer piece of text pasted to minicom on the Linux side) started to suffer from minor character loses. That only confirms, not using hardware flow control is a bad idea...

@Mellvik
Copy link
Contributor

Mellvik commented Apr 28, 2020 via email

@ghaerr ghaerr deleted the fixup branch April 29, 2020 15:10
@ghaerr ghaerr mentioned this pull request Jul 18, 2020
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