HP Wireless G HP 2101nw - how can I help get this working with HPLIP?

Asked by geofflaunchpad

I have an HP C4200 All-In-One printer. I have had the printer working from the USB port using HPLIP no problem. Pretty much plug-in-play after using the HPLIP 2.8.12 install on Ubuntu.

I now have an HP Wireless G HP 2101nw which I purchased with the sole intent of sharing this printer between all my computers, Windows and Linux. I have the two Windows machines sharing the printer through the print server just fine.

I spent a fair amount of time reading all the support FAQ's and dialogs with Aaron Albright (primarily) and after trying several things determined that while yes, the ports 34447, 34448, and 34450 are in fact open, I cannot configure CUPS in any way to print to this printer through the print server.

I understand from reading Aaron Albright's responses there is no way HPLIP will work with this wireless print server at the moment. What I would like to know is where the problem lies and how I might help. Since it's a sourceforge project, I assume I could help with the code. Hoping Aaron or some other HPLIP member sees this. I have been a developer for 10+ years (albeit more Java than C), I am motivated and I a might be able to lend a hand if someone points me in the right direction.

Sincerely,

Geoff

Question information

Language:
English Edit question
Status:
Expired
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) said :
#1

Geoff,

The problem is somewhere in how Linux uses the device. Because the device acts sorta, but not exactly, like wifi device--the problem is with the sorta part. I tried to get it to work on linux however it doesn't seem to want to talk to the printer wifi part--while the USB dongle part does seem to be detected as a wifi device.

We don't have any technical information on the device yet. This is on our list "to do"--and we are in contact with the product team.

Although I can't promise if/when we will add support...

Thanks your support of HPLIP--we appreciate it.

Aaron

Revision history for this message
OlivierP (unineurone) said :
#2

Hi Aaron,
Any news on this ?
I have just bought the device to connect a HP C5380 to my network "thinking" HPLIP would detect it. If not, it'll go back to the shop & I'll continue seeking for a device that will allow me to seamlessly share at least the printer & scanner part, as I can currenty do so through cups & sane. The card reader is the least important part (for me).

That said, thanks for HPLIP itself. Works well for me.

Revision history for this message
OlivierP (unineurone) said :
#3

*bump*
Any news or updates on this ?

Revision history for this message
Jochen Friedrich (jochen) said :
#4

I did a wireshark dump and it looks like only ports 34447 and 34448 are used. Port 34447 (both UDP and TCP) is used for USB status info and device registration. Port 34448 is used for USB commands (both EP0 standard request and EP1 / EP2 bulk reads and writes).

Port 34447 commands seem to have a 6 bytes header containing a 4 byte magic "USBS" and a 2 byte command (both in little endian format) followed by command specific data. The reponse has the same format.

Commands seem to be:

01 (UDP) - status. (response 486 bytes)
02 (TCP) - reserve. (command 86 bytes and response 82 bytes)
03 (TCP) - release. (command 2 bytes 00 00)
07 (UDP) - serial. (response 64 bytes)

Port 34448 command seem to have a 18 bytes header. Response has a 20 bytes header starting with the 4 byte magic "URBR" followed by the size of response data.

Commands seem to be in the first byte:

0B - get standard descriptor
1B - get class specific descriptor
09 - bulk data

0B seems to be used to get the device ids (although they are also in Port 34447 command 0 response) and to select the IEEE 1284.4 compatible Bi-directional Interface. 1B is used to get the printer capabilities. Then 09 is used to actually communicate with the printer.

I might add some support for dissecting this to wireshark :-)

Revision history for this message
charles (charvey) said :
#5

I am converting from windows and have this same print server hp2101nw. In windows it works fine, has anyone found out how to get it to work in Ubuntu?

Revision history for this message
geofflaunchpad (geoff-erickson) said :
#6

Hi,

Pretty awful really HP has done nothing about this. I bought an HP printer
because of their Linux support. Then I buy the wireless kit thinking it
would be best for compatibility in both the case of the printer and Linux.
They don't seem to think it's much of a priority.

