Problems with an HP Deskjet 310 [SOLVED]

Problems and successes with specific brands/models of printers
Message
Author
User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

Problems with an HP Deskjet 310 [SOLVED]

#1 Post by James186282 »

Hi everyone. I'm kind of a new full time user of Linux and never have set up a machine so easily as I have with the Puppy Distro.

I'm so pleased with how fast it is, how easy it was to set up but I'm stuck on the printer biz.

I've got this great little portable printer a Deskjet 310. I know its rather ancient history to most of you but it runs on batteries and fits in my laptop bag. I've been using it for? Many years and can't find anything like it.

I had an awful time getting CUPs to not just hang when I clicked setting up new printers.

Anyway, from a previous message I downloaded the Pup files to set up CUPS over again (My distro btw is 4.30) and it (AT LEAST) lets me set up a printer. I've got an old parrallel cable tried that nothing...
I've got a USB to parrallel cable and that seemed to at least work well enough to blink the busy light but nothing on the test page print. No errors nothing.

After I restarted my machine it doesn't even do that... SIGH...

Is there some diagnostic I ought to try?

Is there a specific driver that mentions the Deskjet 310? I've been trying similar models like the 350 and 400.

Any "idiot / moron" guide to starting this over from scratch that I should try? Any help SO greatly appreciated!

- James
Last edited by James186282 on Sat 03 Oct 2009, 19:18, edited 1 time in total.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#2 Post by DaveS »

Take a look here http://www.murga-linux.com/puppy/viewtopic.php?t=46610
This will probably be what you need, though I have no experience with that particular printer.
Spup Frugal HD and USB
Root forever!

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#3 Post by rjbrewer »


Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#4 Post by Patriot »

Hmmm .....

HP DJ310 ... nice ... they don't make printers like these anymore ....

For the DJ310, if I may :

1. Check your parallel cable. Just make sure its still good.
2. Connect your printer to your machine and turn it on. To have
proper detection, this should be done before booting up puppy.

3. DJ310 uses pcl3 ... get the ppd from here.
4. Put the .ppd into /usr/share/cups/model/

5. Get the patched foomatic script here, if you're using puppy430.
If you want to know more about foomatic issue, read about it here.
The patched script is required when printing with foo-rip produces nothing.
The patched foo-rip does not apply to any of puppy4.2 series.

6. Open your browser and add your printer at http://localhost:631/
7. DJ310 uses the parallel interface, so the uri should be parallel:/dev/lp0.
If you've upgraded to CUPS-1.3.x, the parallel printer will be auto-detected.
8. You should use HP DJ310 Foomatic/pcl3 as your driver.
9. Print a test page after setting your printer.
10. If it still doesn't print, post the error logs for further assistance.


Rgds

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#5 Post by James186282 »

Sorry to be such a putz. I can't tell you how much I appreciate all your efforts.
I pulled out the printer cable from a working machine and swapped it. Restarted the machine and selected the HP Deskjet 310. *This is the first time its been shown as an option however! It does not seem to autodetect it however.
Selected the printer port and tried print a test page. Nothing seems to happen. When I click "JOBS" I get "job aborted. Not by my action so? As to which CUPs version. I clicked on software and was told about downloading the source to a new version. In the tab I see it says CUPS Ver 1.1.13? I did a distro with open office and truecrypt that was ver 4.20 of Puppy then upgraded but? Perhapes thats what I'll try next. If I can find the CUP .pup?

I know this is a very ancient printer that I can print ASCII text to. Is it easy enough to make up a text file and pipe it to see if its even "on" and working that way? As to logs. I'm so out of the loop I've no clue where to search for those but would be very pleased to know!

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#6 Post by James186282 »

Tried the cable in question on another machine and it worked ok. I tried doing the following.
cat biteme.txt > LPT1

Nothing! No bust lite blinking nothing. I think at the low level I'm in trouble? Perhapes the bios has the port "dead"? Or?! Is there a simple linux way to see what ports if any are active?

Or? Is it even LPT1? In linux is it ? PAR0? or ?

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#7 Post by James186282 »

I wish I was updating you with better news. I took the cable tried it on another computer it worked ok. Tooks its cable stretched it over to the Deskjet310 and tried printing and got a good test page. Looked at my Bios setting and the LPT was set to EPP I tried changing it to "Standard" and still nothing with I try to print TEST PAGE or if I cat a text file to lpt1.

Really really making me crazy! Everything else in Puppy was so "automatic" and easy to set up.

SIGH....

Anyhow, I do appreciate the moral support.

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#8 Post by Patriot »

