amaletic
Posts: 1
Joined: Fri Aug 21, 2015 5:26 pm

CP1025 printer

Fri Aug 21, 2015 6:48 pm

Hi I finally succeeded to install HP LaserJet CP 1025 on my raspberry pi and share it to my windows machine using samba. I speeded about 4 days trying to make it work with hplip package but without sucess.
Correct procedure to share printer CP 1025 using raspberry pi is:
1. Preform update (dont forget to plugin printer)
sudo apt-get update

2. Install CUPS
sudo apt-get install cups

3. Configure cubps by coping file cupsd.conf
to:
/etc/cups/cupsd.conf

NOTE:
If you have problem with permission execute sudo chmod 777 /etc/cups/cupsd.conf before file copy

4. Driver installation (Check if printer is in sleep mode if it is wake it up)
NOTE:
hplip package/driver is not working for my printer CP1025 so i am using freeware driver
Details on page: http://foo2zjs.rkkda.com/ (full description of instalation procedure can ge found on page)

SHORT INSTALATION PROCEDURE:

a. goto directory you want to install driver to
b. wget -O foo2zjs.tar.gz http://foo2zjs.rkkda.com/foo2zjs.tar.gz
c. tar zxf foo2zjs.tar.gz
d. cd foo2zjs
e. sudo make
f. sudo make install
g. sudo make install-hotplug
h. sudo make cups

5. Set permission for device (Check if printer is in sleep mode if it is wake it up)

sudo chmod 777 /dev/bus/usb
sudo chmod 777 /dev/bus/usb/*
sudo chmod 777 /dev/bus/usb/001/* (My printer is on 001 you can do this for each dir in folder /dev/bus/usb/ to be shure that is ok)
sudo chmod 777 /dev/usb/lp0

NOTE (for command sudo chmod 777 /dev/usb/lp0):
If you get error "cannot access `/dev/usb/lp0' for command No such file or directory"
Printer is not connected or in sleep mode
Wake it up and try again

6. Check if installed driver works (you can skip this step if you bolive everything is ok)

Check if printer is in sleep mode if it is wake it up ant then:
a. Create test page
foo2zjs-wrapper -P -z3 -L0 -X16 testpage.ps > test.prn
b. Printing test page
cp test.prn /dev/usb/lp0

7. Restart cups
sudo /etc/init.d/cups restart

8. Go to web interface and configure cubps (Check if printer is in sleep mode if it is wake it up)

a. Web interface is on https://<IP address of yours raspberypi>:631 (my is can be at https://192.168.86.27:631 )
1. Credentials are same as raspberry pi login (if you changed password use yours) : username pi: password raspberry
b. go to Administration tab
c. select find new printers (if none found select add printer)
d. select your printer (my is HP LaserJet CP 1025 (HP LaserJet CP 1025))

NOTE: I had 3 options
HP LaserJet CP 1025 USB 0W04124APR1a HPLIP (HP LaserJet CP 1025)
HP LaserJet CP 1025 (HP LaserJet CP 1025)
HP Fax (HPLIP)

HPLIP is not working for my printer so I am selecting option 2
e. Populate Name, Description and Location fields (arbitrary text) click sharing
click next

f. On this page select model (DONT USE hplip for this model because it is not working)
Best thing is to point to PPD file "my printer HP-LaserJet_Pro_CP1025nw.ppd" and add printer

NOTE:
PPD files are located in PPD folder in foo2zjs.tar.gz for all supported printers

g. Populate default options for printing

h. Test printer

sudo echo "test" > test.txt
lp -d <printer_name> test.txt for my printer
On my printer
lp -d HP_LaserJet_CP_1025 test.txt
NOTE:
that <printer_name> can be found at
https://<IP address of yours raspberypi>:631/printers
my raspberry pi is on
https://192.168.86.27:631/printers/)
NOTE:
Details for lp command can be found on
Web interface https://<IP address of yours raspberypi>:631 (my is can be at https://192.168.86.27:631 )
home tab click on Command-Line Printing and Options



9. Install SAMBA (Check if printer is in sleep mode if it is wake it up)

sudo apt-get install samba

10. Samba config (Check if printer is in sleep mode if it is wake it up)
a. Copy smb.conf to /etc/samba/smb.conf
NOTE:
If you have problem with premission execure sudo chmod 777 /etc/samba/smb.conf before file copy
b. Restart samba
sudo /etc/init.d/samba restart
11. Connect your printer to windows machine
a. Open exporer and go to \\<IP address of yours raspberry pi>
b. Right Click on printer annd select connect
c. Install driver and use it
Attachments
PrintServerConfig.zip
Samba ans cubps config
(10.97 KiB) Downloaded 134 times

ginipig
Posts: 2
Joined: Mon Mar 06, 2017 2:38 pm

Re: CP1025 printer

Fri Jun 01, 2018 1:49 pm

Thanks a lot, I concluded today and outlining the same process as you have discovered will work, I reached till the freeware driver as well, but due to a power failure, I had to stop. I'll resume again. With your post, I got more confidence now. Will post if it succeeds.

I've already run the update and samba commands. do I have to run again?
Also, how do you wake up the printer? does it really affect? even in sleep mode, when I used lsusb, it still showed an entry "Hewlett Packard"

I tried all canned drivers like PCL 5 PCL 6, etc. It even shows the Test Page printed successfully but in reality, printer is as silent as if nothing happened :)

So I believe the freeware driver is important. Your conf files will be useful.

Thank you so much for your elaborate instructions!! Highly appreciated.

fruitoftheloom
Posts: 21650
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: CP1025 printer

Fri Jun 01, 2018 2:21 pm

ginipig wrote:
Fri Jun 01, 2018 1:49 pm
Thanks a lot, I concluded today and outlining the same process as you have discovered will work, I reached till the freeware driver as well, but due to a power failure, I had to stop. I'll resume again. With your post, I got more confidence now. Will post if it succeeds.

I've already run the update and samba commands. do I have to run again?
Also, how do you wake up the printer? does it really affect? even in sleep mode, when I used lsusb, it still showed an entry "Hewlett Packard"

I tried all canned drivers like PCL 5 PCL 6, etc. It even shows the Test Page printed successfully but in reality, printer is as silent as if nothing happened :)

So I believe the freeware driver is important. Your conf files will be useful.

Thank you so much for your elaborate instructions!! Highly appreciated.


Raspbian Stretch with Desktop:

Code: Select all

sudo apt update
sudo apt install cups


foo2zjs driver package, use the Debian CUPS howto:

http://foo2zjs.rkkda.com
Retired disgracefully.....
......to a more gentile life !

Return to “General discussion”