Open Server 3.0 network printer problem Part III - SCO

This is a discussion on Open Server 3.0 network printer problem Part III - SCO ; I have figured out how to get the network printer set up using Brian White's universal script. Unfortunately for my configuration to work I need rlpr binary for SCO Unix Open Server 3.0. This requires a coff binary and I ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Open Server 3.0 network printer problem Part III

  1. Open Server 3.0 network printer problem Part III

    I have figured out how to get the network printer set up using Brian
    White's universal script. Unfortunately for my configuration to work I
    need rlpr binary for SCO Unix Open Server 3.0. This requires a coff
    binary and I have no Development System to build one on.

    Is there any place I can get one pre-built?

    I find the source all over the place but that doesn't help me.

    --
    Rob Steinmetz

  2. Re: Open Server 3.0 network printer problem Part III


    ----- Original Message -----
    From: "Rob"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Thursday, July 27, 2006 11:15 AM
    Subject: Open Server 3.0 network printer problem Part III


    >I have figured out how to get the network printer set up using Brian
    >White's universal script. Unfortunately for my configuration to work I need
    >rlpr binary for SCO Unix Open Server 3.0. This requires a coff binary and I
    >have no Development System to build one on.
    >
    > Is there any place I can get one pre-built?
    >
    > I find the source all over the place but that doesn't help me.
    >
    > --
    > Rob Steinmetz


    If you need rlpr and can't use netcat, then really you don't need my script
    since the rlpr option is just a sort of convenience.

    Or maybe I've forgotten the beginning of the thread.
    Is it that you initially tried to use the stock lpr client and it didn't
    work?

    What kind of print server are you dealing with? There are several that can
    do raw tcp (netcat) although some are notoriously buggy and only work
    reliably when using lpr/lpd or windows (netbios/smb/cifs)

    Note that just because a given print server doesn't work with netcat on tcp
    ports 9100, 9101, 9102, It doesn't mean it doesn't work with netcat.
    Some accept raw tcp on some other ports like 4010, 4020, 4030, some allow
    you to specify the port you want and don't use any by default until you do
    enable the option and set a port. Some do both 9100 and any other ports you
    want. And some you just have to turn the option on first.

    If it were me at this point in your particular shoes
    First I'd try the stock lpr/lpd system again.
    Then I'd just get a print server that I know works with netcat.
    My number one choice would be any HP JetDirect that does tcp (some only do
    ipx/spx (netware) or token ring etc). Exact model depends on the type of
    printer. My next choice would be any Intel. Other than that it's pot luck.
    not all the cheap ones fail, a few like the netgear PS101 (and several
    others that are the same unit with different name plates) are worse than
    junk in that they work enough to make you think they work.
    I wouldn't be surprised if the better print server turns out to also work
    fine with the stock lpr/lpd. There are many reasons why the good print
    servers are good. I've had good luck with the proprietary print servers
    built into the big standalone office printers too like Savin & Ricoh (HP
    goes without saying).

    I'll try to build a coff binary on the system where I built the elf binary
    but do NOT hold your breath
    I never bothered to try to figure out how to do that, and I don't know if
    gcc even can do it, nor do I know how difficult it will be to hack up the
    Makefile to do it. Aside from building a coff binary, I'm pretty sure it'll
    also need to be a static binary which is another possibly difficult hack.
    After that there might even be kernel and libc api differences that I simply
    can't fix as it would mean actually modifying the code which I could
    probably manage but don't have the time for such things lately. If it's easy
    it'll show up on tht page sometime today. The first tiny glitch I hit and I
    have to abandon it. Sorry.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  3. Re: Open Server 3.0 network printer problem Part III

    Brian K. White wrote:
    > ----- Original Message -----
    > From: "Rob"
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Thursday, July 27, 2006 11:15 AM
    > Subject: Open Server 3.0 network printer problem Part III
    >
    >
    >> I have figured out how to get the network printer set up using Brian
    >> White's universal script. Unfortunately for my configuration to work I need
    >> rlpr binary for SCO Unix Open Server 3.0. This requires a coff binary and I
    >> have no Development System to build one on.
    >>
    >> Is there any place I can get one pre-built?
    >>
    >> I find the source all over the place but that doesn't help me.
    >>
    >> --
    >> Rob Steinmetz

    >
    > If you need rlpr and can't use netcat, then really you don't need my script
    > since the rlpr option is just a sort of convenience.
    >
    > Or maybe I've forgotten the beginning of the thread.
    > Is it that you initially tried to use the stock lpr client and it didn't
    > work?
    >
    > What kind of print server are you dealing with? There are several that can
    > do raw tcp (netcat) although some are notoriously buggy and only work
    > reliably when using lpr/lpd or windows (netbios/smb/cifs)
    >
    > Note that just because a given print server doesn't work with netcat on tcp
    > ports 9100, 9101, 9102, It doesn't mean it doesn't work with netcat.
    > Some accept raw tcp on some other ports like 4010, 4020, 4030, some allow
    > you to specify the port you want and don't use any by default until you do
    > enable the option and set a port. Some do both 9100 and any other ports you
    > want. And some you just have to turn the option on first.
    >
    > If it were me at this point in your particular shoes
    > First I'd try the stock lpr/lpd system again.


    I tried and I'm still stuck.I may try again later. I was hoping for some
    clues that might jog my memory.

    > Then I'd just get a print server that I know works with netcat.


    I have a Laserjet with an internal Jetdirect that does lpd and netcat works.

    > My number one choice would be any HP JetDirect that does tcp (some only do
    > ipx/spx (netware) or token ring etc). Exact model depends on the type of
    > printer.


    I mostly have HP printers with JetDriects all are ethernet and I know
    all work with LPD and Jet Direct. I always made sure I got the ones that
    were Unix compatible.

    > My next choice would be any Intel. Other than that it's pot luck.
    > not all the cheap ones fail, a few like the netgear PS101 (and several
    > others that are the same unit with different name plates) are worse than
    > junk in that they work enough to make you think they work.
    > I wouldn't be surprised if the better print server turns out to also work
    > fine with the stock lpr/lpd. There are many reasons why the good print
    > servers are good. I've had good luck with the proprietary print servers
    > built into the big standalone office printers too like Savin & Ricoh (HP
    > goes without saying).
    >


    Interesting I am having lpd problems with A Savin right not. But that's
    another story.

    > I'll try to build a coff binary on the system where I built the elf binary
    > but do NOT hold your breath
    > I never bothered to try to figure out how to do that, and I don't know if
    > gcc even can do it, nor do I know how difficult it will be to hack up the
    > Makefile to do it. Aside from building a coff binary, I'm pretty sure it'll
    > also need to be a static binary which is another possibly difficult hack.
    > After that there might even be kernel and libc api differences that I simply
    > can't fix as it would mean actually modifying the code which I could
    > probably manage but don't have the time for such things lately. If it's easy
    > it'll show up on tht page sometime today. The first tiny glitch I hit and I
    > have to abandon it. Sorry.
    >
    > Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    > filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
    >

    Thanks for the long reply. To review;

    I have an Open Server 3.0 box I am trying to get to print so I can port
    the application to a more moder platform. I need to leave that system in
    production. I need to be able to print as some functions are only
    available in printed form. The site is remote from my office and uses
    private IP addresses behind a firewall and router.

    My printers are likewise behind a router and firewall and use private IP
    addresses. I have one server Linux which is available with a public IP
    address and which also runs cup, and the cups-lpd. It can pass requests
    to my internal printer which are mostly genuine HP printer with HP
    JetDirect internal servers.

    Originally the lpd service on the Open Server box seemed the simplest
    way to go but I couldn't get it to work, and I can't find or think of
    any reason its not working, except it never worked, or it somehow got
    broken over the years.

    I have since assigned a public address to one of my printers and it
    still isn't working. If fails to print with silent failures. I think
    you script may the problem. I just realized it ksh, which doesn't exist
    on Open Server 3.0. I have confirmed that netcat can send data to the
    printer from the command line but it isn't formated correctly.

    I'm pretty sure the set up is correct on my end, I can print from
    everywhere else, but print requests don't seem to b getting out f the
    print spooler on Open Server, of if they are (in the case of your
    script) they are getting lost, probably sent to /dev/null.

    I finally gave up and ran hpnpcfg and thats working printing directly to
    the printer. There was definitely something wrong with the lpd and other
    other setups. I'd still like to be able to print through the lpd
    spooler, since I don't like exposing anything more than I need to.

    As far as coff binaries. I doubt a binary made on anything except the
    SCO Development system will work. I appreciate the offer. I'd be happy
    to try it if you want to pursue it. I'm still interested in figuring out
    what is wrong with my original attempt, just because.

  4. Re: Open Server 3.0 network printer problem Part III


    ----- Original Message -----
    From: "Rob"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Thursday, July 27, 2006 4:51 PM
    Subject: Re: Open Server 3.0 network printer problem Part III


    > Brian K. White wrote:
    >> ----- Original Message -----
    >> From: "Rob"
    >> Newsgroups: comp.unix.sco.misc
    >> To:
    >> Sent: Thursday, July 27, 2006 11:15 AM
    >> Subject: Open Server 3.0 network printer problem Part III
    >>
    >>
    >>> I have figured out how to get the network printer set up using Brian
    >>> White's universal script. Unfortunately for my configuration to work I
    >>> need rlpr binary for SCO Unix Open Server 3.0. This requires a coff
    >>> binary and I have no Development System to build one on.
    >>>
    >>> Is there any place I can get one pre-built?
    >>>
    >>> I find the source all over the place but that doesn't help me.
    >>>
    >>> --
    >>> Rob Steinmetz

    >>
    >> If you need rlpr and can't use netcat, then really you don't need my
    >> script since the rlpr option is just a sort of convenience.
    >>
    >> Or maybe I've forgotten the beginning of the thread.
    >> Is it that you initially tried to use the stock lpr client and it didn't
    >> work?
    >>
    >> What kind of print server are you dealing with? There are several that
    >> can do raw tcp (netcat) although some are notoriously buggy and only work
    >> reliably when using lpr/lpd or windows (netbios/smb/cifs)
    >>
    >> Note that just because a given print server doesn't work with netcat on
    >> tcp ports 9100, 9101, 9102, It doesn't mean it doesn't work with netcat.
    >> Some accept raw tcp on some other ports like 4010, 4020, 4030, some allow
    >> you to specify the port you want and don't use any by default until you
    >> do enable the option and set a port. Some do both 9100 and any other
    >> ports you want. And some you just have to turn the option on first.
    >>
    >> If it were me at this point in your particular shoes
    >> First I'd try the stock lpr/lpd system again.

    >
    > I tried and I'm still stuck.I may try again later. I was hoping for some
    > clues that might jog my memory.
    >
    >> Then I'd just get a print server that I know works with netcat.

    >
    > I have a Laserjet with an internal Jetdirect that does lpd and netcat
    > works.


    Then why do you think you need rlpr?
    Lets say the printers IP is 192.168.0.10
    Grab that netcat.coff binary I mentioned earlier and save it as
    /usr/spool/lp/bin/netcat
    Telnet to 192.168.0.10 and use the menus to make sure jetdirect mode is
    enabled.
    Pay attention to the bottom of the screen promt that says how to exit and
    save vs exit and don't save, because it's backwards from what's intuitive in
    my opinion and your changes end up not surviving the next power cycle.
    Define a new printer in scoadmin
    as a new _local_ printer,
    Name: foo
    Device: /dev/null,
    Model: Net

    Now add this line to /etc/printers (and make sure there is only one line
    that begins "foo:..")
    hplaser:192.168.0.10:9100:netcat:HPLaserJet:commen ts go here...

    now test:
    echo this is a test | lp -d foo

    although really a simpler test first would be more scientific:
    ln -s /usr/spool/lp/bin/netcat /usr/bin/netcat
    echo "this is a test \f\c" |netcat -h 192.168.0.10 -p 9100

    repeat that manual netcat test by trying to send to other printers on the
    net that you know have jetdirect enabled, or sending an http get command to
    the linux box on port 80 etc... anything to prove that the netcat binary
    works at all.
    You remembered to chmod 755 the new netcat binary after you overwrote the
    old one right?



    >> My number one choice would be any HP JetDirect that does tcp (some only
    >> do ipx/spx (netware) or token ring etc). Exact model depends on the type
    >> of printer.

    >
    > I mostly have HP printers with JetDriects all are ethernet and I know all
    > work with LPD and Jet Direct. I always made sure I got the ones that were
    > Unix compatible.
    >
    >> My next choice would be any Intel. Other than that it's pot luck. not all
    >> the cheap ones fail, a few like the netgear PS101 (and several others
    >> that are the same unit with different name plates) are worse than junk in
    >> that they work enough to make you think they work.
    >> I wouldn't be surprised if the better print server turns out to also work
    >> fine with the stock lpr/lpd. There are many reasons why the good print
    >> servers are good. I've had good luck with the proprietary print servers
    >> built into the big standalone office printers too like Savin & Ricoh (HP
    >> goes without saying).
    >>

    >
    > Interesting I am having lpd problems with A Savin right not. But that's
    > another story.
    >
    >> I'll try to build a coff binary on the system where I built the elf
    >> binary but do NOT hold your breath
    >> I never bothered to try to figure out how to do that, and I don't know if
    >> gcc even can do it, nor do I know how difficult it will be to hack up the
    >> Makefile to do it. Aside from building a coff binary, I'm pretty sure
    >> it'll also need to be a static binary which is another possibly difficult
    >> hack.
    >> After that there might even be kernel and libc api differences that I
    >> simply can't fix as it would mean actually modifying the code which I
    >> could probably manage but don't have the time for such things lately. If
    >> it's easy it'll show up on tht page sometime today. The first tiny glitch
    >> I hit and I have to abandon it. Sorry.
    >>
    >> Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    >> +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    >> filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
    >>

    > Thanks for the long reply. To review;
    >
    > I have an Open Server 3.0 box I am trying to get to print so I can port
    > the application to a more moder platform. I need to leave that system in
    > production. I need to be able to print as some functions are only
    > available in printed form. The site is remote from my office and uses
    > private IP addresses behind a firewall and router.
    >
    > My printers are likewise behind a router and firewall and use private IP
    > addresses. I have one server Linux which is available with a public IP
    > address and which also runs cup, and the cups-lpd. It can pass requests to
    > my internal printer which are mostly genuine HP printer with HP JetDirect
    > internal servers.
    >
    > Originally the lpd service on the Open Server box seemed the simplest way
    > to go but I couldn't get it to work, and I can't find or think of any
    > reason its not working, except it never worked, or it somehow got broken
    > over the years.
    >
    > I have since assigned a public address to one of my printers and it still
    > isn't working. If fails to print with silent failures. I think you script
    > may the problem. I just realized it ksh, which doesn't exist on Open
    > Server 3.0. I have confirmed that netcat can send data to the printer from
    > the command line but it isn't formated correctly.
    >
    > I'm pretty sure the set up is correct on my end, I can print from
    > everywhere else, but print requests don't seem to b getting out f the
    > print spooler on Open Server, of if they are (in the case of your script)
    > they are getting lost, probably sent to /dev/null.
    >
    > I finally gave up and ran hpnpcfg and thats working printing directly to
    > the printer. There was definitely something wrong with the lpd and other
    > other setups. I'd still like to be able to print through the lpd spooler,
    > since I don't like exposing anything more than I need to.
    >
    > As far as coff binaries. I doubt a binary made on anything except the SCO
    > Development system will work. I appreciate the offer. I'd be happy to try
    > it if you want to pursue it. I'm still interested in figuring out what is
    > wrong with my original attempt, just because.
    >



  5. Re: Open Server 3.0 network printer problem Part III


    > Now add this line to /etc/printers (and make sure there is only one line
    > that begins "foo:..")
    > hplaser:192.168.0.10:9100:netcat:HPLaserJet:commen ts go here...


    crap. I meant
    foo:192.168.0.10:9100:netcat:HPLaserJet:comments go here...

    I cut & pasted that line right out of my own /etc/printers and didn't edit
    it enough


    > now test:
    > echo this is a test | lp -d foo
    >
    > although really a simpler test first would be more scientific:
    > ln -s /usr/spool/lp/bin/netcat /usr/bin/netcat
    > echo "this is a test \f\c" |netcat -h 192.168.0.10 -p 9100
    >
    > repeat that manual netcat test by trying to send to other printers on the


    Don't repeat the ln -s command of course
    That was just to get netcat into your PATH to make the repetetive testing
    convenient

    > net that you know have jetdirect enabled, or sending an http get command
    > to
    > the linux box on port 80 etc... anything to prove that the netcat binary
    > works at all.


    The http test would look like this, assuming the linux box was 192.168.0.2
    echo "GET NetCatTest HTTP/1.0\n\n" |netcat -h 192.168.0.2 -p 80

    That won't print anything back, but the evidence is on the linux box.

    go on the linux box and find the apache error_log file
    and tail it, or grep "NetCatTest" /var/log/apach2/error_log

    You can try adding (prepending) -d to the netcat options, that might show
    something useful.
    echo "GET NetCatTest HTTP/1.0\n\n" |netcat -d -h 192.168.0.2 -p 80

    > You remembered to chmod 755 the new netcat binary after you overwrote the
    > old one right?


    Sounds like your netcat binary just isnt working, or isn't getting called
    through some mishap like seleting "new remote printer" in scoadmin instead
    of local or incorrect permissions on the netcat binary.
    The manual tests to test netcat by itself, outside of the lp system, will
    show that.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  6. Re: Open Server 3.0 network printer problem Part III

    Brian K. White wrote:
    > ----- Original Message -----
    > From: "Rob"
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Thursday, July 27, 2006 4:51 PM
    > Subject: Re: Open Server 3.0 network printer problem Part III
    >
    >
    >> Brian K. White wrote:
    >>> ----- Original Message -----
    >>> From: "Rob"
    >>> Newsgroups: comp.unix.sco.misc
    >>> To:
    >>> Sent: Thursday, July 27, 2006 11:15 AM
    >>> Subject: Open Server 3.0 network printer problem Part III
    >>>
    >>>
    >>>> I have figured out how to get the network printer set up using Brian
    >>>> White's universal script. Unfortunately for my configuration to work I
    >>>> need rlpr binary for SCO Unix Open Server 3.0. This requires a coff
    >>>> binary and I have no Development System to build one on.
    >>>>
    >>>> Is there any place I can get one pre-built?
    >>>>
    >>>> I find the source all over the place but that doesn't help me.
    >>>>
    >>>> --
    >>>> Rob Steinmetz
    >>> If you need rlpr and can't use netcat, then really you don't need my
    >>> script since the rlpr option is just a sort of convenience.
    >>>
    >>> Or maybe I've forgotten the beginning of the thread.
    >>> Is it that you initially tried to use the stock lpr client and it didn't
    >>> work?
    >>>
    >>> What kind of print server are you dealing with? There are several that
    >>> can do raw tcp (netcat) although some are notoriously buggy and only work
    >>> reliably when using lpr/lpd or windows (netbios/smb/cifs)
    >>>
    >>> Note that just because a given print server doesn't work with netcat on
    >>> tcp ports 9100, 9101, 9102, It doesn't mean it doesn't work with netcat.
    >>> Some accept raw tcp on some other ports like 4010, 4020, 4030, some allow
    >>> you to specify the port you want and don't use any by default until you
    >>> do enable the option and set a port. Some do both 9100 and any other
    >>> ports you want. And some you just have to turn the option on first.
    >>>
    >>> If it were me at this point in your particular shoes
    >>> First I'd try the stock lpr/lpd system again.

    >> I tried and I'm still stuck.I may try again later. I was hoping for some
    >> clues that might jog my memory.
    >>
    >>> Then I'd just get a print server that I know works with netcat.

    >> I have a Laserjet with an internal Jetdirect that does lpd and netcat
    >> works.

    >
    > Then why do you think you need rlpr?


    I would prefer to send all remote print requests through a single
    spooler rather than burn a lot of my public IP's by assigning them to
    individual printers. JetDirect requires that every printer have
    separate IP address (except in the case of the Jetdirect EX 3 port
    models), This is not a problem with Private IP addresses but is a
    problem if you have a limited number of Public IP addresses. Using lpd I
    simply configured my Web Server as as Print Server as well and use only
    one Public IP for all of my printers. Internally we use lpd and
    JetDirect to access the printers directly.

    > Lets say the printers IP is 192.168.0.10
    > Grab that netcat.coff binary I mentioned earlier and save it as
    > /usr/spool/lp/bin/netcat


    I did that although I did it a little differently. I created netcat.coff
    and netcat.elf and linked netcat to netcat.coff.

    > Telnet to 192.168.0.10 and use the menus to make sure jetdirect mode is
    > enabled.


    I did that, although the actual IP address is different. BTW the printer
    has always worked locally from every computer. It is only the Open
    Server 3.0 box which doesn't work.

    > Pay attention to the bottom of the screen prompt that says how to exit and
    > save vs exit and don't save, because it's backwards from what's intuitive in
    > my opinion and your changes end up not surviving the next power cycle.


    I checked the setting on the printer and it seems correct. It works from
    every other local machine.

    ==JetDirect Telnet Configuration===
    Firmware Rev. : G.08.04
    MAC Address : 00:30:c1:55:fb:32
    Config By : USER SPECIFIED

    IP Address : 192.168.1.251
    Subnet Mask : 255.255.255.0
    Default Gateway : 192.168.1.254
    Syslog Server : Not Specified
    Idle Timeout : 90 Seconds
    Set Cmnty Name : Not Specified
    Host Name : NPI55FB32

    DHCP Config : Disabled
    Passwd : Disabled
    IPX/SPX : Enabled
    DLC/LLC : Enabled
    Ethertalk : Enabled
    Banner page : Enabled

    > Define a new printer in scoadmin


    We're talking about Open Server 3.0 it doesn't have scoadmin. It has
    sysadmsh.

    > as a new _local_ printer,
    > Name: foo
    > Device: /dev/null,
    > Model: Net


    I was able to create a printer. I called it lj2100, since it is a
    LaserJet 2100

    > Now add this line to /etc/printers (and make sure there is only one line
    > that begins "foo:..")
    > hplaser:192.168.0.10:9100:netcat:HPLaserJet:commen ts go here...


    I have that although the printer name and IP address are different

    lj2100:aa.bbb.cc.dd:9100:netcat:HPLaserJet:Laserje t 2100

    > now test:
    > echo this is a test | lp -d foo


    # echo "this is a test" |lp -d lj2100
    request id is lj2100-8216 (standard input)

    Nothing prints. I suspect your script is failing because it is ksh and
    not sh, which is all that exists on Open Server 3.0. Any Error Messages
    seem to be going to /dev/null

    > although really a simpler test first would be more scientific:
    > ln -s /usr/spool/lp/bin/netcat /usr/bin/netcat


    The coff netcat binary is /usr/spool/lp/bin, according to the $PATH in
    your script no link should be necessary, but I created it anyway. No help.

    > echo "this is a test \f\c" |netcat -h 192.168.0.10 -p 9100


    # echo "this is a test \f\c" | /usr/spool/lp/bin/netcat -h aa.bbb.cc.dd
    -p 9100

    That works and prints a nice test page.

    All of that seems to confirm that the printer works. The problem appears
    to be in the lp spooler system somewhere.

    If I disable the printer I get a print request in the queue

    # disable lj2100
    printer "lj2100" now disabled
    # lp -d lj2100 /etc/hosts
    request id is lj2100-8219 (1 file)
    # lpstat -t
    scheduler is running
    system default destination: txtprint
    device for txtprint: /dev/null
    txtprint accepting requests since Thu Oct 15 10:59:35 1970
    dot_matrix accepting requests since Thu Oct 15 11:19:38 1970
    lj2100 accepting requests since Wed Jul 26 22:34:04 2006
    printer txtprint is idle. enabled since Thu Oct 15 10:59:35 1970. available.
    printer dot_matrix is idle. enabled since Thu Oct 15 11:19:38 1970.
    available.
    printer lj2100 disabled since Fri Jul 28 00:53:25 2006. available.
    unknown reason
    lj2100-8219 root 1685 Jul 28 00:53
    # enable lj2100
    printer "lj2100" now enabled
    # lpstat -t
    scheduler is running
    system default destination: txtprint
    device for txtprint: /dev/null
    txtprint accepting requests since Thu Oct 15 10:59:35 1970
    dot_matrix accepting requests since Thu Oct 15 11:19:38 1970
    lj2100 accepting requests since Wed Jul 26 22:34:04 2006
    printer txtprint is idle. enabled since Thu Oct 15 10:59:35 1970. available.
    printer dot_matrix is idle. enabled since Thu Oct 15 11:19:38 1970.
    available.
    printer lj2100 is idle. enabled since Fri Jul 28 00:55:20 2006. available.

    > repeat that manual netcat test by trying to send to other printers on the
    > net that you know have jetdirect enabled, or sending an http get command to
    > the linux box on port 80 etc... anything to prove that the netcat binary
    > works at all.


    I have always been able to print from local computers using a
    combination of JetDirect and lpd. The local printers txtprint and
    dot_matrix are both on JetDirect servers and are using hpnp. One is a
    LserJet 2100 identical to mine. They both work.

    > You remembered to chmod 755 the new netcat binary after you overwrote the
    > old one right?


    Actually I downloaded netcat.coff and and changed your netcat to
    netcat.elf and linked to netcat.coff as netcat, but it actually worked
    in the test above. I had permissions set to 550, when I did the tests
    above but changing them to 755 didn't help.

    # cd /usr/spool/lp/bin
    # ls -l netcat*
    -r-xr-x--- 2 bin lp 180828 Jul 25 01:18 netcat
    -r-xr-x--- 2 bin lp 180828 Jul 25 01:18 netcat.coff
    -r-xr-x--- 1 bin lp 13948 Jan 08 2002 netcat.elf
    # chmod 755 netcat*
    # lp -d lj2100no /etc/printers
    request id is lj2100no-8217 (1 file)
    # ls -l net*
    -rwxr-xr-x 2 bin lp 180828 Jul 25 01:18 netcat
    -rwxr-xr-x 2 bin lp 180828 Jul 25 01:18 netcat.coff
    -rwxr-xr-x 1 bin lp 13948 Jan 08 2002 netcat.elf

    Same results, no printing.

    From you second email

    > The http test would look like this, assuming the linux box was 192.168.0.2
    > echo "GET NetCatTest HTTP/1.0\n\n" |netcat -h 192.168.0.2 -p 80
    >
    > That won't print anything back, but the evidence is on the linux box.
    >
    > go on the linux box and find the apache error_log file
    > and tail it, or grep "NetCatTest" /var/log/apach2/error_log
    >
    > You can try adding (prepending) -d to the netcat options, that might show
    > something useful.
    > echo "GET NetCatTest HTTP/1.0\n\n" |netcat -d -h 192.168.0.2 -p 80


    I get entries in both error.log and access.log.

    /var/log/apache2# grep Net *
    access.log:aa.bbb.ccc.ddd - - [28/Jul/2006:13:20:36 -0500] "GET NetCat
    Test HTTP/1.0" 400 331 "-" "-"
    error.log:[Fri Jul 28 13:20:36 2006] [error] [client aa.bbb.ccc.ddd]
    Invalid URI in request GET NetCat Test HTTP/1.0
    --
    Rob

  7. Re: Open Server 3.0 network printer problem Part III


    ----- Original Message -----
    From: "Rob"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Friday, July 28, 2006 2:53 PM
    Subject: Re: Open Server 3.0 network printer problem Part III


    > Brian K. White wrote:
    >> ----- Original Message -----
    >> From: "Rob"
    >> Newsgroups: comp.unix.sco.misc
    >> To:
    >> Sent: Thursday, July 27, 2006 4:51 PM
    >> Subject: Re: Open Server 3.0 network printer problem Part III
    >>
    >>
    >>> Brian K. White wrote:
    >>>> ----- Original Message -----
    >>>> From: "Rob"
    >>>> Newsgroups: comp.unix.sco.misc
    >>>> To:
    >>>> Sent: Thursday, July 27, 2006 11:15 AM
    >>>> Subject: Open Server 3.0 network printer problem Part III
    >>>>
    >>>>
    >>>>> I have figured out how to get the network printer set up using Brian
    >>>>> White's universal script. Unfortunately for my configuration to work I
    >>>>> need rlpr binary for SCO Unix Open Server 3.0. This requires a coff
    >>>>> binary and I have no Development System to build one on.
    >>>>>
    >>>>> Is there any place I can get one pre-built?
    >>>>>
    >>>>> I find the source all over the place but that doesn't help me.
    >>>>>
    >>>>> --
    >>>>> Rob Steinmetz
    >>>> If you need rlpr and can't use netcat, then really you don't need my
    >>>> script since the rlpr option is just a sort of convenience.
    >>>>
    >>>> Or maybe I've forgotten the beginning of the thread.
    >>>> Is it that you initially tried to use the stock lpr client and it
    >>>> didn't work?
    >>>>
    >>>> What kind of print server are you dealing with? There are several that
    >>>> can do raw tcp (netcat) although some are notoriously buggy and only
    >>>> work reliably when using lpr/lpd or windows (netbios/smb/cifs)
    >>>>
    >>>> Note that just because a given print server doesn't work with netcat on
    >>>> tcp ports 9100, 9101, 9102, It doesn't mean it doesn't work with
    >>>> netcat.
    >>>> Some accept raw tcp on some other ports like 4010, 4020, 4030, some
    >>>> allow you to specify the port you want and don't use any by default
    >>>> until you do enable the option and set a port. Some do both 9100 and
    >>>> any other ports you want. And some you just have to turn the option on
    >>>> first.
    >>>>
    >>>> If it were me at this point in your particular shoes
    >>>> First I'd try the stock lpr/lpd system again.
    >>> I tried and I'm still stuck.I may try again later. I was hoping for some
    >>> clues that might jog my memory.
    >>>
    >>>> Then I'd just get a print server that I know works with netcat.
    >>> I have a Laserjet with an internal Jetdirect that does lpd and netcat
    >>> works.

    >>
    >> Then why do you think you need rlpr?

    >
    > I would prefer to send all remote print requests through a single spooler
    > rather than burn a lot of my public IP's by assigning them to individual
    > printers. JetDirect requires that every printer have separate IP address
    > (except in the case of the Jetdirect EX 3 port models), This is not a
    > problem with Private IP addresses but is a problem if you have a limited
    > number of Public IP addresses. Using lpd I simply configured my Web Server
    > as as Print Server as well and use only one Public IP for all of my
    > printers. Internally we use lpd and JetDirect to access the printers
    > directly.
    >
    >> Lets say the printers IP is 192.168.0.10
    >> Grab that netcat.coff binary I mentioned earlier and save it as
    >> /usr/spool/lp/bin/netcat

    >
    > I did that although I did it a little differently. I created netcat.coff
    > and netcat.elf and linked netcat to netcat.coff.
    >
    >> Telnet to 192.168.0.10 and use the menus to make sure jetdirect mode is
    >> enabled.

    >
    > I did that, although the actual IP address is different. BTW the printer
    > has always worked locally from every computer. It is only the Open Server
    > 3.0 box which doesn't work.
    >
    >> Pay attention to the bottom of the screen prompt that says how to exit
    >> and save vs exit and don't save, because it's backwards from what's
    >> intuitive in my opinion and your changes end up not surviving the next
    >> power cycle.

    >
    > I checked the setting on the printer and it seems correct. It works from
    > every other local machine.
    >
    > ==JetDirect Telnet Configuration===
    > Firmware Rev. : G.08.04
    > MAC Address : 00:30:c1:55:fb:32
    > Config By : USER SPECIFIED
    >
    > IP Address : 192.168.1.251
    > Subnet Mask : 255.255.255.0
    > Default Gateway : 192.168.1.254
    > Syslog Server : Not Specified
    > Idle Timeout : 90 Seconds
    > Set Cmnty Name : Not Specified
    > Host Name : NPI55FB32
    >
    > DHCP Config : Disabled
    > Passwd : Disabled
    > IPX/SPX : Enabled
    > DLC/LLC : Enabled
    > Ethertalk : Enabled
    > Banner page : Enabled
    >
    >> Define a new printer in scoadmin

    >
    > We're talking about Open Server 3.0 it doesn't have scoadmin. It has
    > sysadmsh.
    >
    >> as a new _local_ printer,
    >> Name: foo
    >> Device: /dev/null,
    >> Model: Net

    >
    > I was able to create a printer. I called it lj2100, since it is a LaserJet
    > 2100
    >
    >> Now add this line to /etc/printers (and make sure there is only one line
    >> that begins "foo:..")
    >> hplaser:192.168.0.10:9100:netcat:HPLaserJet:commen ts go here...

    >
    > I have that although the printer name and IP address are different
    >
    > lj2100:aa.bbb.cc.dd:9100:netcat:HPLaserJet:Laserje t 2100
    >
    >> now test:
    >> echo this is a test | lp -d foo

    >
    > # echo "this is a test" |lp -d lj2100
    > request id is lj2100-8216 (standard input)
    >
    > Nothing prints. I suspect your script is failing because it is ksh and not
    > sh, which is all that exists on Open Server 3.0. Any Error Messages seem
    > to be going to /dev/null
    >
    >> although really a simpler test first would be more scientific:
    >> ln -s /usr/spool/lp/bin/netcat /usr/bin/netcat

    >
    > The coff netcat binary is /usr/spool/lp/bin, according to the $PATH in
    > your script no link should be necessary, but I created it anyway. No
    > help.
    >
    >> echo "this is a test \f\c" |netcat -h 192.168.0.10 -p 9100

    >
    > # echo "this is a test \f\c" | /usr/spool/lp/bin/netcat -h aa.bbb.cc.dd -p
    > 9100
    >
    > That works and prints a nice test page.


    aha! No ksh?? really??
    I Have never used OpenServer or OpenDesktop 3.0 but I sort of "cut-my-teeth"
    on Xenix, and IT had ksh!
    I think xenix wasn't even coff but a.out
    So I just assumed that everything later and or bigger had it.
    Amazing.

    Can you do a "find / -name ksh -print" and verify it's not in some dir
    that's not in your PATH?
    I still can't imagine sco ever shipped a system without ksh unless maybe if
    it was before 1988
    Perhaps it was somehow de-selected during install and might be reinstallable
    from the original media?
    (yeah right, I know, never mind )
    Actually, I might be able to pull a xenix ksh binary out of a hole
    somewhere.
    ftp.armory.com nor ftp.celestial.com has one. (armory has an elf one)

    Here's two /bin/sh versions of the Net script.
    One and uses awk and is not too horribly ineficient.
    But who knows if your awk or your sh will work the same as mine since almost
    all bets are out the door now.
    (If you can have a sco box with no ksh, then anything can happen
    The second uses grep and cut.
    Try the awk one first, then the grep one only if the awk one doesn't work.

    http://www.aljex.com/bkw/Net-SH.tar.Z

    Just zcat file.Z |tar xvf -
    it will place two new files in the model directory.
    cp/mv/ln whatever Net.sh.awk so it becomes Net

    Then just try to print. None of the setup you already did changes.

    Hopefully one of these works.

    If one does, then I'll take it and the coff netcat binary and make an
    alternate version of the whole package for older systems.

    Whats annoying is, the one for old systems would work on new systems too so
    I really don't need two.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  8. Re: Open Server 3.0 network printer problem Part III

    Brian K. White wrote:

    > From: "Rob"


    > > Nothing prints. I suspect your script is failing because it is ksh and not
    > > sh, which is all that exists on Open Server 3.0. Any Error Messages seem
    > > to be going to /dev/null


    > aha! No ksh?? really??
    > I Have never used OpenServer or OpenDesktop 3.0 but I sort of "cut-my-teeth"
    > on Xenix, and IT had ksh!
    > I think xenix wasn't even coff but a.out
    > So I just assumed that everything later and or bigger had it.
    > Amazing.


    Open Server 3.0 definitely did have ksh. I'm pretty sure ksh existed
    all the way back to SCO Unix 3.2.0. Regarding Xenix, it _didn't_ have
    ksh until the very last release, 2.3.4 (released in 1990). A compiled
    version existed prior to 2.3.4 and may have been available for download
    on the SCO BBS (or it may only have been floating around internally).

    >Bela<


  9. Re: Open Server 3.0 network printer problem Part III

    Brian K. White wrote:

    >
    > aha! No ksh?? really??
    > I Have never used OpenServer or OpenDesktop 3.0 but I sort of "cut-my-teeth"
    > on Xenix, and IT had ksh!
    > I think xenix wasn't even coff but a.out
    > So I just assumed that everything later and or bigger had it.
    > Amazing.

    Sorry I made a mistake. I went back and checked there is a ksh.

    I do know the interface was where the print process was failing. Perhaps
    there is an incompatibility with the current version of ksh and the
    older ones, or perhaps I made some other mistake.

    > Can you do a "find / -name ksh -print" and verify it's not in some dir
    > that's not in your PATH?
    > I still can't imagine sco ever shipped a system without ksh unless maybe if
    > it was before 1988
    > Perhaps it was somehow de-selected during install and might be reinstallable
    > from the original media?
    > (yeah right, I know, never mind )
    > Actually, I might be able to pull a xenix ksh binary out of a hole
    > somewhere.
    > ftp.armory.com nor ftp.celestial.com has one. (armory has an elf one)
    >
    > Here's two /bin/sh versions of the Net script.
    > One and uses awk and is not too horribly ineficient.
    > But who knows if your awk or your sh will work the same as mine since almost
    > all bets are out the door now.
    > (If you can have a sco box with no ksh, then anything can happen
    > The second uses grep and cut.
    > Try the awk one first, then the grep one only if the awk one doesn't work.
    >
    > http://www.aljex.com/bkw/Net-SH.tar.Z
    >
    > Just zcat file.Z |tar xvf -
    > it will place two new files in the model directory.
    > cp/mv/ln whatever Net.sh.awk so it becomes Net
    >
    > Then just try to print. None of the setup you already did changes.
    >
    > Hopefully one of these works.


    Thanks I won't be able to try before Monday, when I can verify that the
    printers actually work.

    > If one does, then I'll take it and the coff netcat binary and make an
    > alternate version of the whole package for older systems.


    If I can figure out what is failing all you might need to do is put both
    binaries in the file. and simply rename the one
    >
    > Whats annoying is, the one for old systems would work on new systems too so
    > I really don't need two.
    >
    >


  10. Re: Open Server 3.0 network printer problem Part III


    ----- Original Message -----
    From: "Rob Steinmetz"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Friday, July 28, 2006 8:44 PM
    Subject: Re: Open Server 3.0 network printer problem Part III


    > Brian K. White wrote:
    >
    >>
    >> aha! No ksh?? really??


    > Sorry I made a mistake. I went back and checked there is a ksh.
    >
    > I do know the interface was where the print process was failing. Perhaps
    > there is an incompatibility with the current version of ksh and the older
    > ones, or perhaps I made some other mistake.


    Well thanks for restoring my sense of sanity about the ksh
    The interface being incompatible for other reasons is entirely possible.

    But, my script should work anyways since I don't even parse the command
    line. I just save it and hand it unaltered to the script.
    So if OpenServer 3's printer interface scripts take different command line
    args than OpenServer 5's it shouldn't matter.
    I'm pretty curious myself now. It sounds like you have all the parts and
    they all work yet the whole still doesn't

    I don't think you need to try the other versions. They just do exactly the
    same things.

    Try this, put this line near the top of the script, in the printer named
    copy in the interfaces directory, not in the copy named Net in the models
    directory.

    exec 1>/tmp/printer.out
    exec 2>/tmp/printer.err

    Then print something
    Then look at /tmp/printer.err and /tmp/printer.out

    What would have gone to the printer should be in printer.out
    Any error messages should be in printer.err
    While those lines are in there nothing will be sent to netcat so nothing
    will actually print.

    I guess this is all moot anyways since from your description you do actually
    need some form of lpr client, be it rlpr or the stock one.
    That or a client for some other protocol cups supports that allows you to
    print to many different queue names via the same address, protocol, & tcp
    port.
    (like ipp or smb, though you don't want to do smb over the internet)
    You _could_ set up port-forwarding in your router or the linux box so that
    various tcp ports get redirected to port 9100 on various internal ip's
    Kind of a maintenance inconveience, but no less than defining the same
    printers in cups on the linux box I guess.

    Maybe we should go back to debugging why the stock sco lpr isn't working?
    That really should work fine.

    btw I looked at building a coff rlpr and it needs the native compiler which
    I don't have.
    actually I do have a license for it but don't have any boxes where I want to
    install it.

    then again...
    Any box that even can run open server 3 must be so old you better be
    upgrading to new hardware yesterday anyways, and today that will mean
    upgrading to osr 5.0.6 at least anyways just for the hardware support.
    You said you are looking to bring a legacy app into more modern times, well,
    do it. Update that ancient OS and stop having problems like this.
    Sure you'll have others but you'll also have more people who know answers
    and more of the proposed solutions will be possible and/or will work.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


  11. Re: Open Server 3.0 network printer problem Part III

    Brian K. White wrote:
    >
    >> Sorry I made a mistake. I went back and checked there is a ksh.
    >>
    >> I do know the interface was where the print process was failing. Perhaps
    >> there is an incompatibility with the current version of ksh and the older
    >> ones, or perhaps I made some other mistake.

    >
    > Well thanks for restoring my sense of sanity about the ksh
    > The interface being incompatible for other reasons is entirely possible.
    >
    > But, my script should work anyways since I don't even parse the command
    > line. I just save it and hand it unaltered to the script.
    > So if OpenServer 3's printer interface scripts take different command line
    > args than OpenServer 5's it shouldn't matter.
    > I'm pretty curious myself now. It sounds like you have all the parts and
    > they all work yet the whole still doesn't


    I usually can't let this kind of think go once I get started. I'm going
    to keep working on it, although I do now have simple netcat printer
    working, I think, but it doesn't allow all control of the printer I need.

    > I don't think you need to try the other versions. They just do exactly the
    > same things.
    >
    > Try this, put this line near the top of the script, in the printer named
    > copy in the interfaces directory, not in the copy named Net in the models
    > directory.
    >
    > exec 1>/tmp/printer.out
    > exec 2>/tmp/printer.err
    >
    > Then print something
    > Then look at /tmp/printer.err and /tmp/printer.out
    >
    > What would have gone to the printer should be in printer.out
    > Any error messages should be in printer.err
    > While those lines are in there nothing will be sent to netcat so nothing
    > will actually print.


    Thanks I'll try that.

    > I guess this is all moot anyways since from your description you do actually
    > need some form of lpr client, be it rlpr or the stock one.
    > That or a client for some other protocol cups supports that allows you to
    > print to many different queue names via the same address, protocol, & tcp
    > port.


    I'm looking into that.

    > (like ipp or smb, though you don't want to do smb over the internet)


    Yes and it also has to be a protocol supported by Open Server 3.0.

    > You _could_ set up port-forwarding in your router or the linux box so that
    > various tcp ports get redirected to port 9100 on various internal ip's
    > Kind of a maintenance inconveience, but no less than defining the same
    > printers in cups on the linux box I guess.


    Yes I could try that. Each printer assigned a different port and then
    redirected to port 9100 on the printer spooler. The problem with that
    particular approach is the router address is dynamic.

    > Maybe we should go back to debugging why the stock sco lpr isn't working?
    > That really should work fine.


    I wonder if the problem is very simple. It seems to be bad permission on
    some of the parts. I checked the ones I can find documentation on, but
    the docs don't cover everything. fixmog only has some of the files in it.

    > btw I looked at building a coff rlpr and it needs the native compiler which
    > I don't have.
    > actually I do have a license for it but don't have any boxes where I want to
    > install it.


    I thought that might be the case. I have a OS 5.0.4 license somewhere
    but I don't know if I could find the media, much less the key.

    > then again...
    > Any box that even can run open server 3 must be so old you better be
    > upgrading to new hardware yesterday anyways, and today that will mean
    > upgrading to osr 5.0.6 at least anyways just for the hardware support.
    > You said you are looking to bring a legacy app into more modern times, well,
    > do it. Update that ancient OS and stop having problems like this.
    > Sure you'll have others but you'll also have more people who know answers
    > and more of the proposed solutions will be possible and/or will work.


    The purpose of this exercise is port the applications and upgrade to a
    more modern platform and upgrade the applications. I just need it to run
    for while until the replacement is done. Part of the replacement is
    understanding the existing app.

    Thanks you for all of your help.

    --
    Rob

+ Reply to Thread