DESCRIPTION This is a command-line Java application that implements a simple send-expect response engine. I wrote it to help with resetting the Dallas Semiconductor TINI board, as an alternative to the graphical JavaKit application (which is cumbersome to use over a slow link, and requires interactive input). I use it to clear the heap, start slush, change the root password and host name, and set the IP address. (From there, you can use telnet/FTP to do the rest.) This version has been tested with RedHat Linux 5.2 and 6.1 using the Rev. F TINI 390 board running the Beta 2 firmware. Your mileage may vary; please let me know if you find problems or have suggestions for improvements! INSTALLATION AND USAGE If you can run JavaKit, you should have all the prerequisites necessary to run TINITalk as well. First, edit TINITalk.java and uncomment the "static String portName" line that's appropriate for your platform. (Change term/a to term/b or COM1 to COM2 as appropriate, etc.) Then compile the class file with "javac TINITalk.java". The command file contains one expect+send pair per line. The "expect" part is very simple: we expect the first character of the line. [The code is "optimized for speed of implementation". ;-)] The "send" part is the remainder of the line, as follows: - if the line ends with a backslash (\), send it as-is - otherwise, send the line plus a trailing carriage return - this means if the line is empty (i.e., it contains only the "expect" character), only a carriage return will be sent I have shipped the file "clearheap.txt" which does the "B18 F0" that clears the TINI heap, wiping out the filesystem and restoring the board to a clean state. (It then sets the root password and IP address.) If you want to use this, you'll need to edit this file to fill in the appropriate parameters in . Run the application by specifying the name of the send-expect command file as the only argument, e.g.: "java TINITalk clearheap.txt" The TINI board output is sent to stdout, and send-expect engine logging (comments in {curly braces}) is sent to stderr. TROUBLESHOOTING If TINITalk fails to work, try connecting with JavaKit and typing the same commands manually, to eliminate any problems with your cable, etc. There is almost no error checking in the code! (It's such a simple utility it didn't seem worth it to me.) You may want to fill in the "catch (...) {}" statements with real code if things aren't working, to find out why. Patches cheerfully accepted! DISCLAIMER This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. (Read further terms in the TINITalk.java file.) As they say, "if it breaks, you get to keep both pieces". VERSION, AUTHOR AND LICENSE Version 1.1 Oct 8 1999 Brent J. Nordquist Based on Sun Microsystems "SimpleRead.java" and "SimpleWrite.java" examples (see TINITalk.java for license).