Announcement

Collapse
No announcement yet.

ERR=68 Device Error after Attach on Server 2012

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ERR=68 Device Error after Attach on Server 2012

    Hello,

    Upgrading our server from 2003 SBS to 2012 Standard and ran into a printer problem. I am trying to print to LPT1 on the new server and I am getting a ERR equal to 68 which is a Comm error (not very helpful).

    At the beginning of the listing is a

    Code:
    ERRCLEAR
      LPRINT ATTACH "lpt1"
      IF ERR OR LPRINT$="" THEN PRINT "Error"
    This code worked on 2003 and gives a 68 error on 2012. Any ideas where to look?

    Frank

  • #2
    ?? 2003 SBS ?? and 2012 Standard ???

    Anyway a hardware and/or OS upgrade as well. Is that correct?

    So the printer is probably USB. But is or isn't, the logical port is no longer LPT1. My bet is LPT3 or LPT4, but check Windows settings.

    PB Help for Error 68 is a little more helpful than Comm Error; quoted below -
    Device unavailable - (%ERR_DEVICEUNAVAILABLE) - You tried to OPEN a device or attach to a device or graphic without that device present or installed.

    For example, opening COM1 on a system without a serial adapter or modem, or attempting to use TCP/IP or UDP/IP on a machine without Winsock 2.0 (or better) installed. Also, trying to attach to a graphic or printer that is not available will cause this error.
    Cheers,
    Dale

    Comment


    • #3
      ........getting a ERR equal to 68 which is a Comm error .... Any ideas where to look?

      How about in the PB help file?
      Error 68 - Device unavailable


      Device unavailable - (%ERR_DEVICEUNAVAILABLE) - You tried to OPEN a device or attach to a device or graphic without that device present or installed.

      For example, opening COM1 on a system without a serial adapter or modem, or attempting to use TCP/IP or UDP/IP on a machine without Winsock 2.0 (or better) installed. Also, trying to attach to a graphic or printer that is not available will cause this error.
      (I have no idea where you got "Comm error")

      So I would guess "lpt1" is not properly configured on your new system, or maybe it's configured under a different name.

      By the way you could have used..
      Code:
       ' yuck IF ERR OR LPRINT$="" THEN PRINT "Error"
      ' better:
       IF ERR OR LPRINT$="" THEN PRINT USING$ ("Error  #  &", ERR, ERROR$(ERRCLEAR))
      Then you probably would not have looked up "68" incorrectly! Heck, you wouldn't have had to look it up at all!

      [ADDED IN A BURST OF GENEROSITY]

      Heck, this would work for you too

      Code:
      MACRO ErrorMessage =  USING$ ("Error  #  &", ERR, ERROR$(ERRCLEAR))
      
      ....
      IF ERR or LPRINT$= "" THEN PRINT ErrorMessage
      
      ....



      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Hi Dale:
        When I said 2003 and 2012 I meant Windows Server 2003 Small Business Server upgraded to Windows Server 2012 Standard Edition.

        The guy that has been upgrading our server eventually gave up on trying to move the print capture shares over to 2012. He left the 2003 server installed just for the print shares. The new server is doing all the file sharing. The print servers are d-link and work perfectly with the 2003 server.

        Hi MCM:
        I was off by one. When I went to read the error I clicked 69. That one is a comm error and very brief. 68 is more to the point but still doesn't help.

        The only difference between the servers is:

        This one works:
        Code:
        net use lpt1 \\oldserver\eng-laser
        This one doesn't
        Code:
        net use lpt1 \\newserver\eng-laser
        It's probably a Windows question but I thought I would ask here first because it is a PBCC program tryng to print.

        Comment


        • #5
          >It's probably a Windows question but I thought I would ask here first because it is a PBCC program tryng to print.

          PB/CC told you it could not find a printer with that name, so, yeah, I think this is one of those "Hardware O/S and Networking" questions. Maybe you could look in that forum to see if anyone else had a similar problem.

          Or maybe... you could try....
          Code:
          LPRINT ATTACH  "\\oldserver\lpt1"
          .. since the print shares are still on \\oldserver.

          Also because the doc for LPRINT ATTACH includes..

          ....or to a printer on a network server:
          Code:
          LPRINT ATTACH "\\SERVER\HPLJ5"
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            If you are using the "NET USE" command to create LPT1 then this is no longer supported in Windows 2012.

            Comment


            • #7
              From my memory, you cannot redirect a device if it exist on a computer. At least XP for sure.
              So if there is a LPT1 device on a computer and you want to redirect it you likely cannot.
              Workarounds:
              Either remove it from the bios if you can or rename it. This is also problematic when a bios may change back to an original state.
              What I have done is to disable it in the device manager panel of the windows operating system. This has not caused any issues.
              We have removed all parallel devices on all equipment and moved to USB devices because we like to redirect LPTx ports for software also.
              p purvis

              Comment


              • #8
                >Workarounds:

                ADD:

                Change software to not be dependent on redirectability commands such as NET USE or ATTACH \\servername\device (although I don't know why the latter should not work).

                eg in this application I don't know why you would be using LPRINT rather than XPRINT. Best guess? Probably have had control codes ( eg PCL) for what is wanted forever and did not want to change software to set fonts all the time.
                Michael Mattias
                Tal Systems (retired)
                Port Washington WI USA
                [email protected]
                http://www.talsystems.com

                Comment


                • #9
                  The solution that the people installing the new server came up with is less than what I was expecting. They left the old 2003 SBS server installed as a print server and moved all domain control to the 2012 standard server. It works but I don't like it. They said something about it only working for 21 days. Huh? No clue what that meant.

                  They also suggested that I put a printer on each desk because it works to a local printer but not through the 2012 server. That way I can remove the 2003 server down the road. Also not what I would consider a good alternative. Didn't we make printers shared 30 years ago to save cost? Seems like a step backwards.

                  Paul: nothing was changed at any of the workstations. No LPT cards or ports were added or disabled. Both the 2003 and 2012 boxes have parallel ports on the motherboard, but not used..
                  MCM: All printing was working correctly on the 2003 server. The Net Use on the old I was hoping would work on the new. Yes, I didn't want to change over to XPrint unless I had to. LPrint does the job and does it well. It's Server 2012 that is letting me down here. Or like Lee said...it not supported. I haven't found actual proof of that on the Microsoft site yet.

                  Comment


                  • #10
                    Well, you know, sometimes the coding technique you choose is just not so portable to all possible future operating environments.

                    " ... hoping [NET USE] would work on the new" maybe was not the best plan to make your software maintainable.

                    >Didn't we make printers shared 30 years ago to save cost?

                    Indeed we did. But LPRINT does not use that feature; XPRINT does.

                    "They [the server installation techs] also suggested that I put a printer on each desk.."

                    Best guess "they" don't have to deal with the cost of printers or perhaps more importantly how they are going to deal with all the users who really don't want to give up part of their "space" or the inevitable "support requests" for changing ink/cartridges or "paper jam." Sounds like "they" are not quite ready for prime time applications design and development just yet. (Sheesh. This is "use a bigger hammer" writ large!)

                    MCM
                    Michael Mattias
                    Tal Systems (retired)
                    Port Washington WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11

                      BTW... what happened when you tried..
                      Code:
                         LPRINT ATTACH  "\\oldserver\lpt1"   ' or maybe "\\oldserver\LPT1:" or some other tweak
                      .. as suggested in the PB help?
                      Michael Mattias
                      Tal Systems (retired)
                      Port Washington WI USA
                      [email protected]
                      http://www.talsystems.com

                      Comment


                      • #12
                        Here's a wild thought:

                        Maybe you can give that printer a dedicated iP address. Then you could try
                        Code:
                        LPRINT ATTACH  "123.45.678.9"
                        There are lots of places under Windows where an IP address is recognized and accepted as a valid "device;" this just may be one of those places.

                        I have no clue how PB implements "LPRINT anything" but if you can do the IP thing this is easy to try.
                        Michael Mattias
                        Tal Systems (retired)
                        Port Washington WI USA
                        [email protected]
                        http://www.talsystems.com

                        Comment


                        • #13
                          All the print servers have a dedicated IP and a unique name.

                          Today is the first day that the "Experts" haven't been on site and I can play a bit with the network. I was able to get it to print everywhere except one printer with either "\\server\printer" or "123.45.678.9" or "LPT1". So it is not PB or 2012. There is something not set up right on that particular printer share. Pretty much what I felt all along but hard to tell with someone else that is suppose to be the expert changing things every few minutes to try something else.

                          So Server 2012 Standard does work with Net Use LPT1... at least on 4 of the 5 shares. Now to find out why that one is different.

                          Thanks MCM

                          Comment


                          • #14
                            Frank. You can set up a printer in the operating system on the clients or server and print to that printer device setup. You can change the port in a lot of ways. One thing that makes it desirable,to use that method is that the printers will be available and all things spooled and on a client it will be printed when the device,shared or otherwise will be available. I have set up some printer devices on clients with names starting with the letters "ZZ" so those printer names will always be listed last in any print dialog for other programs. Your program can also look for that printer name upon program startup
                            p purvis

                            Comment


                            • #15
                              I wanted to add that if you setup a printer device name in the windows os that is redirected to any other shared device on a network.
                              You can still deal with printing to LPT1-LPT9 or another DOS like device, then you can redirect that as well.
                              We assign/redirect LPT1 to LPT3 to local shared printers with a startup batch file using "NET USE LPT1 \\%COMPUTERNAME%\sharedprintername."

                              MCM is right for a lot of reasons and wrong for others for using other printer functions if they require use of using printers with fonts.
                              It all depends on what is trying to be achieved.
                              For one thing, on reports that are just text only. It is nice for me to create PDF files on redirected text reports.
                              But some things you may not want a person to be able to change in a printout. So it just comes down to what is really wanted.
                              I have seen where a program uses software specific alias names for printers in the software and the software allows you to match up the internal software alias names to windows os printer names.
                              eg: alias names might be L1 to L9 which might dos type names and W1 TO W9 might be printing to a windows only device. Whether L or W uses different software code to prepare for printing.
                              Well you can let your mind run free to create software that let you deal with different methods of printing and make it easier to move toward a windows printing method.

                              Also from my experience if speed is important. Printing to dos type device is much faster, but that is all debatable. We do use older machines.

                              For another thought, not that nobody said that they were using parallel printer, but also if you are. The parallel printers in the dos days use to have a high priority on the IRQ table from my memory.
                              p purvis

                              Comment


                              • #16
                                MCM is right for a lot of reasons and wrong for others for using other printer functions if they require use of using printers with fonts.
                                It's never "wrong" to suggest something to try.

                                In your case here, for example, you could use the Windows' printing subsystem to eliminate the need to use inbuilt printer fonts. Yes, you'd have to essentially rewrite your print routines but by golly it would work!

                                I believe I have said before: The worst reason to do something "the way I've always done it" is because that's the way you've always done it.

                                MCM
                                Michael Mattias
                                Tal Systems (retired)
                                Port Washington WI USA
                                [email protected]
                                http://www.talsystems.com

                                Comment


                                • #17
                                  Originally posted by Frank Rogers View Post
                                  The solution that the people installing the new server came up with is less than what I was expecting. They left the old 2003 SBS server installed as a print server and moved all domain control to the 2012 standard server. It works but I don't like it. They said something about it only working for 21 days. Huh? No clue what that meant.
                                  Hi Frank,
                                  SBS wants to be the ONLY domain controller on your network, the 21 day limit is SBS giving you time to migrate to a new DC and then... well I guess you will see :-)
                                  but you might want to get the printing sorted before then.

                                  Comment


                                  • #18
                                    Originally posted by Neil J Hosgood View Post

                                    Hi Frank,
                                    SBS wants to be the ONLY domain controller on your network, the 21 day limit is SBS giving you time to migrate to a new DC and then... well I guess you will see :-)
                                    but you might want to get the printing sorted before then.

                                    Don't ya just love the pay for it but can't use it forever model? I'm looking into getting the print server moved over to the new server and I also have a version of 2012 Essentials. Maybe that can serve as a print server?

                                    Frank

                                    Comment


                                    • #19
                                      RE 2003 SBS...

                                      https://blogs.technet.microsoft.com/...ort-lifecycle/

                                      Probably why you are upgrading. Possibly a source of any issues if leaving in service.


                                      Michael Mattias
                                      Tal Systems (retired)
                                      Port Washington WI USA
                                      [email protected]
                                      http://www.talsystems.com

                                      Comment


                                      • #20
                                        Hi Frank, print servers are usually one of the easiest things to do and using a DC as a print server is no different.
                                        I may have missed it but why are you trying to set all print queues up as parallel (lpt) ? is it that you have software that will only work with
                                        parallel printers?
                                        If not and all your printers are either network connected or directly connected to your server then just share the printers on the server (your print server)
                                        and make sure you have drivers installed on it do it can supply drivers to workstations.Use Group policy to push the printers out... whole point of AD :-)

                                        pay for it and cant use it forever? yes you can use it forever, you just wont get any OS or Security updates, I still use SBS2003 at home because I love exchange and it is only a
                                        mail server, I am NOT using anything that won't work with windows 10.

                                        If you need a bit more info then please PM me.

                                        Comment

                                        Working...
                                        X