HP LaserJet P1102w - Can't connect to wifi - Ubuntu 14.04

Asked by Valentin Hussong

I'm trying to set up an HP LaserJet P1102w as a wifi printer on Ubuntu 14.04, but I can't make the printer connect to my wifi.

I've downloaded and run the latest installer from http://sourceforge.net/projects/hplip/files/ -- ran like a charm, removed the old version, installed the plugin, hp-check tells me everything's fine. I can set up the printer via USB and print without problems.

However, when I run the wifi setup (either from the "HP Device Manager" GUI or from the shell using hp-wificonfig), the printer just won't connect to the existing wifi.

I've followed the steps outlined at https://answers.launchpad.net/hplip/+question/253653 -- and when I run hp-wificonfig in debug mode it all goes well (it finds the device on usb, it finds the wifi) until I enter the password and hit "connect", upon which the output tells me "error: Unicode Error".

The wifi is provided by an Airport Express base station with the (apple default) IP 10.0.0.1 (I already changed the wifi password so it only contains lowercase letters at this point).

Below is the debug output of hp-wificonfig, please advise, thanks!

hp-wificonfig[26727]: debug: Selected network SSID: Banana
hp-wificonfig[26727]: debug: Security: WPA2
hp-wificonfig[26727]: debug: Mode: infrastructure
hp-wificonfig[26727]: debug: Signal strength: 5
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

error: Unicode Error
hp-wificonfig[26727]: debug: Missing response key: 'io:profile-io:adapterprofile-io:wifiprofile-wifi:communicationmode'
hp-wificonfig[26727]: debug: Crypto algorithm:
hp-wificonfig[26727]: debug: Crypto mode:
GET /IoMgmt/Adapters/wifi0/Protocols HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

hp-wificonfig[26727]: debug: HTTP Responce failed with 500 code
GET /IoMgmt/Adapters/wifi0/Protocols HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

hp-wificonfig[26727]: debug: HTTP Responce failed with 500 code
GET /DevMgmt/IOConfigDyn.xml HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

hp-wificonfig[26727]: debug: ip=0.0.0.0, hostname=Unknown, addressmode=autoip, subnetmask=0.0.0.0, gateway=0.0.0.0, pridns=0.0.0.0, sec_dns=0.0.0.0
GET /IoMgmt/Adapters/wifi0/VsaCodes.xml HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

GET /IoMgmt/Adapters/wifi0/WifiNetworks/SSID=Banana HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

GET /IoMgmt/IoConfig.xml HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

hp-wificonfig[26727]: debug: HTTP Responce failed with 404 code
GET /IoMgmt/IoConfig.xml HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

hp-wificonfig[26727]: debug: HTTP Responce failed with 404 code
warning: Request failed with Response code 404. HostName not found.
GET /IoMgmt/Adapters/wifi0/Protocols HTTP/1.1
Host: localhost
User-Agent: hplip/3.0
Content-Type: text/xml; charset=utf-8
Content-Length: 0

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Valentin Hussong
Solved:
Last query:
Last reply:
Revision history for this message
goutam (goutamkk) said :
#1

Hi Valentin,

Thank you for reporting this issue here. We are able to reproduce Unicode error when hp-wificonfig command is run for device 1102w. But we are able to fetch the IP address for the printer and configure it using hp-setup.

Workaround for this issue is to print the configuration page for this printer and get the IP address assigned to this printer. Configure the device using 'hp-setup <IP>' . Where <IP> is the IP address of the printer.

Thanks,
Goutam

Revision history for this message
Valentin Hussong (hussong) said :
#2

Hi Goutam --

Thanks a lot for the quick reply.

So, I finally got it working after jumping through a lot of hoops...

It appears that when it comes to the wifi password, the LaserJet P1102w simply DOES NOT UNDERSTAND UNICODE.

Once I pasted the wifi password in ISO 8859-1 encoding, the printer would finally connect to my wifi.

I had tried your suggestions above, but the printer wouldn't connect to my wifi, the configuration page would show "not connected" and all the IP addresses were "0.0.0.0". As it turns out, hp-wificonfig didn't save a single thing on the printer, since the network information on the printed configuration page still showed the SSID of a previous location.

FWIW, here's the dirty workaround to get wireless printing working on Ubuntu 14.04

1. Install latest version of HPLIP
Go to http://sourceforge.net/projects/hplip/files/ and download the latest installer. Run the installer and remove any previous versions of HPLIP you may have installed.

2. Check your install of HPLIP
From the shell, run hp-check -- make sure you have the damn plugin and everything is fine there

3. Reset your printer's wireless config
Unless you've just unboxed your printer, turn it off, turn it back on and press X and Wifi Button simultaneously for 10–15 secs.
See: http://h30434.www3.hp.com/t5/Printer-Networking-and-Wireless/HP-Laserjet-P1102W-Wireless-Connection-Trouble/m-p/2422555#M55329

4. Turn off your wifi protection
I know, it hurts, but set the wifi security on your router to "none" for just a minute.
Wait for your Computer to connect again to your (now unsecured) wifi.

5. Run the wifi config
Connect your printer via USB and run hp-wificonfig from the shell. Pick your Printer and SSID and let it finish (takes a few minutes). Your printer should now be connected to your (temporarily unprotected) wifi.

6. Get the IP of your printer
You can get it from the output of hp-wificonfig, a printed configuration page, or your router can tell you where the printer's at.

7. Go to your printer's web interface
Open a web browser and point it to the IP you've identified above. Here you can change all kinds of settings. We'll focus on the wifi.

8. Convert the charset of your wifi password
Since pretty much all your text on Linux will be saved in Unicode / UTF-8, you'll need a program to change the character encoding. You can use a free text editor like Sublime or Notepad++ (the latter running in Wine). Paste or enter your wifi password into a new document and change the character encoding to ANSI / Western / ISO 8859-1. Select the password and copy again (this time, in ISO 8859-1 encoding).

9. Change printer wireless settings
In your printer's web control panel, go to the tab "Networking" and submenu entry "wireless" (http://<YOUR_PRINTER_IP>/SSI/Auth/ip_wireless.htm). Change the security mode and paste your wifi password. Hit apply.

10. Re-enable wifi protection on your router
Turn the protection back on using the same password as before. Don't worry about character encoding, your router is not stupid.

11. Wait for the printer to connect to the wifi

12. ????

13. PROFIT

14. Set up a print queue
See if the printer's IP address has changed (DHCP FTW) and run hp-setup <IP>.

Please note: it may also be possible to paste the ISO 8859-1 wifi password directly into the hp-wificonfig GUI, but I'm certainly not going to touch a running system here any more, so I'll leave it to someone else to try that (it would obviously make things a lot simpler if that worked).

That's all folks :-)

Cheers,
Valentin

Revision history for this message
Hello (prog2k) said :
#3

Hi i got HP p1102w wireless setup working, using ubuntu with following scenario:

1.) Disable password/WPA on your router
2.) run hp-setup against your non-protected wifi network, you will get ip of printer then i.e 192.168.0.111
3.) go to printers web page i.e http://192.168.0.111/SSI/Auth/ip_wireless.htm and set the WPA password
4.) Enable again WPA password in your router.

Works for me.

Revision history for this message
augusto rojas (ybico) said (last edit ):
#4

Thank you Valentin,
your post is from 2014; however, it is still very valuable and helpful these days.
it took me some hours to find it, but the effort paid off because I got my hp laserjet p1102w up and running under ubuntu 20.04
thank you !

Ybico

Revision history for this message
Valentin Hussong (hussong) said :
#5

Thanks for letting me know, Ybico!

This made my day :-)