Hmmm .....
James186282 wrote:........ Tooks its cable stretched it over to the Deskjet310 and tried printing and got a good test page.........
That confirms the printer and cable is in good shape ... now, we'll just have to tinker a bit with puppy ...

Have your printer turned on first, then boot up puppy, open a terminal and do this to see if it detects your printer :

# /usr/lib/cups/backend/parallel

If nothing came out, then maybe we have a port related issue. If the model is printed out, then its probably just some mis-setting somewhere ...

also, could you kindly provide the parallel port module list ? ex:

# lsmod | grep -E 'parp|lp'


Rgds

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#9 Post by James186282 »

I must have puped too many new files and munged my computer so... I formatted and started from scratch. Tried the previous suggestions and installed the printer but got to the point of the "test page" and it seems to go into the bit bucket.

/usr/lib/cups/backend/parallel
direct parallel:/dev/lp0 "Unknown" "Parallel Port #1"

lsmod | grep -E 'parp|lp'
lp 9476 0
parport_pc 29828 1
parport 34508 2 lp,parport_pc

MyCUPS is the supplied version

In CUPS printer status idle, accepting jobs
"undefined in get"

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#10 Post by James186282 »

I upgraded my CUPs to the 1.3.11 rev and reinstalled the Deskjet 310. When I try to print a test page it shows the State as STOPPED yet I didn't do anything to stop it?

This is really a pain to the brain.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#11 Post by DaveS »

Did you try the Hpliplite package I pointed you to? http://www.murga-linux.com/puppy/viewtopic.php?t=46610
Spup Frugal HD and USB
Root forever!

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#12 Post by James186282 »

Yes, I tied that in my first stab at trying to sort this out. I think I fiddled with a few too many things as for reasons now unknown I munged my system so X wouldn't start from HD anymore. I ended up starting from scratch with the 4.30 distro trying to set up printing from that using just the PCL3 ppd and the Deskjet310 drivers. Nothing. So I upgraded to cups 1.3.11 and tried reloading the drivers there. Now, I get the message "Stopped" in the state from JOBs which I think is probably the worst error message I've seen in a while. WHO stopped it? Not me? Is this the printer stopped because its failed? If so why???

Anyhow, I know frustration sets in early for new folks. My logic maybe flawed.

Starting from scratch was not my choice but I think it makes sense. Although its a royal pain getting everything working the way I like it. Like Firefox not having fonts that are micro sized? How did I manage to goof that up? I have no clue. ;-)

Cups, PCl3 etc all seem rather complex. I know this printer takes straight ascii and perhapes I need to verify if the physical connections work? Is there a simple pipe command I can use such as test.txt > lpt1 in DOS that would work from the CLI? And if that does not work since I've verified that this cable and this printer do work on my Windoze 2k machine? At least I'll know if the printer port is working at some low level.

I do have to say that everything else in Linux seems so wonderfully "automatic" except printing. Anyway, Dave and Patriot others. I really do appreciate your helping me try to punch my way out of this paper bag.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#13 Post by James186282 »

Ok, I did some Googling and learned how pipes work on Linux. I also got it into my pointy head the names of some of the devices.

So, I opened a terminal and poked in
echo -en "blah\f\r" > /dev/lp0

and a page with the great words of count dracula popped out of my printer! So, the printer, the cable, the port and the computer all work. Is there some form of diagnostics for this jumble of software? I hope!?

Or perhaps what I'm looking for is an idea of whats going on under the hood.

Is the whole idea that there be a server running? Is that what CUPs is? And if we have it responding to me bothering it from the WEB what parts of it can we know work and from it what parts can we test? Is the PCL3 "machine" a part of the CUPs "server" assuming thats what it is? And can it be poked to see if its alive?

Sorry for the dumbness level of these questions. I've been in many other computer worlds but not a ton of Unix / Linux time.

;-) Because at this point I have zero clue what to do.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#14 Post by James186282 »

Another update. I thought hard about how the data from CUPs was going and tried to set it to print to /dev/lp0 I got a error about this not being allowed and to fiddle with cupsd.conf if I REALLY wanted to do this. Ok, so.... Am I way off track? Is this a really bad idea? And if not how do I jiggle cupsd.conf to allow this?

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#15 Post by James186282 »

Ok, I found the error logs for cups.
I cut and pasted the last part of this *Actions when I tried to print the test page"

This Undefined in get? Still makes zero sense to me and google is no help in finding an answer.

How do I change the loglevel to get more debug information?

It seems I have filter errors. What filter are we talking about? Do I need some form of translation to go from this test page to PS? And then PS to PCL3? Or?

Anyway for those reading along in the future with similar issues these error messages were found in the following directory

