Index
General Information
Credits
To Do List and Known Bugs
Menu
Command Area
Hot Keys
Tabs
Terminal Area
Status Bar
Programming
Command Mode
Auto Answer
BeanShell
Change Log
Installation
General Information
SerialAnalyzer
is a programm mainly conceived to monitorize exchanged data on
the serial line. Its first evolution allowed also the data
forwarding as a normal PC and it finally evolved as far as including
the TCP/IP connection as well as the server function.
Its mainly characterics are therefore:
- Java developed programm which, thanks to different
libraries for the serial connection, enable the usage with different
operating systems (i.e.Windows, Linux and MacOsX);
- "Client" connection with serial, Tcp/IP, UDP and MULTICAST connection with bind option;
- Visualization and setting out of control signals of the serial line;
- Different modes of visualization of received/sent data:
- ASCII visualizes data using Ascii code. By using this mode the possible control characters (type CR or LF)
will be viasually interpreted according their characteristics (i.e. CR starts a new paragraph);
- HEX visualizes data in exadecimal mode;
- DECIMAL visualizes data in decimal mode;
- CTRL -->HEX data between 0x20 (space) e
0x7E (~) will be visualized in Ascii code, whereas the others in exadecimal mode;
- ASCII & HEX data will be visualized both in exadecimal and in Ascii code (data which are less than 0x20 and more than
0x7E will be visualized as a space);
- Different colour for sent and received data;
- Optional recognisation of two different "frame header"
for an easier data interpretation. The "New Frame" message
is viasualized with a different colour; moreover one can choose if also
date and time are visualized or the difference (expressed in
milliseconds) from previous frame, or absolute time in minutes;
- Automatic reply to a identified frame with a by user choosen frame, which can also include parts of received data. Since version 2.7.0 you can define many automated answers acknowledging the received data;
- Twelve fields where setting out data sequencies to be sent simply pushing the relative function button. Since version 2.7.0 you can map a sequence to each key enabling the Command Mode;
- Saving on file of all what will be received and transmitted;
- Textual search in the terminal area;
- Data copy in the Clip Board terminal area;
- Data sending of ClipBoard data;
- Scroll stop;
- Server Tcp/Ip or Udp function, from the list of connected
clients you can exclude a communication with a specific clients by using a check box.
For the Tcp/Ip server there are three different ways:
- TERMINAL the same Server will also used as a terminal (the client connection is disabled) and transmitted data is sent to all connected clients;
- ECHO, like manner TERMINAL the difference is that the data received from a client are sent to all other connected clients;
- BRIDGE, like manner ECHO with ab option to make also a client connection.
In this mode you can make a bridge between a Tcp/Ip server and a serial connection.
For the Udp server is available only the TERMINAL mode that works as the Tcp/Ip server;
- Included Ascii codification table;
- All settings are saved on a properties file;
- Programming mode to make repetitive operations easier;
-
Implementation of BeanShell that allows to create of true and own programs in Java
to execute from "HotKeys" or from appropriate menu
Of continuation some typical applications:
- Calculation of the checksum of the frame given to send;
- Verification of the calculation of the checksum of the data received;
- Program for the upload/download of data;
- Client Tcp/Ip conection bridged with a serial connection;
- "Line Mode" option for send the data only after pressing the Enter key;
Credits
Special thanks to Mario Gambino (mario.gambino-sr77@poste.it)
for his advice, debug
and the installation tool he configured.
To
Do List and Known Bugs
To Do List:
- implement the plug-in structure;
- to be able to change the parameters of the connection from the scripts in BeanShell;
Known Bugs:
-
Since version 2.6.0 has been introduced the selection of the Look&Feel
from a list containing the Look&Feel installed in the system.
The list of installed Look&Feel is done by analyzing all files "jar"
in the folder "JAVA_HOME/lib/ext" and this, particularly on older
computers, can take a long time at start of SerialAnalyzer.
If you need to speed up the start of the program you can delete the library
"JcLafChooser.jar" in the directory "lib" where you have
installed the SerialAnalyzer.
Removing this library is no longer made the search for Look&Feel and you
can choose only between the Look&Feel automatically recognized by Java;
-
By pushing the "F10" button on keyboard, "File" menu will be opened
I think it is a problem of Java;
Menu
Menu' functions:
- FILE:
- LOAD to load the configuration file;
- LOAD LAST PROPS to load last configuration file used in the previous session;
- SAVE to save the configuration file;
- NEW INSTANCE in order to start one new instance of the SerialAnalyzer;
- EXIT exits the programm;
- EDIT:
- FIND to execute a text research of visualized data in terminal area (enabled only with closed connection);
- HIGHLIGHTS to perform a text search on the data displayed by highlighting them and choosing all the colors (enabled only with closed connection);
- COPY to copy in the ClipBoard the selected data;
- SELECT ALL & COPY to select and copy in the ClipBoard all visualized data;
- PASTE to forward all in the ClipBoard contained data;
- LINE MODE for send the data only after pressing the Enter key;
- COMMAND:
- COMMAND MODE check box to enable Command Mode;
- STOP SCROLL check box to stop scroll of terminal area;
- Open/Close CLIENT button to open/close the CLIENT connection;
- Start/Stop SERVER button to start/stop the
Tcp/Ip Server;
- Start/Stop LOG button to start/stop the file recording of monitorized data. When start the log is request the file name of the log;
- CLEAR button to cancel visualized data;
- SEND BREAK to send the BREAK signal on the serial line;
- PROGRAM:
- START to start programm;
- STOP to stop programm;
- OPEN to load programm file;
- SAVE to save programm file;
- COMPILE to compile programm file;
- TOOLS:
- ASCII TABLE visualizes the Ascii codification table;
- STD OUT/ERR WINDOW open a window where it comes redirected it the Standard Output and
the Standard Error (useful for the development/debug of the scripts in BeanShell);
- STOP SCRIPT in order to arrest to the execution of one script in BeanShell;
- MENU PERSONALIZZATO they come automatically created of the menu personalizes
to you with the names of the directories and the contained files in order to recall the scripts in BeanShell;
- SELECT PROGRAM SCRIPT in order to select one script in BeanShell to use
in programming. Once selected in the clipboard of system it comes paste the string
it that it allows to recall the script from HotKeys or Programming
- REFRESH SCRIPT MENU for update the script list without restart a program;
- VIEW:
-
Borders, show the edges of the buttons;
-
Buttons, show buttons connections, logs and cleaning terminal area;
-
Hot Keys, show "Hot Keys" buttons;
-
Status Bar, show the status bar with the connection parameters and properties file name;
-
Tx Data, enables viewing in the terminal area of the transmitted data,
useful option in the case of connection with devices that
automatically perform the echo of received data;
-
Text Dimension to select the font size used in the terminal area;
-
TX Text Color to select the text color of the transmitted data (parameter saved in global "ini" file);
-
RX Text Color to select the text color of the received data (parameter saved in global "ini" file);
-
System Text Color to select the text color of system messages (parameter saved in global "ini" file);
-
Background Text Color to select the background color of terminal area (parameter saved in global "ini" file);
-
External HotKeys Panel to display a panel, detached from the main frame, with the 12 buttons of HotKeys. Each button takes the name of the comment;
-
External Modem Status Panel to display the panel with the status of the modem is no longer in the tab but detached from the main frame;
-
Always On Top to see the program always on top;
-
Look & Feel to select the LookAndFeel to use (parameter saved in global "ini" file);
-
Control Dimension to disable the control of the minimum size of the main frame;
- HELP:
- HELP visualizes this file:
- SYSTEM INFO visualizes a series of system parameters;
- ABOUT visualizes date and version of release and the licence;
Command Area
Command area functions:
- STOP SCROLL check box to stop area data scroll;
- COMMAND MODE check box to enable Command Mode;
- Open/Close CLIENT button to open/close the Client connection;
- Start/Stop SERVER button to start/stop Tcp/Ip Server;
- Start/Stop LOG button to start/stop the file recording of monitorized data. When start the log is request the file name of the log;
- CLEAR button to cancel terminal data information;
Hot Keys
In this section compare the twelve
function buttons to be recalled from keyboard and mouse in order to
send defined strings. Each button corresponds also to a visualized
comment, which automatically breaks out when getting with the mouse
cursor to the relative function button.
Is possible to call a BeanShell script inserting the string "bsh(folder/filename)".
Tabs
This section includes Tabs to select the different screen visualizations:
- Terminal: Area where MAGENTA coloured transmitted data, Blue
coloured recived data and new frame Red coloured data will be
visualized;
- ModemStatus: in this window it is possible to see the state of control signals of the serial line and to force RTS e DTR
as you like. These data will not be saved in properties file;
- ServerStatus: in this window it is possible to see the list
of clients connected to server.
In tcp/ip mode when selecting the check box "Exclude" the selected client is
excluded from data exchange, though maintaining the connection open.
If at least one connection is "Excluded", each new connection will be
automatically excluded from data exchange;
In udp mode when selecting the check box "Exclude" at the next transmission the
selected connection is cleared from clients list.
- Hot-Keys 1: (function buttons from 1 to 6): one can insert
a string which later will be forwarded by using the relative funtion
button. It is possible to insert directly Ascii
"A" characters, decimal characters "<065>", as well as exadecimal
characters "[41]".
- Decimal characters are contained between minor and major
symbols "<" and ">": the number must be always keyed by using
three characters;
- Exadecimal characters are contained between [ and ] brackets and the number must be always keyd by using two characters;
- Hot-Keys 2: (function buttons from 7 to 12): as Hot-Keys 1;
- Setup: Connection and visualization parameters configuration window:
- CLIENT setting up of serial client Tcp/Ip parameters;
- SERVER setting up of parameters in server mode;
- VIEW MODE setting up of parametrs for
visualizationg mode and definition/activation of the two strings which
constitute a protocol "Frame Header". This string can be
defined by using only decimal or exadecimal characters (same procedure
for Hot-Keys), and its max. lenght is 10 characters;
-
The acknowledgment of the "Frame Header" only works on the data received.
For the transmitted data is present a dedicated abilitation and comes
automatically considered "New Frame" every time that is carried out the
transmission from "HotKeys" or from "Programming".
The data send to you through the single keys from the area "Terminal"
do not concur to the acknowledgment of the "New Frame".
- The conversion of the control characters used to convert a character in a name and it is possible for the characters between 0x00 and 0x1F.
The name is the same in the column "note" of the ASCII table and can not be changed.
In the "CTRL char:" field insert characters (in decimal or hexadecimal format used in the Serial Analyzer) that you want to convert to names.
For example, entering [02][03] when you receive the 0x02 character displays the name STX and when you receive a 0x03 character displays the name ETX.
- AUTO ANSWER to set up the parameters for an automatic
reply. It is necessary to define the string which will have to
recognize the protocol end frame (like the string which recognizes the "frame header"),
and it is also possible to indicate the number os characters
to be considered after the frame end recognition and before sending the
automatic reply. Then a reply string must be also defined, which can be
composed like the "Hot-Keys", with a further possibility of replying
using characters received from frame (i.e. a dispositive address),
indicating the character position in the frame by using {}
brackets. For example, if we want to insert in our reply the 2' byte
received we should write {001}. We must digit 001 because counting from 0.
BE CAREFUL! For a properly functioning of the automatic reply
we must also set the parameters for the frame header recognition;
- PROGRAM CODE is the programming editor;
Terminal Area
In this section will be visualized
all data which were received and forwarded through Hot Keys
programming, or data directlu keyed in this area. It is moreover
possible to forward directly from keyboard all Ascii characters from 0
to 31, simply pushing CONTROL button at the same time. (as identified
in the Ascii table). For example, in order to forward a character
with code 3 (equivalent to CTRL-C) push button "CTRL"
+ button "c".
Since version 2.7.0 was introduced the option "Command Mode" which allows you to associate at each key a sequence of data to send.
Obviously, when this option is enabled as described above, only for data transmitted, it is no longer valid.
Status Bar
The Status Bar displays the following information:
- LED that indicates whether you are running a "program" or a "script" in BeanSheel;
- string that summarizes information about the client connection;
- name of the configuration file loaded, when displayed in red color means that has been modified and has not yet been saved;
Programming
From version 1.7.0
has been introducted the possibility of creating a programm which can
automatically execute repetitive operations.
After having keyed the code lines, it is necessary to execute the
"compilation", both to control possible mistakes, and making
effective the modifications brought to the programm. When the
programm is loaded from file, this will be automatically compiled.
Here are some rules to be followed during programming:
- There can be some empty lines which must begin with "//";
- Lines that begin with character ">" refer to the association key=command of "Command Mode" introduced since version 2.7.0;
- Lines that begin with text ">aa=" are referred to the "Auto Answer" introduced since version 2.7.0;
- All lines which contain a code must begin with a line
number (increasing) composed by a minimum of one until a max. of 5 figures;
- After the line number the character ":" must be inserted to separate the instruction field;
- Only one instruction for each line is allowed;
- Each instruction must be inserted betwenn the ");"
characters and no further comments are allowed. Consequently it is not
possible to insert in the parametrs field the sequence ");" which
must be eventually exchangend through a decimal and/or exadecimal;
- Fields composing the instructions must be separated from the character ",";
- There are ten numeric whole variables available (therefore 4 byte with sign)
on which it is possible to make sums, comparisons and forwarding.
These variables are identified, within their instructions, with a number from 1 to 10;
- add(x,y); adds to the numeric variable a constant.
- x = variable number 1-10;
- y = constant numeric date to be added;
- enableSendDisplay(x); to enable (x = true) or to
unable (x = false) the visualization of forwarded data. This instruction
has been added since the visualization (when lots of data are present)
keeps the CPU very busy and in some cases this can disturb;
- enableRxDisplay(x); to enable (x = true) or to
unable (x = false) the visualization of received data. This instruction
has been added since the visualization (when lots of data are present)
keeps the CPU very busy and in some cases this can disturb;
- enableStep(x); to enable (x = true) or to
unable (x = false) the execution step by step of program code;
- end(); identifies the end of the programm and must be
always present. It can be useful during programm end trials,
before the real ending;
- goto(x); loops to line X;
- if (x,y,z); makes a comparison between a x numeric
variable and a z constant, applying y comparison.. If comparison is
true, the following line will be executed, otherwise not;
- x = variable number 1-10;
- y = type of comparison <, >, <=,
>=, ==, != ;
- z = constant numeric date to be compared;
- ifVar(x,y,z); makes a comparison between a x numeric variable and a z constant,
applying y comparison.. If comparison is true, the following line will
be executed, otherwise not;
- x = variable number 1-10;
- y = type of comparison <, >, <=,
>=, ==, != ;
- z = variable number 1-10;
- set(x,y); sets a numeric variable x with a constant y.
- x = variable number 1-10;
- y = numeric constant date set in the variable;
- send(string); sends string. As per HotKeys
it is possible to send also data in the decimal format <001> and/or exadecimal [02] togheter with normal Ascii characters;
Is possible to call a BeanShell script inserting the string "bsh(folder/filename)".
- sendHK(x); sends the memorized string to the HotKeys x;
- sendK(x); sends the string associated at key "x" of "Command Mode"
Since Version 2.7.0
- sendVar(x,y,z); sends the numeric variable data x to
the modality y with bytes/characters number z. To be precise, lot of
modalities are offered to convert the variable date so that the
manging and sending of variable can be more flexible.
- x = variable number 1-10;
- y = conversion modality:
- ASCII the numeric date will be sent with a string. For example if the variable is 65, the sent string is "65";
- ASCII_HEX the numeric date will be converted
into an exadecimal and sent as a string.. I.e. if the variable is
65, the sent string is "41"; öne more example; if the
variable is 2748 the sent string is "ABC";
- BIN the numeric date is sent to byte as true
numeric date. I.e. is the variable is 2 the sent data is 2 binary;
- Z = number of sent byte/characters. This parameter allows, according to the modality, to determine the lenght of sent date:
- ASCII mode determines how many characters the string is composed of:
- 0 = automatic characters number;
- 1-10 = determines the characters exact number,
and the possible lacking characters are sent as '0': over characters will not be sent;
- ASCII_HEX mode determines how many bytes will be sent:
- 0 = automatic byte number;
- 1-4 = determines the bytess exact number: over bytes will not be sent;
- BIN mode determines how many bytes will be sent:
- 1-4 = determines the exact bytes number;
- setSleep(x); sets time in minutes (da 10 a 60000)
of thread sleep. Of default each instruction will be executed every 100m;
- sub(x,y); substractes to the numeric variable a constant:
- x = variable number 1-10;
- y = constant numeric date to be substracted;
- wait(x); waits for x mS (da 10 a 60000);
- waitOk(message); visualizes a message dialog with
the user's message, who can choose if going forward or cancelling the
programm;
Programming ezample (send the string "ciao x" ten times, substituting to x the sequentioal number from 1 to 10):
// set the variable 1 to 1
10:set (1,1);
// send "ciao" string
20:send (ciao );
// send the Ascii converted date of the variable 1
30:send Var(1,ASCII,0);
// send a CR LF into exadecimal
35:send ([0D][0A]);
// increase the variable 1
40:add (1,1);
// compare if the variable 1 is <= a 10
50:if (1,<=,10);
// true comparison, get back to line 20confronto vero;
60:go to (20);
// false comparison, end of programm
100:end ();
Command Mode
Since version 2.7.0 of SerialAnalyzer has been added the mode Command Mode selectable from check box CmdMode or from menuCommand.
The default mode is Terminal Mode, in this mode by pressing a button is displayed and sent to the open connection to character referred to the key pressed.
In the mode Command Mode can be associated with each key a sequence of characters to send the connection open as for the definition of the function keys Hot Keys. In this way you can expand almost indefinitely a list of sequences retrieved with the push of a button.
The definition of the association key=command is made in the Programm editor with the same basic rules used for the programming, including compilation.
The differences are as follows:
- You can have a single program file that contains both the program and the definitions of Command Mode and the definitions of Auto Answer;
- the line must begin with the character ">" followed by the letter that identifies the key and the character "=";
- after the character "=" defines the sequence of characters associated with the previously defined key;
- characters can be used to bind the key on the keyboard are all understood the distinction between uppercase and lowercase. May not be used function keys, cursor keys , the sequences with the CTRL or ALT;
- the definition of associations must end with the statement end(); as for the normal programming;
- after changing the definition is necessary to compile the program. When the Command Mode has enabled the compilation is done automatically by selecting the TAB Terminal;
Example program file with the definition of two commands associated with buttons a and A:
>a=sequence associated with the key a lower case
>A=sequence associated with the key A upper
100:end();
Auto Answer
Since version 2.7.0 of SerialAnalyzer is now possible to automatically send the answers by analyzing the data received. In fact this feature was already present (and remained) but did not allow the flexibility introduced now.
In fact, you must define the exact sequence of data to recognize and answer to it.
These definitions are made to the Programming editor with the same basic rules used for programming, including compiling and using the definition of keys of Command Mode.
The differences are as follows:
- You can have a single program file that contains both the program and the definitions of Command Mode and the definitions of Auto Answer;
- the line must begin with the characters ">aa=" followed by the letter that identifies the key associated with the response and the character "=";
- after the character "=" is defined as the sequence of characters to be recognized in order to send the reply button associated with the previously defined;
- see Command Mode for more information;
Example program file with the definition of two different responses of the buttons a e A:
>a=sequence associated with the key to lower case
>aa=a=received a character, I respond with a sequence from the key a
>A=A key sequence associated with the upper
>aa=A=A character received, reply with sequence from the key A
100:end();
BeanShell
From version 2.1.0 of the SerialAnalyzer it is be implemented the interface with the
program, always in Java, BeanShell that allows to construct of the scripts in Java
called from the SerialAnalyzer so as to to allow to integrate functionality
personalized to the SerialAnalyzer.
An example much simple one is the calculation of the checksum. All the protocols
of communication have a field with the checksum of the frame.
From the SerialAnalyzer it is possible to insert this data, but it goes calculated
manually and if we are worth a single byte of the frame we must update also the
data of the checksum. With a script in BeanShell simple one is possible to automate this operation in way much.
For the relative instructions of BeanShell can be consulted relative documentation
at the address http://www.beanshell.org/
During the phase of development/debug of a script in BeanShell, it is advised to
open also the window where it comes redirected the Standard Output and the
Standard Error (Menu - > Tools - > StdOut/Err Window) so as to to verify all the
messages of error that BeanShell gives back.
Hour we analyze the implementazione of the BeanShell with the SerialAnalyzer.
In the first place it is necessary to specify that scripts are two modality in
order to execute one: from menu "Tools" or "HotKeys" (it can be recalled also
from the tool of programming integrated in the SerialAnalyzer and works like the HotKeys).
This distinction has been made in order to cover various requirements.
In the folder where it is installed the SerialAnalyzer comes created a folder
"bsh" that in its turn it is divided in "menu" and "prog" in order differentiating
the scripts called from menu and those from programming/HotKeys.
From these folder they must obligatorily be created of the own ones folder in
order to divide in categories the various scripts. As an example it can be created
a folder "Checksum", is under the folder "menu" that under the folder "prog", and
be put the files here to us containing the scrip which must have the extension "bsh".
Under the folder "menu" a single level of folders can be created, while under the
folder "prog" more levels can be created than folders that obviously they must
be written when the script is recalled.
The folders, and the scripts, created under the folder "menu" come automatically
visualize to you like voice in menu "Tools" of the SerialAnalyzer (if new
folders or files are created it is necessary to restart the SerialAnalyzer in order to
see modernized the voices of the menu).
I, as an example, have inserted a script for the calculation of the checksum that
reads the data that I have previously selected from the window "Terminal" and
visualizes me the result in a JOptionPane.
On the contrary of the folders and the scripts created under the folder "menu",
folders and the scripts created under the folder "prog" they are not visualizes
to you in the menu, but scripts are called only from "HotKeys" inserting
the word key "bsh(folder/script)". As "folder" agrees the first one, or more levels,
after the folder "prog" (than therefore it does not go written), while for "script"
the name of the file of the script without extension agrees. Attention to respect
capital and very small letters like the name of the file. For the separator of
the file "/" it can be used "/"or" \ ", it comes then automatically
adapted to the used operating system.
From version 2.2.0 is possible to call scripts present in the same folder of
properties file.
The scripts must be puttinges in a folder ?SaBsh? where the two usuals folders
?menu? and ?prog? must be present. In the folder ?menu?, on the contrary of that
present in the folder of the SerialAnalyzer, others folders cannot be created,
all scripts called from menu must be in this folder.
When load the properties file from a different folder of start of the SerialAnalyzer,
the program automatically tries the scripts and, if present, it enable in menu
?Tools? the voice ?PropertiesPathScript? with the list of scripts.
For the scripts called from programming/HotKeys the symbol "@" must be put before
the name of the script, as an example bsh(@folder/script);
Attention, with the operating system Linux I have noticed that if the SerialAnalyzer
comes executed from shell with the command "java - jar SerialAnalyzer.jar" all
works correctly and the property of system (Java) "user.dir" point correctly to the
folder where it is present the file "SerialAnalyzer.jar" and therefore the program
sees the folder correctly "bsh" where the scripts in BeanSheel are present.
If instead the file "SerialAnalyzer.jar" it comes executed with a double click
from the files browser, Konqueror, Nautilus, etc etc, the property of system
(Java) "user.dir" point always to home of the user and therefore the program
does not find the folder "bsh" and consequently the scripts in BeanShell.
In order to verify the value of the property "user.dir" from the SerialAnalyzer
it must select the voice "System Info" in menu "Help".
In order to facilitate the choice of the script, in "Tools" menu it has been
inserted a voice "Select Program Script" that allows to be navigate in the
folder "prog" of the scripts and to select one script. Once selected the script
comes automatically paste in the Clipboard the string in order to recall the
selected script, as an example "bsh(Checksum/Crc16)".
When it comes called a script, the SerialAnalyzer puts on hand of the references
to variable and the methods that hour we will go to analyze.
Vars reference:
- parent = it represents the class "BeanShellCaller" used from the SerialAnalyzer
for call the script. It is necessary to make reference "parent" in order
calling all the methods that the SerialAnalyzer puts on hand
- parent.jFrame = it represents the reference to the JFrame of the SerialAnalyzer
for to use the GUI in the script (as an example in order to center the JOptionPane);
Method reference:
- String getSelectedText() = it returns in one string the data selects to you in the window "Terminal";
- Vector stringToIntDataVect(String) = it returns in a Vector of Integer the
binary data you are converted from the string of text ascii with the conventions
in order to represent the data used from the SerialAnalyzer ([02] for the
exadecimal data and <002> for that it decimates them);
- String intToString(int) = returns an ascii string, in the CTRL -->HEX
format, of the integer binary data;
- Vector getApplicationDataVect() = return a Vector of Integer of binary
data from the SerialAnalyzer. In particular
they are those data inserted before the call to the script. As an example if we
define the key "F1" with following string "[02]provabsh(Checksum/8bit)",
calling this method from the script comes given back to me, in binary shape, "0x02 0x70 0x72 0x6f 0x76 0x61".
- String getApplicationDataString() = return a ascii string, in the
CTRL -->HEX format, of the data from the SerialAnalyzer. In particular
they are those data inserted before the call to the script. As an example if we
define the key "F1" with following string "[02]provabsh(Checksum/8bit)",
calling this method from the script comes given back to me exactly the same
string "[02]prova".
Since version 2.6.1
- setScriptDataVect(Vector) = it gives back to the SerialAnalyzer a Vector of
Integer containing the binary data to send as a result of the call to the script
from HotKeys. Referring itself to the example before, it has been called the
script in order to calculate the checksum, the script calculates and must give
back a Vector of Integer with the original data and the data of the checksum;
- boolean isStopThread() = used to understand if the SerialAnalyzer
demands to interrupt the Thread of the script
- sendData(String) = used for send one string of data in ascii,
with the conventions in order to represent the data used from the SerialAnalyzer,
on the opened communication channel. The data send to you come visualize to you in the window "Terminal";
- sendData(Vector) = used for send a Vector of Integer of binary data on the
opened communication channel. The data send to you do not come visualize to you in the window "Terminal";
- enableRxData(boolean) = used to qualify the management of the
data received. This involves that the script is taken care to on hand read
(through a Thread) the data from the pipedInputStream put, otherwise risks the block to the SerialAnalyzer
- enableSendDisp(boolean) = used to qualify the visualization of the data
transmitted;
- enableRxDisp(boolean) = used to qualify the visualization of the data received;
- endScript() = used to signal the end of the script;
It is one called obligatory to add to the end of the script!
- int getRxData() = used for read a received data;
Return -1 in case of data not available, otherwise returns the data.
- clearTerminalArea() = used for clear the terminal area.
- boolean clientIsOpen() = used for see if the client connection is open.
Return true if is open, false if is close.
- boolean clientOpen() = used for open the client connection.
Return true If it is opened, false for any errors.
- clientClose() = used for close the client connection.
- setLastBshFilePath(String) = allows you to store the path of a file managed in the script.
This can be handy the next time the script is running to tell at the JFileChooser the folder used previously. The data is stored until you close the Serial Analyzer.
Since version 2.7.0
- String getLastBshFilePath() = returns the path previously stored with setLastBshFilePath.
Since version 2.7.0
- setLastBshFileName(String) = allow you to store the name of a file managed in the script.
This can be handy the next time the script is running to tell at the JFileChooser the file used previously. The data is stored until you close the Serial Analyzer.
Since version 2.7.0
- String getLastBshFileName() = returns the name of the file previously saved with setLastBshFileName.
Since version 2.7.0
In the folder bsh some examples of script are supplied.
Change Log
Here follows a resume of all Serial-Analyzer Change Log:
- Version 2.7.1 dated 04 December 2011:
- Added option to replace the control characters (from 0x00 to 0x1F) with the name as used in the ASCII table. For example, the character 0x02 may appear as STX;
- Added option to highlight, with custom colors, all sequences of characters matching a search pattern;
- Modified font HotKeys definitons and Program editor, used monospace font instead of proportional;
- Fixed initialization error of color customization. When you start the Serial Analyzer was set only the background color;
- Fixed bug of UDP server management in Programming mode;
- Fixed bug of UDP server management, would display the data received from connections not included (defined in Server Status tabs);
- Version 2.7.0 dated 11 April 2011:
-
Added client connection type MULTICAST;
-
Added the ability to change the font color of the transmitted, received and system messages;
-
Added the ability to change the background color of the terminal area;
-
Added entry in the File menu to load the last file properties used in the previous session;
-
Modified log file management. Now every time you start the log, you must select where to save the log file itself (it is proposed automatically on the last file used).
For this reason it was removed the "NewLog" button;
-
Added mode "Command Mode". Click on the link for an explanation;
-
Added management of "Auto Answer". Click on the link for an explanation;
-
Made available in the BeanShell script the following methods:
- setLastBshFilePath;
- getLastBshFilePath;
- setLastBshFileName;
- getLastBshFileName;
The new methods are explained here;
-
Replaced the old and no longer supported libraries JavaComm with libraries RXTX.
This allows you to use the Serial Analyzer even on Apple computers with Mac OS X (only x86 no ppc).
See the section Installation for more details on the files of this library.
-
Modified filter on the file type when you load a properties file or program file (.sap) with not distinguishing between uppercase and lowercase;
-
Modified the definition and management of FrameHeader and FrameTail so you can write directly in ASCII characters (first you have to use the decimal/hexadecimal encoding used in SerialAnalyzer) and of indefinite length (the first was limited to 10 characters).
-
Changed the management of configuration parameters to allow some changes without having to reconnect to the client/server;
-
Changed the management of the configuration of client and server not allowing editing when connection is active;
-
Added in Programming the instruction "sendK" to send the string associated with key of "Command Mode";
-
Fixed bug client parameters: at the start if is selected a serial connection could also change the IP address and port;
-
Fixed bug: at the start was not set the font size stored in the INI file;
-
Fixed bug: could happen that at the start of the program the window size was larger than the default or even larger than the screen blocking the same program.
The error appeared in the presence of a large amount of text assigned to a function key and saved in the default properties file or in the file specified on the command line.
- Version 2.6.2 dated 01/10/2010:
-
Fixed bug in management of RUN led. In the event of a program that calls a script. The led remains off.
-
Fixed bug saving management of configuration and program when you close the Serial Analyzer.
If you enter int the file save dialog and than abort the Serial Analyzer is closed.
-
Added option to not interpret the decimal encoding in the data sent. Useful when data in XML format.
-
Added "Line Mode" option to send data only after pressing the Enter key. Useful for sending AT commands to the modem, so you can correct the string with the backspace key.
It works only for data entered by keyboard.
-
Added command to send the "break" signal on the serial line.
- Version 2.6.1 dated 17/07/2009:
-
Fixed error in the management of the minimum dimensions of the main window.
This did not allow the proper scaling, for example, when it decided
not to see the edges or the StatusBar.
-
Fixed error on opening the client connection from a script in BeanShell.
In practice, the connection was opened but were not handled the data
sent and received.
-
Fixed error in interpretation of coding data encoded in decimal and hexadecimal.
The string "<abc>" was always interpreted as decimal encoded data and
the string was not transmitted.
Obviously the string "<065>" is always converted to "A".
The same error was also present for the hexadecimal encoding, the string
"[1K]" was not transmitted.
-
Fixed error in the "StdOut/Err" windows which did not allow
you to select and copy text;
-
Added serial line BaudRate selection of speeds 230400, 460800 and 921600
(attention, not all systems support these BaudRate).
-
Added display messages in the Terminal Area when changing the state of
control signals of the modem.
This messages are recorded also in the log file.
-
Added option to display system messages in the Terminal Area (actually
only the control signals of the modem).
-
Made available to scripts in BeanShell method "getApplicationDataString".
The new method is explained here;
- Version 2.6.0 dated 11/02/2009:
-
Modified the logic of the server function to easily create a bridge
between different connections.
The new features are explained here;
-
Modified managment of client tcp/ip connection for recognize when the
server close the connection;
-
Added in a StatusBar one LED to indicate when a Program
or a BeanShell script is running;
-
Added in View menu an option to select the LookAndFeel to be applied
to the program.
The LookAndFeel is managed by the JcLafChooser program used as a library.
To add more LookAndFeel see the instructions for the JcLafChooser.
The information about the used LookAndFeel is automatically saved so
when restart the SerialAnalyzer the LookAndFeel is the last used;
-
Added to View menu the managment of font size applied to the terminal area;
This information is saved so that when restarting the program is used
the last selected font size;
-
Added a panel containing the twelve HotKeys with the name taken from
the comment. The panel is displayed through the View menu;
-
Added in View menu an option to keep the program always on top;
-
Added to a View menu an option to disable the automatic control of the
minimum size of the frame so that it can reduce more than what is allowed;
-
Added to the Tools menu an item "Refresh Script Menu" to update the
BeanShell script menu without having to restart the SerialAnalyzer;
-
Enabled operation of the function keys (and then sending the data) when
is selected one of the two HotKeys tab;
-
Added in About window the license information;
-
Modified management of minimum frame size to fit automatically in
function of used LookAndFeel;
-
The management of the SystemInfo windows is managed by the program
JcProperties
used as a library;
-
Completely rewritten all the layout in order to stop using the library
layouts.jar;
-
Added a red border to all the windows setup parameters;
-
Added a green border in the modem and server status windows;
-
Added a panel, along the main, which contains the status of the modem.
The panel is the same as the Modem Status tab. The visualization is
activated through the View menu;
-
Modified management of "New Instance" to make it compatible with Windows Vista;
-
Fixed error message appears when the version of Java is not compatible.
It show the name of another program ... JcRename!;
- Version 2.5.2 dated 16/09/2008:
-
Optimized data conversion in the selected view format;
-
Correct error in the method intToString available to BeanShell script.
The method converts the integer data into ascii string compliant to
the selected view format of the SerialAnalyzer parameters, instead of always
convert to the format CTRL -->HEX.
This error led to transmit data not corrected if in the settings was
not selected format CTRL -->HEX as incorrectly converted, for example,
selecting the decimal format 0x02 was sent as 30 32;
- Version 2.5.1 dated 01/07/2008:
-
When you run a script in BeanShell I check if the option "AutoAnswer"
is active, if it is active will be asked if you want to disable.
This is because the function "AutoAnswer" can alter the script execution;
-
When you close the application or when you load a new configuration
file/programme in addition to options to save the file was added the
option of "Cancel";
-
Fixed error in the "Program" section.
When running a program that call a BeanShell script, for example to
calculate the checksum, the following errors occours:
-
the cursor was not as busy;
-
instructions enableSendDisplay and enableRxDisplay not worked,
the data were always appear;
- Version 2.5.0 dated 18/03/2008:
-
Implemented client/server udp.
The maximum size of a package udp was set in 2048 byte whereas worldwide parameter
Maximum Transmission Unit (MTU) is set at 1500 bytes. For info view
http://en.wikipedia.org/wiki/Maximum_transmission_unit
In the table "Server Status" are recorded all udp connections, udp packets
are sent to all clients who are connected.
To delete a client select the check box "Exclude" and at the first
transmission this client is removed from the list.
-
Completely rewrited management recognition of Frame Header.
This is to solve the following problems:
-
Fixed error in the recognition of Frame Header where it was not possible
the recognition of frame header composed by Ascii
visualizable characters (i.e. characters between 0x20 and 0x7E)
and not visualizable characters (less than 0x20 and greather than 0x7E)
cannot be recognized. Actually recognisation works, but then the
inscription ==== NEW FRAME === does not appear in the right position;
-
Fixed error in writing to the log file when they recognize from
two different Frame Header with different length that caused an exception.
-
Correct size of the System Property window;
-
Fixed error management keyboard when you write directly in the terminal
area were not accepted the characters typed in combination with the
"Alt Gr" key (such as @ and # in Italian keyboard).
-
Fixed error that occurs when the Java Virtual Machine is updated.
In previous versions the Serial Analyzer not started and no errors was reported.
Now an error message is shown indicating how to resolve the problem.
This happens because when you install the Serial Analyzer the libraries
for managing serial connection will be installed in Java
Virtual Machine used at that time, when installing a new Java
Virtual Machine these libraries are not present.
To resolve this problem we must start the installation program of
Serial Analyzer and select to install only the "Library System".
In previous versions, to see if the problem is the same, you can
start the SerialAnalyzer from shell/dos with the command
"java -jar SerialAnalyzer.jar" if you see the following exception:
"Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/CommPortIdentifier"
the problem is the same.
- When the program start the Java version is checked, in the case
of unsupported versions (less than 1.5) displays an error message;
- Version 2.4.3 dated 12/02/2008:
-
Added menu "View" with the commands to select which components view
and enable the visualization of the transmitted data.
By default, all entries are enabled and consequently all the components are displayed.
If you want to reduce the minimum size of the program window you can
choose to disable the display of some component.
The only exception, if the vertical resolution of the display is less
than 480 pixel edges of the buttons are disabled by default.
This change was designed to run the "SerialAnalyzer" on Asus "Eee PC"
which has a reduced vertical resolution of the display;
-
Minor changes to the layout to reduce the minimum size;
Also, to optimize the minimum size, we recommend that you install
(option provided in the installation program) LookAndFeel "Liquid";
-
Minor changes to optimize the management of tcp/ip server;
- Version 2.4.2 dated 13/12/2007:
-
The string of connection parameters, appears at the bottom left, shows the
parameters of active connection, client or server in the previous version
were displayed only data connection client.
The parameters are distinguished by letter that precedes the data: "S"
for server connection and "C" for the client connection.
If the server is used in a mode that allows you to activate a client connection,
the data presented refer to the client connection;
-
Added to the tcp/ip client connection the "bind" option where you declare the
port used by the client for the connection;
-
Added compilation of the program before the execution. This is useful in the
case of minor changes to be executed quickly;
-
In programming mode was changed the minimum time set for instructions setSleep
and wait from 100 to 10mS.
The default time for setSleep remains 100mS;
-
To the BeanShell interface was added the following methods:
- clearTerminalArea to clear the terminal area;
- clientIsOpen to see if the client connection is open;
- clientOpen to open the client connection;
- clientClose to close the client connection;
-
Fixed error on automated response. When the timer delay was set at zero could
happen that the automated response does not work anymore. To restore the
operation was necessary to restart the Serial Analyzer;
- Version 2.4.1 dated 01/10/2007:
-
Corrected error on the closing of the application from menu File -> Exit that
not ask for save the properties and program files, if these had been modified;
-
Correct the name ..... from SerialAnalizer to SerialAnalyzer!
- Version 2.4.0 dated 15/06/2007:
- Put on hand of the scripts in BeanShell the methods enableSendDisp and
enableRxDisp that they allow to enable or to disable the visualization of the
transmitted and received data;
- Added to the Programming the instruction enableRxDisp in order to enable
or to disable the visualization of the data received;
- Added to the Programming the instruction enableStep in order to enable
or to disable the execution step step of the program code;
- Version 2.3.0 dated 23/05/2007:
- Implemented the possibility to manage from script in BeanShell also the data received
in server tcp/ip mode;
- Added to the window ?std Out/Err? the automatic positioning on the last visualized message;
- Corrected error in the function ?Stop Scroll? that did not work with the
transmitted data but only with the received data;
- Version 2.2.0 dated 09/05/2007:
- Implemented the possibility to call present scripts in BeanShell in the
folder of the properties files;
- Added icon to the window "std Out/Err";
- Corrected error in the function ?Stop Scroll? that did not work with the
transmitted data but only with the received data;
- Version 2.1.0 dated 16/04/2007:
- Implemented BeanShell in order to execute script it personalizes to you;
- Implemented window where it comes redirected it the Standard Output and
the Standard Error (useful for the development/debug of the scripts in BeanShell);
- Implemented "New Frame" recognition also for the data transmitted,
enabled through dedicated CheckBox;
- Implemented writing on log files also of the transmitted data;
- Added color of background to the configuration parameters;
- Added in menu "Files" the possibility to start one new instance of the SerialAnalyzer ;
-
The library files do not come more copied in the folder of the JRE but
in one local folder "lib". This is comfortable in order to avoid conflicts
with other applications and in order to avoid of having to copy the
library when new version of JRE comes installed one. Unfortunately the
library tied to the serial communication must be installed in the folder
of the JRE, beyond to being different based on the used operating system,
therefore in the event of new version of the JRE it is necessary to copy
these files in the new version or make a new installation of the SerialAnalyzer being
remembered itself to only qualify the voice that installs the library of the serial communications;
- Corrected error in Programming. If a new program did not specify the time
of sleep it came maintained that one of the previous program and it did not come set up the time of default;
- Corrected visualization error name of the files of properties modified
(the name it comes visualized in red). The error consisted in setting in black
color the name of the file after to have open/closed the client connection, while
the name of file had to remain in red;
- Version 2.0.0, dated 13/01/2007:
- By the opening of serial connection the control
signals RTS e DTR are set as in the Tab Modem Status; befor man
had to set them manually;
- the ASCII table will not be generated every time, but will be read by a html file;
- the possibility of visualizing a personalized title for ech instance was added;
- layouts were remade in order to resize the hot keys and programm editor fields together with the main window;
- For this reason also the layouts.jar library was modified, which must be therefore changed;
- the vertical dimensioning was optimized, in order to
be able to visualizes two instances vertically aligned at the same
time, with display of 1024 pixels high;
- help was remade in order to make it better readable;
- added help in english language;
- the menu "Edit" and "Program" error was corrected (it was not possible to select them from keyboard);
- menu "Command" was added (it replies the funtions of commands area);
- the option to sincronize the programm file folder with the properties file one was added;
- added icons to the ascii table, help e system info windows;
- added check to the modified properties file and program file not saved before exit or before load new file;
- Version 1.7.3 dated 19/07/2006:
- It is now possible to execute a "Programm" sequence also in "server" mode.
Before it worked only if a client connection was open;
- Version 1.7.2 dated 27/03/2006:
- the error in the log file creation was corrected
(separator between path and file name lacked, so that the file was
created in the upper folder, and the first part of its name was
practically the folder name.
- Example: file "trial.log" in the folder
"c:\Programmi\SerialAnalyzer" was created as
"c:\Programmi\SerialAnalyzerprova.log";
- It was also corrected the error coming out in the
case of many simultaneously connections to server, which produced some
exceptions;
- The possibility to cancel the list of connected clients by the server opening was added;
- Timer added, according to the automatic reply
progammable, so that it generates an automatic second reply only after
timer had gone out;
- The possibility to send a string to the clint who has been shortly connected to server was added;
- Version 1.7.1 dated 09/11/2005:
- LookAndFeel is no more forced into the
programm, so that another one can be applied, which differs from the
command line or as default on JRE. To change the
LookAndFeel follow the following instructions:
- From command line : java
-Dswing.defaultlaf=nameLookAndFeel -jar SerialAnalyzer.jar
- As Java default one must create or modify the
Swing.properties file, which is situated in j2re1.4.1_02\lib, adding the following line : swing.defaultlaf=nameLookAndFeel
- In points a and b change the word nameLookAndFeel
with the desired LookAndFeel relative class:
- An Apple-Style LookAndFeel can be "com.birosoft.liquid.LiquidLookAndFeel";
- Or the java default one is "javax.swing.plaf.metal.MetalLookAndFeel";
- Version 1.7.0 dated 26/07/2005:
- Managing of the filter of configuration file;
- Programming script added;
- Version 1.6.2 dated 27/05/2005:
- Modifiied the managing of server connections list, so that it resized togheter with the main programm;
- Version 1.6.1 dated 24/05/2005:
- The possibility of sending data contained in the Clip board (paste) was added;
- The possibility of selecting three different
visualizing modalities was added, which are related to the recognizing
of the new frame:
- Time and date visualization;
- Delta ms of previous frame visualization;
- absolute ms visualization;
- Version 1.6.0 dated 04/04/2005:
- Inside the funcion of frame recognization the
possibility of time and date visualization was introducted (default),
or the difference (ms difference) from previously received frame, by
selecting the relative check-box in Setup tabs -> View Mode;
- It was moreover introducted the possibility of automatic generation of answers to frames of received data;
- The Tcp-Ip connections list to server
was modified, so that a connection can be excluded from the data
exchange, though remaining active;
- Version 1.5.3 dated 04/08/2004:
- The not completely solved error during the
modification contained in Version 1.5.1 was corrected.
It occurs when during the connection in GPRS, it is the
provider the reset the connection itself; in this case Serial Analyzer
did not manage the elimination of connected clients from the list, thus
causing a stream script error, as well as keeping in the connected
clients list lots of non-existent connections;
- Version 1.5.2 dated 19/07/2004:
- when the "BREAK" combination was was
decodified from the the serial line, this was not recorded in log file,
but only on video;
- Version 1.5.1 dated 28/06/2004:
- In case of stream script exception on a client
connected to Serial Analyzer server, the socket of client itself was
closed: this error was corrected
- Version 1.5.0 dated 11/05/2004:
- server modality;
- saving of the ability of frame header recognization;
- Version 1.4.1 dated 06/04/2004:
- EDIT menu was added, from which it is possible to execute following operations:
- "Find" ; text seaRch into data area; it works only during closed connection;
- "Copy" copies the text selected from data area;
- "Select All & Copy" selects and copy the whole text in data area;
- Version 1.4.0 dated 19/03/2004:
- The managing of function buttons and keyboard was
definetly arranged: in particular, when JDK 1.4 it was necessary, by
changing applicative back to Serial Analyzer, to select with mouse the
data transmitting area or function buttons;
- Both received and sent data areas where eliminated.
Data are now available on a single area and both sent and received data are visualized into different colours;
- The "Copy" button was added, in order to copy the selection made on sent/received data area;
- On status bar was added the name related to the loaded configurating file;
- Version 1.3.2 dated 29/02/2004:
- Date and time of event were added to the "NEW FRAME" announce;
- Version 1.3.1 dated 16/02/2004:
- Tcp/Ip connection implemented;
- Version 1.3.0 dated 10/02/2004:
- Modifications to manage functions data also by using JRE 1.4;
- Version 1.2.2 dated 10/11/2003:
- CheckBox was added in order to stop the automatic scroll of received data;
- Version 1.2.1:
- The Frame Header test was added and put
into
two different strings, in order to be able to enable their single or
simoultaneous. This is particularly useful when,
besides the actual protocol, the "AT' orders to a modem have to be
distinguished. WATCH OUT! The abovementioned function led to the
modification of the properties file: if an "old" version is loaded, an
error message will appear; in this case one has to edit the
".properties" file manually, to look for the string "frameHeader=" and
rename it as
"frameHeader_1=", then create a new string "frameHeader_2=";
- Version 1.2.0:
- To the function buttons was associated an order comment, which is saved on the properties file;
- This comment will be visualized as toolTips
of the same buttons and will be updated while saving or loading the
properties file;
- Functio button are unabilitated when the connection is off;
- Version 1.1.2:
- Last path and file name have benn memorized, both for log file and properties file;
- Managing of baudRate to 1200 bps was added;
- Version 1.1.1:
- the string which resumed the serial line configuration was not updated,
in case that changes were executed with open connection;
- The RTS e DTR modem signals can be set up only if in the serial setup the "Flow control On and Out is set up to
"None"; before the flow control changed them all the time;
Installation
SerialAnalyzer
is a Java developed program, and that means you have to be already
installed on your PC the Java Virtual Machine (JRE) produced by
SUN. It can operate with JRE from version 1.5 onwards.
Latest versions are provided with an installation tool (still on Java) which automatizes the whole procedure.
In order to operate a manual installation, do as follows:
- The Java JRE from version 1.5 onwards, or the whole JDK still from version 1.5 onwards (we advise to install the latest version of Java);
- Since version 2.7.0 replaced the old and no longer supported libraries JavaComm with libraries RXTX. The library (depends on the operating system) for the serial line management is composed of two files that should be copied as listed (find all files in the folder /lib e lib/rxtx_native where it is installed the Serial Analyzer):
- Common to all operating systems: copy the file "RXTXcomm.jar" in the folder "lib" where it is installed the Serial Analyzer. Alternatively it can be copied jre\lib\ext
- Windows: copy the file "rxtxSerial.dll" in the same folder where you installed the Serial Analyzer.
The file is different according to the architecture of the system at 32 or 64 bit. In the case of 64-bit architecture is necessary to verify that the Java Virtual Machine is actually a 64 bit, otherwise you have to use 32-bit library.
Alternatively it can be copied in jre\bin
- Linux:
- copy the file "librxtxSerial.so" in the folder /jre/lib/[machine type] (i386 for instance)
- the file is different according to the architecture of the system at 32 or 64 bit. In the case of 64-bit architecture is necessary to verify that the Java Virtual Machine is actually a 64 bit, otherwise you have to use 32-bit library;
- check file permissions, if you have some problems set these permissions "chmod 755 librxtxSerial.so"
- alternatively you can copy the file "librxtxSerial.so" in other folders independent of Java, such as /lib. To check which folders you can copy this file you can use the program "JcProperties" (can be found where you installed the Serial Analyzer in the lib folder and run it with "java -jar JcProperties) and see the folders associated with the property "java.library.path"
- Mac Os X (solo x86): copy the file "librxtxSerial.jnilib" in the folder /Library/Java/Extensions.