We've tested this program with the H-PS1U Ethernet-to-USB printserver, and the PN7127P Ethernet-to-Parallel printserver, and for all we know there are others in the product line for which it works as well. We did all of our development with Perl 5.6.1 on a Red Hat Linux 6.2 system, but hpsutil seems to work fine under Windows with ActivePerl 5.6.1.
We also have a report from Chip Warden that it run well on Darwin 6.6/Mac OS X 10.2.6 with Perl 5.6. Brian Chapados reports that it works on the PS12U unit as well.
Much more information about the techniques involved in configuring these printers can be found in our Tech Tip on the subject.
--help | Show a brief help listing to the standard error stream and exit with failure status. |
--version | Show the program's version info and exit |
--ip=IP | Set the unit's IP address to IP. The tool performs very little validation, and it only accepts an IP address, not a hostname. |
--mask=mask | Set the unit's IP subnet mask to mask (say, 255.255.255.0). The program does very little data validation. |
--gw=IP | Set the unit's default gateway to IP address IP. Many units on a local network don't really require a default gateway if outside connectivity is not needed. |
--pass=PW | Set the unit's password to PW, which will allow you to access and configure the unit. We have reports that this must be eight alphanumeric characters but have not looked into it in any detail. |
--unit=N | Select unit N on a multi-device network. This unit number is not assigned by the unit itself, but by this program: if a network query brings multiple responses, they're presented to the user in alphabetical order based on the responding unit MAC addresses. A second query can include the --unit to select which of the multiple unit |
--multi | Presume that we might find more than one print server on the network, and allow for multiple queries and longer response timeouts. This is the default. |
--nomulti | Presume there is only one print server on the network and exit the query phase immediately upon receiving the first response from any unit. This will ignore all other responses, so only use this parameter if you're sure there is only one on the network. |
--verbose | Show a bit more detail on the conversations. |
--ntries=N | When querying the network, send the magic broadcast packet N times (default = 3). Note that if the --nomulti parameter is given, then the first cuts off all subsequent query attempts. |
--dhcp=bf | This asks that the EnableDHCP option be set or disabled in the printserver, and the bf Boolean flag can be any of yes/no on/off true/false 1/0. |
--nosend | This suppresses actually sending the update packets to the unit, and it's only really useful when testing the code itself (say, when adding a new field). It is not very useful unless --verbose or --dumpbinary are also provided. |
--dumpbinary | Show the full binary dump of the @i{data} (but not reset) packets sent, and the responses received. This is only useful if you're developing the code itself. |
$ hpsutil
Sending magic packet to 255.255.255.255:20560/udp
--> got new reply from 00:40:01:20:66:CF
Sending magic packet to 255.255.255.255:20560/udp
Read 1030 bytes from sender
Sending magic packet to 255.255.255.255:20560/udp
Read 1030 bytes from sender
[UNIT 1]
EnableDHCP = {Yes}
Firmware = {5.61.13E}
Gateway = {10.1.1.254}
IPAddress = {10.1.1.106}
MACAddress = {00:40:01:20:66:CF}
Netmask = {255.255.255.0}
Password = {unixwiz}
PrinterName = {1P_PrintServ2066CF}
Now that we've identified the unit in question (including noting that there is
only one on the network in spite of multiple queries), we're ready to
set the IP address on the unit. In this case, the DHCP server on our network
has programmed in most of the IP parameters, but we'll set them this way
nevertheless for illustration. After setting the parameters, we'll
query only again just to verify:
$ hpsutil --nomulti --ip=10.1.1.220 --gw=10.1.1.254 --mask=255.255.255.0 Sending magic packet to 255.255.255.255:20560/udp --> got new reply from 00:40:01:20:66:CF [UNIT 1] EnableDHCP = {Yes} Firmware = {5.61.13E} Gateway = {10.1.1.254} IPAddress = {10.1.1.106} MACAddress = {00:40:01:20:66:CF} Netmask = {255.255.255.0} Password = {unixwiz} PrinterName = {1P_PrintServ2066CF} Setting unit 1 (00:40:01:20:66:CF) $ hpsutil --nomulti Sending magic packet to 255.255.255.255:20560/udp --> got new reply from 00:40:01:20:66:CF [UNIT 1] EnableDHCP = {Yes} Firmware = {5.61.13E} Gateway = {10.1.1.254} IPAddress = {10.1.1.220} <-- parameter has been changed MACAddress = {00:40:01:20:66:CF} Netmask = {255.255.255.0} Password = {unixwiz} PrinterName = {1P_PrintServ2066CF}
Download the program here:
Navigate: More Tools