|
I've been receiving a load of new hits on this LJShen page, links from somethingawful, halfbakery and a number of other sites. It's nice that you are finding use for this shen, and since my bandwidth costs are a little less than yours, I don't ask you to fork over $9.95 or whatever for access. A nice comment in the guest book wouldn't be out of order, though! After all, you never call.... |
[March 31, 2005] An Application note, left in the Guestbook [hint, hint!] by Mark the Wolf of Phoenix...
Well, I figured out how to make the Laserjet Message Shen
work over the network. It really was tough to figure out, but once I
got it, it was a cinch. The command is:
ljmsg YOUR MESSAGE HERE >//hostcomputer/printershare
Where printershare is the name it is shared under.
Thanks, Mark
[October 2000] I have tightened the c code below a bit.
I have also decided, not without angst, but in the face of myriad requests, to post downloadable executables and other files for the shen. You may have to press SHIFT as you click on the links to perform a to-disk download of:
ljmsg.c - the source code below
ljmsg.exe - a wintel executable of the source code
ljmsg - a Solaris executable of the same source
Please be sure to read and understand (and compile yourself if possible) the code I have posted. All use of these programs is at your sole risk. "Park and Lock it! NOT RESPONSIBLE" [Find a cheap c compiler at MIX Software (no relationship to me!)]
You may email your thanks, comments, but not complaints to mhofer@ancientpond.com
Compile the above, name it ljmsg (or on a Winbox ljmsg.exe) and invoke it with a message on the command line, sending the output to the printer:/* ljmsg - format a readymessage for a laserjet 4si or later model */
#include <stdio.h>
void
main(int argc, char **argv) {
int i;
printf("\33%%-12345X@PJL RDYMSG DISPLAY=\"");
for (i = 1; i < argc ; i++) printf("%s ",argv[i]);
printf("\"\n");
}
*nix: ljmsg foo bar shoe doobie | lp -o nobanner
win: ljmsg foo bar shoe doobie > prn:
Every so often a line or two comes through the news group Alt.Shenanigans about the LaserJet Shen where odd messages appear in the LCD window on the front of a LJ 4si.
The LJ has a number of legitimate messages built in that pop up in cases of low toner, paper out, paper jam, etc. There is one message that appears while there is no error condition: READY. This "Readymessage" indicates that everything is fine, and no intervention is necessary. Now, what a lot of people don't know is that this message can be programmed, by sending a simple escape string to the printer:
{escape}%-12345X@PJL RDYMSG DISPLAY="YOUR MESSAGE HERE"
where {escape} is really the escape character, etc.
#!/bin/sh
echo "{escape}%-12345X@PJL RDYMSG DISPLAY=\"$*\"" | lp -o nobanner
This takes all arguments, quotes 'em and sticks them into the appropriate string, and then pipes the result to the printer. Works great!
Not an entirely
dumb question.
But my biggest problem is what to say! So, after posting a bunch to a.s., I decided to list all of the responses I got, and then direct others to this page. Here you go:
"I've noticed that on our LJ 5/5M, 16 chars is the maximum static display, and that messages of up to 40 chars can be displayed. The printer automatically scrolls messages longer than 16 chars."
[Some of these are marginal, but others funny!]
For those of you suggesting obscene messages or "real" error messages to get people to change toner carts (or whatever) when it isn't necessary, I have only one comment: Please re-read the FAQ (thank you Mr. Moncour!) especially where a shen is defined and compared to pranks, practical jokes and revenge. If you still don't get it, then the alternate message is: grow up.
I'm always interested in your lines as well! Please email to me, below...