I have since been looking around and have found some wireless print servers
that support linux and most all-in-ones out there. They cost around 50-70
dollars. When I get one I will try to remember to let everyone know.

Good luck. Don't buy HP if you ask me. Their software constantly wants to
update on Windows and they DON'T fully support Linux.

Regards,

Geoff

On Tue, Jan 5, 2010 at 9:50 PM, charles <<email address hidden>
> wrote:

> Your question #57827 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/57827
>
> charles requested for more information:
> I am converting from windows and have this same print server hp2101nw.
> In windows it works fine, has anyone found out how to get it to work in
> Ubuntu?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/hplip/+question/57827
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
They may say I am a dreamer, but I'm not the only one.

Revision history for this message
OlivierP (unineurone) said :
#7

Geoff, any pointers to those wifi print server models ?

Revision history for this message
Jochen Friedrich (jochen) said :
#8

It's really a shame that HP seems to ignore Linux for these print server models.

Maybe because it's not an HP product but bought from Sercomm?

Some information of the board gained by looking at the firmware with some tools from OpenWRT:

The hardware is broadcom BCM94712ap (bcm47xx/mips32) based, just the flash size is very low with just 1 MB.

The boot loader is CFE with this environment at 0x400:

boardtype=0x0445
boardnum=0x30
boardrev=0x25
boardflags=0x2448
sromrev=2
clkfreq=200
sdram_init=0x0002
sdram_config=0x0022
sdram_refresh=0x0000
sdram_ncdl=0
et0phyaddr=0x1f
wl0id=0x4320
il0macaddr=00:90:4c:67:yy:zz
aa0=1
ag0=0xc0
pa0maxpwr=76
pa0itssit=62
pa0b0=0x1449
pa0b1=0xfada
pa0b2=0xfe75
wl0gpio0=0x00
wl0gpio1=0x00
wl0gpio2=0x00
wl0gpio3=0x00
ccode=0
dl_ram_addr=a0001000
os_ram_addr=80001000
os_flash_addr=bfc40000
lan_ipaddr=192.168.1.1
lan_netmask=255.255.255.0
scratch=a0180000
boot_wait=on
wait_time=3
watchdog=0
manf=Sercomm Corporation
productname=Wireless Printer Adapter
boardstr=.
opo=0x10
sc_assign=0
rdl=0

There is a gzipped second stage CFE "piggy" at 0x6a24.

The device is operating under VxWorks5.4.2 which is gzipped "vx.bin" at 0x2001c.

Revision history for this message
Jochen Friedrich (jochen) said :
#9

Here is a very quick and dirty cups backend for this device. It doesn't use backchannel information yet, so only printing is working but no scanning etc.

http://www.bocc.de/rusbsocket.c

Also only tested with a HP F4200 series printer.

Revision history for this message
charles (charvey) said :
#10

jochen:

I got the file, now being the dummy I am, what do I do with it?

Revision history for this message
Jochen Friedrich (jochen) said :
#11

charles:

The file has nothing to do with HPLIP as it's a pure cups backend, but it can still be used to print from Linux.

