1.

Solve : mode woes?

Answer»

Hello all.

I need a hand with mode command.

Using MS-DOS 5.0 on an HP 8000 Elite SFF.  Have a Raven 2406 parallel printer attached to COM1 via a 6 foot long Black Box PIO45A DB9 to Centronics serial to parallel converter. COM1 is set in the autoexec.bat file to "mode com1:48,n,8,1,p" and the converter (DIP switches) to flow control=hardware, no parity, 8 bits, stop bit=1, data rate=4800. The printer works just fine for days on end, even after daily shutdowns and restarts, but then nothing is printed. No error messages, it just doesn't print. Nothing is changed in the hardware or software. Tried reissuing the same mode command just before printing to no avail. Several restarts later it works again for days, then nothing. Changing COM1 and adapter settings is not an option, as 7bits (1 or 2 stop bits) results in lost print content.

My question: Is there a way to get MS-DOS 5.0 to report the current COM1 setting (without issuing a command to change it)?

Thanks for any help in solving this mystery.


Did you happen to try typing MODE /? at the DOS prompt and notice any options to display the status of the com port.
Maybe even try just typing MODE at the dos prompt by itself.Unfortunately, neither of those options reports the current COM1 setting Quote from: student0101 on January 20, 2015, 11:03:14 AM

Unfortunately, neither of those options reports the current COM1 setting

When you type MODE /? at the dos prompt, what do you see?My own memory is a bit rusty but to my recollection you cannot actually view the current settings, the "STATUS" shown for it will only include the RETRY=NONE for some stupid reason. Further googling as you've likely attempted as well doesn't reveal anything.

I was able to see the current COM port settings by running MSD (Microsoft DIAGNOSTICS) However this is new in MS-DOS 6 so isn't in MS-DOS 5. I don't know of a in-box way of viewing the settings without a tool like MSD. (MSD also came with Windows 3.x as I recall, possibly other MS Software as well).

Also, if you are printing, I would expect you are using redirection to redirect an LPT port to the serial port? If that is the case, than it is worth noting that if you change the settings on the serial port you need to re-issue the redirection command. (MODE LPT1=COM1), otherwise printing won't work. (I don't know if it resets the redirection itself or perhaps has it using the old values for the redirect).


I unfortunately can't REMEMBER that far back to know what the OPTIONS were for the MODE command back then. That is why I have been trying to get him to tell us what it is because he has access to it.mode /? shows the command syntax and lists available options.

I'm trying to talk to the com port directly, e.g. "dir > com1". When it works, it prints the directory OK.

Quote from: student0101 on January 20, 2015, 12:19:28 PM
mode /? shows the command syntax and lists available options.
Yes, but I am LITERALLY asking to the the output of MODE /?.
I don't have access to any version of DOS anymore so I need to see what the options are.This is what "mode /?" displays:

Configures system devices.

Printer port:      MODE LPTn[:] [COLS=c] [LINES=l] [RETRY=r]
Serial port:       MODE COMm[:] [BAUD=b] [PARITY=p] [DATA=d] [STOP=s] [RETRY=r]
Device Status:     MODE [device] [/STATUS]
Redirect printing: MODE LPTn[:]=COMm[:]
Prepare code page: MODE device CP PREPARE=((yyy[...]) [drive:][PATH]filename)
Select code page:  MODE device CP SELECT=yyy
Refresh code page: MODE device CP REFRESH
Code page status:  MODE device CP [/STATUS]
Display mode:      MODE [display-adapter][,n]
                   MODE CON[:] [COLS=c] [LINES=n]
Typematic rate:    MODE CON[:] [RATE=r DELAY=d] Quote from: Squashman on January 20, 2015, 09:42:32 AM
Did you happen to try typing MODE /? at the DOS prompt and notice any options to display the STATUS of the com port.
Quote from: student0101 on January 20, 2015, 12:34:14 PM
Device Status:     MODE [device] [/STATUS]

Did you try that?Yes I did. It only says:

Status for device COM1:
-------------------------------------
Retry=NONE Quote from: student0101 on January 20, 2015, 12:47:16 PM
Yes I did. It only says:

Status for device COM1:
-------------------------------------
Retry=NONE
Why did it take me 5 posts to get that information out of you? I feel like a Dentist today. Is there any way I could have worded my comments better?I don't know. I think I detailed my problem and how I tried to solve it sufficiently in my initial post. If the answer were in the DOS manual I wouldn't need to bother you. Quote from: BC_Programmer on January 20, 2015, 12:07:41 PM
My own memory is a bit rusty but to my recollection you cannot actually view the current settings, the "STATUS" shown for it will only include the RETRY=NONE for some stupid reason. Further googling as you've likely attempted as well doesn't reveal anything.

I was able to see the current COM port settings by running MSD (Microsoft Diagnostics) However this is new in MS-DOS 6 so isn't in MS-DOS 5. I don't know of a in-box way of viewing the settings without a tool like MSD. (MSD also came with Windows 3.x as I recall, possibly other MS Software as well).

Also, if you are printing, I would expect you are using redirection to redirect an LPT port to the serial port? If that is the case, than it is worth noting that if you change the settings on the serial port you need to re-issue the redirection command. (MODE LPT1=COM1), otherwise printing won't work. (I don't know if it resets the redirection itself or perhaps has it using the old values for the redirect).

Thanks, BC_Programmer. I was able to download MSD.EXE and run it on MS-DOS 5.0. Under COM Ports it reports COM1 is correctly set for Port Address, Baud rate, Parity, Data Bits and Stop Bits. Carrier Detect=Yes, Ring Indicator=No, Data Set Ready=Yes, Clear to Send=Yes, UART chip Used=16550AF. Printer working OK at the moment. I'll see what it says next time the printer isn't printing.



Quote from: student0101 on January 20, 2015, 01:03:56 PM
If the answer were in the DOS manual I wouldn't need to bother you.
You must not HANG out on a lot of Tech Help Forums.
If I had a dime for every time someone didn't bother to check the help file or manual for a program, I could quit my day job and do this as my full-time job if they decided to pay me.  Most of the time we act like Dentists trying to extract information from the person posting the question. We can't assume anything about the person posting the question.


Discussion

No Comment Found