/var/log/cups

I [03/Oct/2009:11:55:15 -0600] [Job 4] Adding start banner page "none".
I [03/Oct/2009:11:55:15 -0600] [Job 4] Adding end banner page "none".
I [03/Oct/2009:11:55:15 -0600] [Job 4] File of type application/postscript queued by "anonymous".
I [03/Oct/2009:11:55:15 -0600] [Job 4] Queued on "Deskjet310" by "anonymous".
I [03/Oct/2009:11:55:15 -0600] [Job 4] Started filter /usr/lib/cups/filter/pstops (PID 14291)
I [03/Oct/2009:11:55:15 -0600] [Job 4] Started filter /usr/lib/cups/filter/foomatic-rip (PID 14292)
I [03/Oct/2009:11:55:15 -0600] [Job 4] Started backend /usr/lib/cups/backend/parallel (PID 14293)
C [03/Oct/2009:11:55:17 -0600] [Job 4] undefined in get
E [03/Oct/2009:11:55:17 -0600] PID 14292 (/usr/lib/cups/filter/foomatic-rip) stopped with status 1!
I [03/Oct/2009:11:55:17 -0600] Hint: Try setting the LogLevel to "debug" to find out more.
E [03/Oct/2009:11:55:17 -0600] [Job 4] Job stopped due to filter errors.
I [03/Oct/2009:11:55:18 -0600] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=14333)
I [03/Oct/2009:11:55:24 -0600] Started "/usr/lib/cups/cgi-bin/jobs.cgi" (pid=14371)
I [03/Oct/2009:11:55:24 -0600] [Job 4] Restarted by "guest".
I [03/Oct/2009:11:55:28 -0600] [Job 4] Started filter /usr/lib/cups/filter/pstops (PID 14409)
I [03/Oct/2009:11:55:28 -0600] [Job 4] Started filter /usr/lib/cups/filter/foomatic-rip (PID 14410)
I [03/Oct/2009:11:55:28 -0600] [Job 4] Started backend /usr/lib/cups/backend/parallel (PID 14411)
I [03/Oct/2009:11:55:29 -0600] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=14420)
C [03/Oct/2009:11:55:30 -0600] [Job 4] undefined in get
E [03/Oct/2009:11:55:30 -0600] PID 14410 (/usr/lib/cups/filter/foomatic-rip) stopped with status 1!
I [03/Oct/2009:11:55:30 -0600] Hint: Try setting the LogLevel to "debug" to find out more.
E [03/Oct/2009:11:55:30 -0600] [Job 4] Job stopped due to filter errors.
I [03/Oct/2009:11:55:39 -0600] Started "/usr/lib/cups/cgi-bin/printers.cgi" (pid=14519)

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

OpenPrinting.org recommends the pcl3 driver for your printer, but there is definitely something wrong with it. However, the alternate cdj550 driver does appear to work under a simulation test. Get the PPD file here and copy it to /usr/share/cups/model as usual.

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

#17 Post by James186282 »

OMG it worked! I did as you suggested and the testpage started to print. I was so shocked I slid my chair back and fell out of it. ;-)

Thank you SO much for helping me get this bugger to work!

Now, if I can just figure out how to beep the sound card from C I'll be happy (Happier) ;-)

Anyway without sounding too gushy thank you again for helping me figure this out. I was just about to buy some rogane so I could pull out my hair.

- James

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#18 Post by Patriot »

Hmmm .....

Great, rcrsn51 is back folks .... welcome back ... I hope all is well ...

Rgds

User avatar
James186282
Posts: 270
Joined: Tue 08 Sep 2009, 19:14
Location: Minnesota

An updated question on Deskjet 310

#19 Post by James186282 »

Hi - sorry to add to a solved thread but I've got a new improved issue. *And this might? be a duplicate post so if so - sorry.

The old laptop got a little too much Samoyd fur in it and went to computer heaven. I bought a nice (newer) T60 Thinkpad which has been working fine in all other reaspects (And I've been printing to a networked printer at home) I'm back into needing a portable solution and I dearly love my old Deskjet 310 but I'm puzzled how to make it work with CUPs using a USB to Parallel cable.

This works fine
echo -en "\rHello\r\f" >/dev/usb/lp0

Is the correct "path" to use in CUPs /dev/usb/lp0
Thanks for any tips
- James
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
[i]Donald Knuth [/i]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#20 Post by rcrsn51 »

In the list of CUPS devices, select AppSocket/HPJetDirect.

On the next screen, change "socket:" to "parallel:/dev/usb/lp0"

Please report back.

Post Reply