You need to have cups development packages installed (libcups-dev or similar). Then, compile the file using "gcc -o rusbsocket -lcups rusbsocket.c" as specified in the file itself. The compiled rusbsocket must then be copied to the cups backends directory, which unfortunately depends on your distribution. After restarting cups, you might then just copy the printer with the hplip backend in the cups configuration (http://localhost:631) and replace the backend with rusbsocket://<ip address> and printing should work. You should configure your wireless ap to use a fixed ip address for your printer port.

Revision history for this message
stecklum (stecklum) said :
#12

Hi Jochen,

I followed your recipe and almost everything went fine except the final part . The printer gets connected (provided it has been disconnected from any other host before, otherwise it will appear as busy). When I try to print a test page from cups it says
Printer State: processing, accepting jobs, not published, but nothing happens.
Any advice for debugging?

Revision history for this message
Felix (apoapo) said :
#13

Any solution in sight? Does the "only printing" workaround really work?

Revision history for this message
Felix (apoapo) said :
#14

Any solution in sight? Does the "only printing" workaround really work?

Revision history for this message
Felix (apoapo) said :
#15

This really worked. Thank you very much! As you said, "no paper" etc does not. But that has secondary priority. I really appreciate your work!

Revision history for this message
Reinhold Kainhofer (reinhold) said :
#16

To configure the device on Linux, I have now created a perl script (released under the GPL):
http://kainhofer.com/software/hp-2101nw-on-linux.html

This script allows you to set up the wireless connection of the HP 2101nw print server. You just need to connect the device to the PC, run the script and answer the questions (it will automatically scan for wireless networks etc.). It is basically what the Windows installation program does until it really starts detecting the printer (which is not yet supported on Linux at all).

However, this script does more than the Windows installer: (1) It also lets you modify the hostname of the device and (2) it lets you save and also restore the full configuration of the device as a text file.

The perl script just needs the Device::USB perl package (package libdevice-usb-perl on Ubuntu) and it needs write access to the USB device, so you'll either run it as root (not recommended) or change the permissions of the USB device in /dev/bus/usb/ .

Have fun!

Revision history for this message
Cris (criguada) said :
#17

I am trying to use this device on a recent lubuntu installation.
I tried compiling the rusbsocket.c file but it fails due to a few undefined references (see below).
Maybe it is because I have libcups2-dev instead of libcups-dev. Did anybody try to compile the driver on recent ubuntu/lubuntu ISOs?

Here are the errors:
-----------------------------------------------------------------------------------------
cris@vbox:~/Downloads$ gcc -o rusbsocket -lcups rusbsocket.c
rusbsocket.c: In function ‘main’:
rusbsocket.c:136:12: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]
/tmp/cc3eTN2y.o: In function `main':
rusbsocket.c:(.text+0x55): undefined reference to `cupsLangDefault'
rusbsocket.c:(.text+0x65): undefined reference to `_cupsLangString'
rusbsocket.c:(.text+0xaa): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0x126): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0x151): undefined reference to `cupsBackendDeviceURI'
rusbsocket.c:(.text+0x1d7): undefined reference to `httpSeparateURI'
rusbsocket.c:(.text+0x43d): undefined reference to `httpAddrGetList'
rusbsocket.c:(.text+0x46e): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0x4b5): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0x4d4): undefined reference to `httpAddrConnect'
rusbsocket.c:(.text+0x524): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0x591): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0x5cb): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0x616): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0x62b): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0x6b5): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0xe97): undefined reference to `_cupsLangPrintf'
rusbsocket.c:(.text+0xf19): undefined reference to `_cupsLangPuts'
rusbsocket.c:(.text+0xf84): undefined reference to `_cupsLangPuts'
/tmp/cc3eTN2y.o: In function `wait_bc':
rusbsocket.c:(.text+0x10df): undefined reference to `cupsBackChannelWrite'
collect2: error: ld returned 1 exit status
-----------------------------------------------------------------------------------------

Thank you in advance.
Bye
Cristiano

Revision history for this message
Andi (andi-wachtel) said :
#18

Hello Cris,

I have the same problems while compiling the rusbsocket.c file.

Have you any solution now?

Or any other solution making this "HP Wireless G HP 2101nw" work with Ubuntu Linux?

Revision history for this message
Cris (criguada) said :
#19

Andi, unfortunately I have no news.
It seems nobody is monitoring this thread anymore, as this hardware is probably quite old now.
As much as I'd like to solve this issue, I have no time to start studying the source and try to adapt it to libcups2 (if this is the problem indeed).

Let me know if you have more luck.

Bye
Cris

Revision history for this message
geofflaunchpad (geoff-erickson) said :
#20

