LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-05-2007, 05:05 PM   #1
keiffee30
Member
 
Registered: Jun 2007
Location: london
Distribution: ubuntu 12.04 LTS
Posts: 46

Rep: Reputation: 15
Unhappy HP 1020 usb printer


Dear All

I have had the printer working over a SAMBA from a windows PC sharing. Now the windows PC is not working and now i can get this PC to Linux (ubuntu) 7.04.

I have pluged in this HP 1020 usb printer and the PC can see the printer and it has installed the recommended driver for it but i can not seam to get a print out of it when i do a test page. What can be the problem.

Can anyone point in a direction, as i have tried ......

"
You need to get the udev patched version of foo2zjs at:-

http://support.ideainformatica.com/h...patched.tar.gz

I'm not sure if you need the "normal" foo2zjs package already installed (my system had it there anyway).

Once you untar the archive (tar zxvf foo2zjs-patched.tar.gz) you need to cd into the new foo2zjs directory and

make
sudo make install

this will install the drivers and firmware.

Next edit the file (in the foo2zjs directory you're currently in) called 58-foo2zjs.rules (or some such) to correct a bug (it took me ages to work out why udev wouldn't upload the firmware)

look for the entry for the 1020 - specifically change

SYSFS{idProduct}=="2B17"

to

SYSFS{idProduct}=="2b17"

(the typo prevents udev from spotting the printer being plugged in!)

now install the udev scripts/rules :-

sudo make install-udev

I don't know if you need to restart udev (I messed about so much last night I got lost) but it can't hurt (?)

sudo udevstart

When you power cycle the printer you should hear it whirring as it powers, then whirring again as the new firmware is uploaded.

To check the firmware is in look at /var/log/messages - -there should be some note of successful upload of firmware.

Now you need to restart cupsys

sudo /etc/init.d/cupsys restart

Next use the normal gnome printer config tool to install the HP1020 - you should see the option to use the correct HP1020 foo2zjs driver.

(btw you might need to install the "build-essential" package - and "make" - to compile the foo2zjs package)"


and

"Please help. I must have put 20 hours into false starts and bad advice getting this printer to work (mostly), and really should have left well enough alone, but since 2 people had no problems at all, I thought it would be safe to upgrade to the latest foo2zjs drivers. After installation, the gnome printing panel stopped detecting my printer.

So I tried to apply the udev patch given at http://support.ideainformatica.com/hplj1020/ to the new foo2zjs driver, with no luck.

After having no luck with the new foo2zjs drivers, I tried to reinstall the older patched udev foo2zjs drivers again using Johnp_g's post above.

However, the gnome printing panel still doesn't detect my printer! I've tried everything - rebooting, restarting udev, restarting cupsys, restarting the printer, reinstalling in different directories.

For various commands I get as follows:
$ cat /proc/sys/kernel/hotplug
/sbin/udevsend
and
$ sudo cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/lp0
bash: /dev/usb/lp0: Permission denied
and finally
$ sudo usb_printerid /dev/usb/lp0
Error: Input/output error: GET_DEVICE_ID on '/dev/usb/lp0'

So the printer is definitely not being recognised. It is on. It has been turned off and on many times.

I have no clue where to go from here - up til now the problem has been with the printer giving errors, but it has always been detected at least.

Which components control this behaviour, and how do I restart/reinstall them?
Is there some way to check what's going on in udev? Has one of the installation scripts messed things up?
Is there a way to turn on 'hotplug' so that it may detect the usb printer instead?"


is there anything else i can do.

Keith

PS sorry for the long post, and yes i have Cut and Copied from the other posts
 
Old 07-07-2007, 09:19 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
What an epic tale of woe. You have my sympathy.

The first thing that interested me in your post was the permission denied problem.
Quote:
$ sudo cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/lp0
bash: /dev/usb/lp0: Permission denied
I found that if I tried to cat a file to a device that doesn't exist I get a permission denied error.
Code:
NORMAL_USER>cat .bashrc > /dev/nodevice
bash: /dev/nodevice: Permission denied
Note that the NORMAL_USER> is my login prompt for these examples. I've had some people try to include my prompt when they tried to use my examples.

So first I would ask you to see if that device exists.
Code:
ls -l /dev/usb/lp0
Normally the lp0 device would be directly under the /dev directory.

Next I would advise you to see if the CUPS daemon is running.
Code:
NORMAL_USER>ps -C cupsd
  PID TTY          TIME CMD
 3472 ?        00:00:00 cupsd
You can see that the CUPS daemon is running on my system. Its PID is 3472. If you only see the column headings without a process when you run the ps command then the CUPS daemon is not running. In that case you would have to start it.
Code:
sudo /etc/init.d/cups start
Now see if you can print.

If that doesn't work then see if the printer shows up in the list of USB devices.
Code:
NORMAL_USER>/usr/sbin/lsusb
Bus 001 Device 003: ID 046d:c041 Logitech, Inc.
Bus 001 Device 001: ID 0000:0000
Bus 003 Device 005: ID 03f0:7704 Hewlett-Packard
Bus 003 Device 004: ID 0424:2502 Standard Microsystems Corp.
Bus 003 Device 003: ID 13fd:0540
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Here you can see that I have a USB mouse by Logitech and a Hewlett Packard printer and a USB disk drive made by Standard Microsystems Corp. Make sure that your printer shows up when you use the lsusb command. If it doesn't then there is a connection problem.

If the printer shows up using the lsusb command and the CUPS daemon is running and you still cannot print then use the CUPS web administration interface. Start any web browser and point the address to localhost:631. You should see a web page appear indicating that you are connected to the CUPS administration interface.

Click on the Administration link. It may show you a login window. Use root as the user account and enter the root account password in the password field. I am guessing that this may not be available to you because you use sudo for everything instead of logging in to the root account. In that case you may be able to set the root account password by using sudo passwd.
Code:
sudo passwd
or
Code:
sudo su -
passwd
I don't know if that will work. I don't use sudo because I have a normal distro that lets you log in to the root account. Note that the two examples above don't have a prompt on the line. That's because I can't test it since sudo isn't configured on my system and I don't want to set it up.

Anyway if you can log on to the CUPS administration web interface then you can administer printers, print jobs, and printer classes. You should click on the link for printers. It should show you the list of configured printers. It will also have a link to configure a printer. Make sure that your printer is turned on and is connected to the computer. See if you can configure the printer and start it. Then send a print job to the printer. I suggest using a GUI application to send the print job since its print dialog will show you the configured printers available.

Let us know if any of these things work or don't work.

Last edited by stress_junkie; 07-07-2007 at 09:33 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Driver for HP Laser 1020 USB printer in Linux mohit.chugh Linux - Software 1 11-22-2006 10:14 AM
hp 1020 printer problem mohit.chugh Linux - Software 1 11-22-2006 06:29 AM
Problems setting up HP 1020 laser printer $in Linux - Hardware 0 06-24-2006 10:32 AM
Installing Canon LBP USB Printer as network printer on a Fedora Core without XWindow boy3dfx2 Linux - Newbie 5 06-03-2006 01:23 PM
how to configure HP Deskjet 3325 USB PRINTER AND ACER 3300 USB SCANNER ON RHL 8.0 rddreamz Linux - Newbie 2 07-12-2003 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration