Using serial ports for more than debug
Moderator: Moderator Team
Using serial ports for more than debug
Does anyone here have experience using serial ports in ReactOS for more than debugging? On recent builds here is what I've noticed:
I've installed the new release of puTTY in Ros:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
In a console window in Ros I do this (the last "N" means no handshaking):
putty -serial COM2 -sercfg 9600,8,n,1,N
Bug 1 - Both Dbg and Rel bootcd installs show COM1 and COM2 are available, but COM1 always fails to open. It should at least open on the Rel install, right?
Bug 2 -When I get COM2 opened using puTTY in Ros, I have to connect my cable to COM1 rather than COM2 on my Ros PC.
Bug 3 - Then on my other (real) windows PC I have to use a baud rate of 19200 rather than 9600.
Bug 4 - On the dbg install the reply from the PC to Ros doesn't appear in the puTTY terminal window. On the rel install the reply from the PC appears OK in the terminal.
I'm going to search more on this forum and the bug list but these are my initial test results. I'm not sure yet about the source of the noted bugs: Ros, putty, terminal program on (real) windows PC.
I've installed the new release of puTTY in Ros:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
In a console window in Ros I do this (the last "N" means no handshaking):
putty -serial COM2 -sercfg 9600,8,n,1,N
Bug 1 - Both Dbg and Rel bootcd installs show COM1 and COM2 are available, but COM1 always fails to open. It should at least open on the Rel install, right?
Bug 2 -When I get COM2 opened using puTTY in Ros, I have to connect my cable to COM1 rather than COM2 on my Ros PC.
Bug 3 - Then on my other (real) windows PC I have to use a baud rate of 19200 rather than 9600.
Bug 4 - On the dbg install the reply from the PC to Ros doesn't appear in the puTTY terminal window. On the rel install the reply from the PC appears OK in the terminal.
I'm going to search more on this forum and the bug list but these are my initial test results. I'm not sure yet about the source of the noted bugs: Ros, putty, terminal program on (real) windows PC.
Both COM ports work for me when I choose ReactOS instead of ReactOS (RosDbg). With dbg build.Bug 1 - Both Dbg and Rel bootcd installs show COM1 and COM2 are available, but COM1 always fails to open. It should at least open on the Rel install, right?
Confirmed.Bug 2 -When I get COM2 opened using puTTY in Ros, I have to connect my cable to COM1 rather than COM2 on my Ros PC.
The following functions: IOCTL_SERIAL_GET_CHARS, IOCTL_SERIAL_SET_CHARS, IOCTL_SERIAL_GET_HANDFLOW, and IOCTL_SERIAL_SET_HANDFLOW are not implemented; puTTY refuses to set a baud rate without them. Try this driver. No real functions, just stubs…Bug 3 - Then on my other (real) windows PC I have to use a baud rate of 19200 rather than 9600.
I can't reproduce this bug.Bug 4 - On the dbg install the reply from the PC to Ros doesn't appear in the puTTY terminal window. On the rel install the reply from the PC appears OK in the terminal.
Re: Using serial ports for more than debug
Sorry for my delay but thank you for the serial.sys to test. I'm now able to use serial communications in the rel build (but not in the dbg build). Will the new serial.sys be part of a new trunk build?
I'll try to do more testing ASAP and get back here with more details.
I'll try to do more testing ASAP and get back here with more details.
Re: Using serial ports for more than debug
Thanks, but can you make a rel build cd? All I see are dbg.
Re: Using serial ports for more than debug
Hmm?A dbg cd is the same as a rel cd...You can run a rel cd in ReactOS[Normal] Mode so it won't spam with debug messages.pbreneman wrote:Thanks, but can you make a rel build cd? All I see are dbg.
Re: Using serial ports for more than debug
The serial port works differently (for me at least) even when I use the default boot selection. On the dbg version I can send characters from ReactOS to another PC but I can't receive any characters sent by the other PC. On the rel version things work correctly.
The rel builder is down…
Can you collect debug messages to a file while trying to send/receive characters through com1, com2 ports? Use either a recent dbg build (r54468 or later) or this kernel; older revisions have a bug. Also, put the string filter +serial into C:\reactos\system32\drivers\etc\KDBinitOn the dbg version I can send characters from ReactOS to another PC but I can't receive any characters sent by the other PC.
Re: Using serial ports for more than debug
I've tried r54473 and things seem to work the same as before. I am unable to open COM1. When I open COM2 I am able to send characters (using COM1 connector) but incoming characters are not displayed.
In both cases, these are the only serial lines in the disk log file:
(ntoskrnl/mm/ARM3/sysldr.c:174) Loading: \SystemRoot\system32\drivers\serial.sys at FA0E2000 with 13 pages
and
(drivers/serial/serial/devctrl.c:697) IOCTL_SERIAL_SET_HANDFLOW not implemented.
(drivers/serial/serial/devctrl.c:655) IOCTL_SERIAL_SET_CHARS not implemented.
Any idea when the rel builder will be up again? It should allow me to have at least COM2 (using COM1 connector) working as before.
In both cases, these are the only serial lines in the disk log file:
(ntoskrnl/mm/ARM3/sysldr.c:174) Loading: \SystemRoot\system32\drivers\serial.sys at FA0E2000 with 13 pages
and
(drivers/serial/serial/devctrl.c:697) IOCTL_SERIAL_SET_HANDFLOW not implemented.
(drivers/serial/serial/devctrl.c:655) IOCTL_SERIAL_SET_CHARS not implemented.
Any idea when the rel builder will be up again? It should allow me to have at least COM2 (using COM1 connector) working as before.
Re: Using serial ports for more than debug
Here is a new bug report on these problems:
http://www.reactos.org/bugzilla/show_bug.cgi?id=6687
http://www.reactos.org/bugzilla/show_bug.cgi?id=6687
Re: Using serial ports for more than debug
Just tried r54672 and problems remain. Is there any estimate of when rel boot cds will again be available?
Re: Using serial ports for more than debug
Must be some simple way to search the source code and fix things so that the serial port is completely left alone when ReactOS is started normally? If we can do that then the dbg build cd should work just as well as the last rel build cd.
No idea, but I just compiled a fresh rel boot cd.Is there any estimate of when rel boot cds will again be available?
Dbg builds work for me as well as the rel ones.If we can do that then the dbg build cd should work just as well as the last rel build cd.
Re: Using serial ports for more than debug
Thanks! I'll give it a test and let you know how it works. If one port fully works I have several places I can put ReactOS into operation for real stuff.I just compiled a fresh rel boot cd.
Could you please describe your system a little? Is it a real PC or a virtual machine? How many serial ports do you have? Could you tell me what addresses and IRQs are used by the ports?Dbg builds work for me as well as the rel ones.
I have 2 serial ports configured on real hardware:
COM1 3F8 IRQ4
COM2 2F8 IRQ3
Re: Using serial ports for more than debug
On the rel build I'm able to use COM2 (but connected to the physical COM1 port) to send and receive data as long as I have the hardware lines connected to my other PC (using a null-modem cable).
If I momentarily disconnect the serial cable (and thus the hardware lines) and then restore the cable things stop working until I reboot ReactOS (at least that is fast). After I disturb the hardware lines I can no longer receive anything from my other PC. The data sent to my other PC is no longer correct (it is buffered and what goes out is earlier data not sent when requested). Closing and reopening the port doesn't help. Stopping and restarting my test program doesn't help. Only a reboot gets things working again.
So as long as I keep hardware lines connected I seem to have one serial port working well on the release version.
If I try opening COM1 (with hardware lines connected on COM1) whatever I send out the port is echoed back, but nothing goes to the other PC. So if anyone tries this don't let the echo lead you to believe it is working. It never receives anything from the other PC. Without connected hardware lines what is sent out is not echoed back.
On a recent dbg build (r54672) opening COM1 fails the same as on the rel build. Opening COM2 (connected to physical COM1 port) fails the same as the rel build fails *after* the hardware lines are disturbed. So on the dbg build I'm unable to use any serial port, and that is all with starting ReactOS normally which should leave the serial port alone.
On the first part of the rel build install it randomly stops while copying files from the CD to the HD. I had to keep trying until it just happened to work. This is another problem I hope to report elsewhere. The dbg build works good (without this problem).
If I momentarily disconnect the serial cable (and thus the hardware lines) and then restore the cable things stop working until I reboot ReactOS (at least that is fast). After I disturb the hardware lines I can no longer receive anything from my other PC. The data sent to my other PC is no longer correct (it is buffered and what goes out is earlier data not sent when requested). Closing and reopening the port doesn't help. Stopping and restarting my test program doesn't help. Only a reboot gets things working again.
So as long as I keep hardware lines connected I seem to have one serial port working well on the release version.
If I try opening COM1 (with hardware lines connected on COM1) whatever I send out the port is echoed back, but nothing goes to the other PC. So if anyone tries this don't let the echo lead you to believe it is working. It never receives anything from the other PC. Without connected hardware lines what is sent out is not echoed back.
On a recent dbg build (r54672) opening COM1 fails the same as on the rel build. Opening COM2 (connected to physical COM1 port) fails the same as the rel build fails *after* the hardware lines are disturbed. So on the dbg build I'm unable to use any serial port, and that is all with starting ReactOS normally which should leave the serial port alone.
On the first part of the rel build install it randomly stops while copying files from the CD to the HD. I had to keep trying until it just happened to work. This is another problem I hope to report elsewhere. The dbg build works good (without this problem).
Who is online
Users browsing this forum: No registered users and 46 guests