Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: mode woes  (Read 10557 times)

0 Members and 1 Guest are viewing this topic.

student0101

    Topic Starter


    Rookie

    • Experience: Experienced
    • OS: Other
    mode woes
    « on: January 20, 2015, 09:21:12 AM »
    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.



    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: mode woes
    « Reply #1 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.
    Maybe even try just typing MODE at the dos prompt by itself.

    student0101

      Topic Starter


      Rookie

      • Experience: Experienced
      • OS: Other
      Re: mode woes
      « Reply #2 on: January 20, 2015, 11:03:14 AM »
      Unfortunately, neither of those options reports the current COM1 setting

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      Re: mode woes
      « Reply #3 on: January 20, 2015, 12:07:05 PM »
      Unfortunately, neither of those options reports the current COM1 setting

      When you type MODE /? at the dos prompt, what do you see?

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: mode woes
      « Reply #4 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).


      I was trying to dereference Null Pointers before it was cool.

      Squashman



        Specialist
      • Thanked: 134
      • Experience: Experienced
      • OS: Other
      Re: mode woes
      « Reply #5 on: January 20, 2015, 12:10:04 PM »
      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.

      student0101

        Topic Starter


        Rookie

        • Experience: Experienced
        • OS: Other
        Re: mode woes
        « Reply #6 on: January 20, 2015, 12:19:28 PM »
        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.


        Squashman



          Specialist
        • Thanked: 134
        • Experience: Experienced
        • OS: Other
        Re: mode woes
        « Reply #7 on: January 20, 2015, 12:23:29 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.

        student0101

          Topic Starter


          Rookie

          • Experience: Experienced
          • OS: Other
          Re: mode woes
          « Reply #8 on: January 20, 2015, 12:34:14 PM »
          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]

          Squashman



            Specialist
          • Thanked: 134
          • Experience: Experienced
          • OS: Other
          Re: mode woes
          « Reply #9 on: January 20, 2015, 12:41:48 PM »
          Did you happen to try typing MODE /? at the DOS prompt and notice any options to display the STATUS of the com port.
          Device Status:     MODE [device] [/STATUS]

          Did you try that?

          student0101

            Topic Starter


            Rookie

            • Experience: Experienced
            • OS: Other
            Re: mode woes
            « Reply #10 on: January 20, 2015, 12:47:16 PM »
            Yes I did. It only says:

            Status for device COM1:
            -------------------------------------
            Retry=NONE

            Squashman



              Specialist
            • Thanked: 134
            • Experience: Experienced
            • OS: Other
            Re: mode woes
            « Reply #11 on: January 20, 2015, 12:52:30 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?

            student0101

              Topic Starter


              Rookie

              • Experience: Experienced
              • OS: Other
              Re: mode woes
              « Reply #12 on: January 20, 2015, 01:03:56 PM »
              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.

              student0101

                Topic Starter


                Rookie

                • Experience: Experienced
                • OS: Other
                Re: mode woes
                « Reply #13 on: January 20, 2015, 01:41:33 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.




                Squashman



                  Specialist
                • Thanked: 134
                • Experience: Experienced
                • OS: Other
                Re: mode woes
                « Reply #14 on: January 20, 2015, 01:48:46 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.