Creating a /dev/prolite Device on LinuxCreating the device is as simple as figuring out what serial port you've got the sign hooked up to. For instance, COM1:
If you are brave, you can give the world read/write access to your sign. This may be important, especially if you are using a web server to update the sign.
Configuring the Communication SettingsCommands can be echo'd to the ProLite once the terminal is properly configured (9600,N,8,1):
$ echo "<ID01><PA>Your Message Here" > /dev/prolite
Binary Access to the DeviceIf you are intent on sending the Control-M Control-J terminators yourself, the serial port will accomodate that as well (9600,N,8,1):
Avoid Using EchoThis tip comes from Steve Baker, who points out that it is necessary to add -echo, otherwise the sign's reply of <ID01>\r\n gets echoed back to the sign, which the sign thinks is an empty wakeup command, so it sends another, and an infinite loop results.
Steve also points out that it should be emphasized that you should wait for the sign's reply. Some commands take a while to respond, and if you send another command while the sign is still thinking about the prior one, it can screw up the sign's internal state.
Wait Between CharactersIt should also be pointed out that it's very easy for the computer to outrun the sign, even at the specified baudrate and settings because there is no flow control in either hardware or software. In some cases, you may want to consider the sign a write-only device, pausing several milliseconds between sending characters. Waiting momentarily between commands is also advisable.
A Suggested Script FormatThis tip comes from David McInnis. He suggests that setserial is not sufficient for setting the baudrate, and that stty must be used.
His bash script has three steps:
This technique allows for easy debugging, because the content for the sign is kept separate from the delivery mechanism.