[SOLVED] Setting up HP_LaserJet_Professional_P_1102w printer (again!)
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Setting up HP_LaserJet_Professional_P_1102w printer (again!)
On Slackware64-current:
In the past, the only was to set this printer up was with the hp-setup utility. No matter how I set the config, it would never work. This time, with hp-setup, it doesn't work
I set up a usb connection and run hp-setup, selecting 802.11 (Step 1 od 5) My printer appears and I click next (2 of 5). It finds every network except mine, so I get it to search for mine (3 of 5). Step 4 enters the ssid, and step 5 simply shows the url. I also get a lot of errors 'Rersponse Code 204' and these in the terminal
Code:
Traceback (most recent call last):
File "/usr/share/hplip/ui4/wifisetupdialog.py", line 374, in loadNetworksTable
self.location_cache[bssid]
KeyError: '3481C4E04B88'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.6/http/client.py", line 986, in send
self.sock.sendall(data)
File "/usr/lib64/python3.6/ssl.py", line 969, in sendall
with memoryview(data) as view, view.cast("B") as byte_view:
TypeError: memoryview: a bytes-like object is required, not 'str'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/share/hplip/ui4/wifisetupdialog.py", line 346, in ShowExtendedCheckBox_clicked
self.loadNetworksTable()
File "/usr/share/hplip/ui4/wifisetupdialog.py", line 376, in loadNetworksTable
location = wifi.getLocation(bssid, ss)
File "/usr/share/hplip/base/wifi.py", line 625, in getLocation
conn.send(request)
File "/usr/lib64/python3.6/http/client.py", line 990, in send
self.sock.sendall(d)
File "/usr/lib64/python3.6/ssl.py", line 969, in sendall
with memoryview(data) as view, view.cast("B") as byte_view:
TypeError: memoryview: a bytes-like object is required, not 'str'
GET /IoMgmt/Adapters/wifi0/Profiles/Active HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0
The thing is set up with pc-<url> as a hostname whereas previously it it showed the printer name. I tried a 'sudo hp-setup' but that didn't help. Do I have to set it up in (spit!) M$ windows to get it working in linux? I do have the driver disk, and a working copy of vista on an aging laptop.
We have one of these at the work office. We have the wireless disabled so I can't test that at all, which is your use case.
I don't know Python and can't help with the stderr.
At work the printer works fine with Ubuntu MATE 16.04, which is what we use on the Linux desktop systems. We have the printer connected using AppSocket/HP Jetdirect (port 9100). There were some package dependencies such as Avahi, but that is on an Ubuntu system and I don't know if that relates directly to a Slackware system. Might not hurt to install avahi from slackbuilds.org.
You imply you had the printer working previously, so probably I am not much help.
My T400 laptop runs Slackware 14.2. If you are unable to resolve the problem I can test my T400, but I suspect I will find no problem because the connection will be Ethernet and not wireless.
You don't need to connected to the USB port to use it with WiFi. Just be certain that the printer has a static IP on your network after you connect it to the wireless access point. Then, as suggested by upnort, use the AppSocket/HP Jetdirect protocol. Don't use hp-setup. Use the cups web interface to add it or possible the system-config-printer GUI application. On my -current install hp-setup will not work with my HP Officejet 4500 G510n-z and it is very ancient- so it should work.
The problem with Jet Direct is that the printer has no static IP. HP-setup or something managed to delete that setup.
I was able to print off tablets, and windows on the entire network. But I have Mint and Vista here, before I start waking up VMs in the vain hope they'll do something. It's not something stupis & obvious anyhow. Thanks for replies. I may even resort to usb if things get bad enough.
Before I set up a static IP for my printer in my router configuration, it would reconnect periodically after the WiFi went down or there was a power outage. At least once a week it would come up at a different IP address due to the DHCP lease expiring. The best solution I came to find was set a DHCP reservation on my router for the printer and ge the printer the domain name "hp-printer.local.lan". Since then none of the desktop or mobile devices ever have trouble finding the printer on the network. Depending on the device, I either add the printer directly be setting the printer name as hp-printer.local and using port 9100 (HP Jetdirect protocol) or the printer is found and configured automatically. YMMV.
I have given it a static IP but it insists on broadcasting a silly name, nothing recognises it and I can't fix it. Neither will it take the WPA key, but logs on to the 'Guest Access I have temporarily enabled. I'll nobble that and try again. I can't add it to vista without the network connection :-/. I'd probably get a local connection. Mint only takes it locally connected - same problem.
It's customary to have HUGE messing & long threads setting this up. I won't go HP next time, if there is a next time.
You may need to enable the Wireless 802.11 a/b/g protocols on your router for the printer to connect. My HP Officejet 4500 G510n-z doesn't support 802.11 ac (5GHz frequency) or 802.11 n with a 40MHz channel width. If I use 802.11 n it needs to use a 20MHz channel width. Be sure your router supports your printers wireless drivers too.
The solution finally proved to be
0. Remove Guest Access on my modem.
1. Do a master reset (Hold down both buttons, WiFi & 'X', power up and hold while noisy).
2. Boot M$ Vista and purge it of all instances & copies of the printer (which means cancelling all jobs on each.
3. Insert the driver cd, and run uninstall.exe (Absolute Last Resort).
4. Set up from scratch with HpSetup.exe (I was desperate). The windows cd sets up wifi over usb, and then prints a test page over wifi.
5. Examine the Modem, and see what IP the printer had
6. Back in linux, run 'sudo hp-setup <printer_ip>
7. Print a test page in linux, and a page of text to be sure.
TO DO: File a bug against the hplip utility or whatever provides hp-setup.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
This is the way to set up the 1102W. Been there, done that.
You need to use the Windows utility to connect it to your Windows computer and set a static IP. The static IP does not have to be the same as what the DHCP assigned. You can also note the DHCP address, log in into the printer web interface and set the IP static.
Once the static IP is set, you can run hp-setup like for any other printer. So what you did is correct.
It seems that HP follows different policies for printer and MFP devices. The low low end ones where you need Windows to set up and assign a static IP. And the slightly more expensive ones where you can set up the IP through the local display.
If I can avoid it I won't use a HP1102W or (say) a M125W because those are the ones difficult to set up.
OTOH, in my other location I have set up a 4950 MFP which is about the cheapest you can get. I was able to set it up completely in Linux. Once it has a fixed IP it is fully functional using hplip. Including SANE scanning.
With the more expensive printers and MFP I stick with HP. They work.
Doing that bug report now, and it suggests running 'hp-doctor' and trapping the output, also 'hp-check,' but of course they're python scripts that take forever, like a pint of Guinness settling.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.