Jonathan Fabrizio
Visitor

HP LaserJet 1020 connection over network

Jonathan Fabrizio - 09/03/13

I tried to connect my HP LaserJet 1020 over a USB printer server and it does not work. Many people over Internet complain about this difficulty but I found no solution on Internet. After few tests, I found how to make it works. I am very happy (and a bit proud). I want to share my solution to help other people to connect this printer (and I think this solution can work for other printers).

J'ai voulu connecter mon imprimante HP laserJet 1020 à l'aide d'un serveur d'impression USB (plus exactement ma Freebox) et ça n'a pas fonctionné. Après recherches sur internet, j'ai vu que beaucoup de personnes ont essayé mais sans succès. Après quelques tests, j'ai fini par trouver une solution. Je suis vraiment content d'avoir trouvé (fier ?). Je vais essayer de décrire et problème et partager ma solution – si ça peut aider d'autres personnes... Je pense que cette solution est applicable à d'autres modèles similaires.

Long time ago/Il y a longtemps

I set up an old computer to have, among other, a print server on my lan. I had some difficulty to configure my HP LaserJet 1020 under linux at the beginning. In all cases, I learned that, each time the printer starts, the driver uploads the firmware of the printer into the printer (this is the reason why the printer blinks and makes noise à statup). If not, the printer does not work. Each time, the printer is switched off, all is lost and the upload must be done again.

J'ai configuré une veille machine sous linux pour qu'elle fasse, entre autres, serveur d'impression. J'ai eu un peu de mal avec la HP LaserJet 1020 à l'époque à cause des drivers linux (depuis je n'ai plus de problème). En tous les cas, j'ai appris une chose : à l'allumage de l'imprimante, le driver upload le firmeware de l'imprimante dans l'imprimante, sans quoi l'imprimante ne peut fonctionner – c'est pour cela qu'elle se met à clignoter en faisant du bruit, une seconde ou deux après l'allumage. A chaque fois que l'on éteint l'imprimante, c'est perdu et il faut recommencer à l'allumage suivant...

The problem/Le problème

Yesterday, I connect the printer to a modem with an usb print server (the Freebox). It is simpler and cheaper than with a PC but it did not work. After spending time looking for a solution over internet, nothing. A lot of people have the problem but no solution has been proposed. My hypothesis is that the problem comes from the firmware upload. When the printer was connected to a PC, the driver could upload the firmware but now, the server printer can not. How to validate my hypothesis? Ok, a simple test: I plug the printer to the computer, start the printer and the driver upload the firmware. Then, without switching off the printer, I unplug it and plug it to the server printer. I start a printer Job, it works ! My hypothesis is valid. The problem now is whenever I switch off the printer, everything is lost...

Hier j'ai connecté l'imprimante à la Freebox, cela étant plus simple et plus économique que de faire tourner un pc pour qu'elle soit accessible mais ça n'a pas fonctionné. Après une recherche sur internet, rien. Même si le problème est posé par pas mal de personnes, pas de solution. Mon hypothèse est que le problème viens du chargement du firmware. Lorsqu'elle était connectée à un pc, le driver pouvait charger le firmware. Maintenant, ce n'est plus possible via la Freebox. Mais comment en être certain ? Aller, un test rapide : je branche l'imprimante au pc, j'allume l'imprimante ; le firmware se charge. Sans éteindre l'imprimante, je la débranche et la branche à la Freebox. Un test d'impression – ça fonctionne ! Mon hypothèse est bonne ! Seul problème, dès que j'éteindrai l'imprimante, cela ne fonctionnera plus...

A solution/Une solution

I have to upload the firmware into the printer. I know it can be done manually cat firmeware > /dev/usb/.... Maybe I can do the same through the network ? Well, the printer is plugged to the server. To clean the memory and to be sure it does not have the firmware, I restart the printer. Look for the file with the correct firmware: I took it from foo2zjs – downloaded with getweb. I must send this file through the network on server port (9100 for Freebox). I can write a program for that or, as I am under linux, I can use the netcat command that does the job for us:


nc mafreebox.freebox.fr 9100 < sihp1020.img

Nothing. The printer does not react. Let's try again with the firmware that comes with hplip:


nc mafreebox.freebox.fr 9100 < hp_laserjet_1020.fw

Bingo! The printer starts!!!! Let's print a test page … and … suspense … Houra! It works!

Il faut pouvoir charger le firmware dans l'imprimante. Je sais que, sous Linux, certains chargeaient le firmware à la main directement en faisant cat firmeware > /dev/usb/.... J'arriverai peut être à le faire au travers du reseau ?

L'imprimante est branchée au serveur, faisons la redémarrer (pour être certain qu'elle n'ait pas le firmware en mémoire). Cherchons dans les drivers le fichier qui contient le firmware. Prenons celui de foo2zjs - téléchargé à l'aide de getweb. Il faut envoyer le fichier sur le réseau sur le port du serveur d'impression de la freebox (9100). On peut écrire un programme pour faire cela ou, si on est sous linux, utiliser la commande netcat qui fait cela pour nous.


nc mafreebox.freebox.fr 9100 < sihp1020.img.

Rien. L'imprimante ne réagit pas. Essayons avec le firmware fournit par hplip :


nc mafreebox.freebox.fr 9100 < hp_laserjet_1020.fw

Bingo ! L'imprimante réagit !!!! Test d'impression sur le serveur... et … suspense … Houra ! Ca fonctionne !

A short explanation/Une courte explication

Why did it not work with foo2zjs driver ? To find the answer, look at the files with ghex.

Pourquoi cela n'a pas fonctionné avec le driver foo2zjs ? Pour le savoir ouvrons les avec ghex et regardons le contenu des fichiers.

An ELF file ! / Un fichier elf

hplip file encapsulate the firmware by the instruction needed for the firmware upload.

Le fichier fournit par hplip encapsule le firmware par l'instruction nécessaire au transfert du firmware. C'est pour cela que ça a fonctionné...

(See/Voir Printer Job Language Technical Reference Manual, arm2hpdl)

Conclusion/Conclusion

J'ai décrit ici un moyen pour connecter une imprimante de la famille des HP LaserJet 1020 sur un serveur d’impression (notamment une Freebox). Cette procédure est un peu lourde vu qu'il faut manuellement envoyer le firmware à chaque démarrage de l'imprimante avant de pouvoir imprimer (mais c'est mieux que rien ?!). J'ai pour l'instant l'impression que certaines fonctionnalités ne fonctionnent pas (comme le mode éco) donc affaire à suivre. C'est déjà pas mal comme ça car ce n’était pas gagné d'avance. J’espère que ces quelques lignes vous aiderons.

I describe a solution to connect a HP LaserJet 1020 to a network server (Freebox in my case). This solution is not perfect as I have to upload manually the firmware of the printer every time the printer starts before being able to print (However, it's better than nothing). It works - but the draft eco mode seems not to work properly (to be continued). In any case, it is a good step as it was not an easy one. I hope these few lines will help you...



Viewed 5180 times