:) please don't take this the wrong way, but i have been beyond amazed at
your tenacity. you have to think about where your technical know how and
energy is spent best. buy one of the many inexpensive wireless printers and
move on. be free my brothers!

On Wed, Mar 27, 2013 at 10:56 AM, Cris
<email address hidden>wrote:

> Your question #57827 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/57827
>
> Cris posted a new comment:
> Andi, unfortunately I have no news.
> It seems nobody is monitoring this thread anymore, as this hardware is
> probably quite old now.
> As much as I'd like to solve this issue, I have no time to start studying
> the source and try to adapt it to libcups2 (if this is the problem indeed).
>
> Let me know if you have more luck.
>
> Bye
> Cris
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Cris (criguada) said :
#21

Geoff, sometimes you have to consider things from a different point of view.
I di not own the hardware in question. I have just been able to convert a friend of mine to Linux, and he is very happy with his new Lubuntu installation.
Unfortunately he cannot print like he has been able before with Windows: he has to disconnect his printer from the wireless adapter and connect it to the computer directly through USB. Besides the fact that this it is quite uncomfortable (luckily the computer is a notebook) this also means that his daughter, which is using a Windows desktop PC located in another room, cannot print if he forgets to reattach the printer to the wireless adapter.
When I came across this thread, I was happy to tell him "see how powerful the Linux community is: they came up with a workaround in no time". Do you think I can tell him: "trash your printer" or "trash your wireless adapter"?
Besides this, I'd hate trashing a perfectly working piece of hardware.
Anyway, let's see what comes out of this... asking never hurts.

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) said :
#22

Hi Cris,

To configure HP printer using wireless, please run bellow commands:-

1) Connect Printer to system using USB and run this command (i.e. Configure IP address to printer using USB)

$ hp-wificonfig -g
--> follow navigation.
--> At end it shows IP address in UI.

2) setup printer using IP address

$ hp-setup -g <above ipaddress>

Thanks & Regards,
Amarnath

Revision history for this message
geofflaunchpad (geoff-erickson) said :
#23

that was about the best answer I could imagine. (or failed to imagine)

good luck with the conversion. I know your friend will be happier.

personally, i still usually embrace my own philosophy that sometimes rather
than fight the uphill battle, if it's a cheap decision and makes sense in
the long run anyway, i swap out hardware.

that said, i have stubbornly recompiled my sound drivers for every new
linux header update because i refuse to give up on the sound card built
into the motherboard. :)

best of luck and thank you for changing my perspective.
On Mar 29, 2013 5:37 AM, "Cris" <email address hidden> wrote:

> Your question #57827 on HPLIP changed:
> https://answers.launchpad.net/hplip/+question/57827
>
> Cris posted a new comment:
> Geoff, sometimes you have to consider things from a different point of
> view.
> I di not own the hardware in question. I have just been able to convert a
> friend of mine to Linux, and he is very happy with his new Lubuntu
> installation.
> Unfortunately he cannot print like he has been able before with Windows:
> he has to disconnect his printer from the wireless adapter and connect it
> to the computer directly through USB. Besides the fact that this it is
> quite uncomfortable (luckily the computer is a notebook) this also means
> that his daughter, which is using a Windows desktop PC located in another
> room, cannot print if he forgets to reattach the printer to the wireless
> adapter.
> When I came across this thread, I was happy to tell him "see how powerful
> the Linux community is: they came up with a workaround in no time". Do you
> think I can tell him: "trash your printer" or "trash your wireless adapter"?
> Besides this, I'd hate trashing a perfectly working piece of hardware.
> Anyway, let's see what comes out of this... asking never hurts.
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Launchpad Janitor (janitor) said :
#24

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Olli (coderkun-deactivatedaccount) said :
#25

In case that anyone cares I successfully compiled rusbsocket.c with cups2 on Ubuntu 12.04—and printing works:

$ gcc -o rusbsocket `cups-config --cflags` rusbsocket.c `cups-config --libs`

( from Cups documentation http://www.cups.org/documentation.php/api-overview.html#COMMANDLINE )