The device: HP 2101nw
This little device is marketed as a wireless print server for HP printers with USB connection.
It has two USB connections on the back: one standard USB port to plug in the printer and one micro USB port to connect the device with a PC for configuration. For Windows and MacOS there are utility programs by HP to configure and use the printer. However, for Linux there is no support from HP, and the Windows setup utility also does not work under Windows 7.
The device is not a real print server, i.e. it does not provide the standard IPP printing or raw printing on port 9100, but is rather a USB port forwarder, which simply forwards the USB commands via TCP (ports 34447, 34448 and 34450) to the printer. On Windows, the driver creates a virtual USB port. For this reason, it does not work out of the box on Linux, but needs a dedicated driver (which is not available yet).
Hardware
https://answers.launchpad.net/hplip/+question/57827#comment-7
Configuring the HP 2101nw on Linux
To configure the device on Linux, I wrote a Perl script, which displays the settings and allows to change the wireless connection settings of the print server. This is also what the Windows driver installation does (which does no longer work on Windows 7). This script might also work to configure the print server on Windows 7, but I have not tested it.
Requirements: Perl and the perl libusb interface (on ubuntu that's the ''libdevice-usb-perl'' package).
Download: hp2101nw_setup.pl
Running the script
Simply call it as perl hp2101nw_setup.pl. It will guide you through the whole process:
reinhold@einstein:~$ perl hp2101nw_setup.pl hp2101nw_setup.pl - version 0.01 Linux configuration utility for the HP 2101nw wireless G USB print server. (C) 2011 Reinhold Kainhofer License: GPL v2 or later Detected devices: 004 / ID 03f0:cd02 (Sercomm Corporation: Wireless Printer Adapter) Current configuration of the device: Device name: photosmart SSID: kainhofer Channel: 0 Security: WPA-PSK Encryption: TKIP Passphrase: xxxxxxxxxx IPv4 method: DHCP IP address: 10.0.0.4 Gateway: 10.0.0.138 Netmask: 255.255.255.0 Link state: STATE:Associated - BSS ID = 30:39:F2:52:AD:76;SSID:kainhofer;CHANNEL:3; TXRATE:54;TX:0;RX:0;QUALITY:Low(20%);STRENGTH:Low(20%); What do you want to do? 1) Setup a wireless connection through a wifi router or access point ('infrastructure') 2) Setup a direct wireless connection with the printer ('ad-hoc') --- 3) Change the name of the device --- 4) Save the device configuration to a file 5) Restore the device configuration from a file --- 6) Exit Your choice (default: 6):
To setup a wireless connection with a wireless access point, enter 1 and press return. It will then scan the network for available access points. You can select one of the detected access points or enter the name (ssid) of a hidden network. You will also be asked about the security settings of the wireless network (defaults are auto-detected if possible) and the address assignment (DHCP).
Your choice (default: 6): 1 Scanning for access points: ...... Detected wireless networks: SSID Signal Security Type channel ------------------------------------------------------------------------ 1) baadshaah 0 WPA/WPA2-PSK Infrastructure 1 2) Fischer 10 WPA/WPA2-PSK Infrastructure 1 3) kainhofer 60 WPA-PSK Infrastructure 3 4) missinglink 10 WPA/WPA2-PSK Infrastructure 11 5) NETGEAR_Guest1 10 WPA/WPA2-PSK Infrastructure 6 6) SpeedTouch1 10 WPA/WPA2-PSK Infrastructure 11 7) Trafostation 10 WPA/WPA2-PSK Infrastructure 6 Please enter the number or the SSID of the desired wireless network. Enter '0', 'hidden' or 'h' to connect to a hidden network. Desired wireless network: 3 Security: 1) None --- 2) WEP 3) WPA-PSK 4) WPA2-PSK 5) WPA/WPA2-PSK Your choice (default: 3): Using WPA-PSK security Type of encryption: 1) TKIP 2) AES Your choice (default: 1): Please enter the WPA passphrase for network 'kainhofer': xxxxxxxxxx IP-address assignment: 1) DHCP 2) Manual Your choice (default: 1):
After that, the device configuration is finished, it will be reset and should automatically connect to the wireless network.
Sending new configuation to the device. Please wait.......... Resetting the device, please wait.................... Device was reset. Please press Return. Detected devices: 006 / ID 03f0:cd02 (Sercomm Corporation: Wireless Printer Adapter) New configuration of the device: Device name: photosmart SSID: kainhofer Channel: 3 Security: WPA-PSK Encryption: TKIP Passphrase: xxxxxxxxxx IPv4 method: DHCP IP address: 10.0.0.4 Gateway: 10.0.0.138 Netmask: 255.255.255.0 Link state: STATE:Associated - BSS ID = 30:39:F2:52:AD:76;SSID:kainhofer;CHANNEL:3;TXRATE:54; TX:0;RX:336;QUALITY:Good(40%);STRENGTH:Good(40%);
Using the HP 2101nw on Linux
As a print server for CUPS
https://answers.launchpad.net/hplip/+question/57827#comment-8
http://www.bocc.de/rusbsocket.c
As a scanner server for SANE
The communication protocol
http://wiki.kainhofer.com/hardware/hp2101nw_wlan_printserver
https://answers.launchpad.net/hplip/+question/57827#comment-3