LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-26-2018, 03:05 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
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.
 
Old 07-26-2018, 05:40 PM   #2
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
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.
 
Old 07-26-2018, 06:01 PM   #3
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052
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.
 
1 members found this post helpful.
Old 07-27-2018, 03:21 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
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.
 
Old 07-27-2018, 05:58 AM   #5
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052
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.
 
1 members found this post helpful.
Old 07-27-2018, 06:14 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
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.
 
Old 07-27-2018, 06:33 AM   #7
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052
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.
 
Old 07-27-2018, 06:55 AM   #8
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,902

Rep: Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052Reputation: 1052
It looks like, according to HP specifications, your printer only supports 802.11 b/g. See https://www.cnet.com/products/hp-las...802-11g/specs/
 
Old 07-27-2018, 07:49 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
It now appears that a reset of the network stuff is required - give it amnesia ans start over. I'm researching that. . .
 
Old 07-27-2018, 08:57 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
Eventually Got it! A typically gruesome job.

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.
 
1 members found this post helpful.
Old 07-27-2018, 10:30 AM   #11
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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.

jlinkels
 
1 members found this post helpful.
Old 07-28-2018, 04:26 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
Where do you file a bug against hplip?
 
Old 07-28-2018, 05:06 AM   #13
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
business_kid --

A very worthwhile thread.

Thanks for documenting your solution !

I fought a Win10-USB-Connected HP LaserJet M607dn Printer trying to connect via cups smb:// protocol from CentOS 6 this week

( Win10 by default only acccepts SMB Version 2+ and SAMBA3 / Kernel 2.6.32 on CentOS 6 only speak SMB Version 1 ).

Anyhow, spent a little time digging around on HP's Imaging and Printing Site.

Here it is https://developers.hp.com/hp-linux-imaging-and-printing

There is a [Support] tab and a [Contact Us Report a Bug] Submenu there.

HTH and Thanks again.

-- kjh

Last edited by kjhambrick; 07-28-2018 at 05:12 AM. Reason: type: 697 -> 607
 
1 members found this post helpful.
Old 07-29-2018, 06:34 AM   #14
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,359

Original Poster
Rep: Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333Reputation: 2333
Thanks for the bug reporting link.

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.
 
  


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
Setting up a printer calexander Linux - Newbie 5 05-17-2010 12:41 PM
"Unable to create printer" from KDE Wizard when setting up SMB printer Happy2Bme SUSE / openSUSE 1 01-18-2005 07:30 AM
Setting Printer? Kensai Fedora 2 03-02-2004 04:02 PM
Setting a printer! Rex_chaos Linux - General 3 08-31-2001 04:55 AM
setting up a printer justin19fl Linux - Newbie 0 08-03-2001 11:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:42 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