LocoNetMessageTest Help


Contents


With this application you can send messages over LocoNet. The main purpose is software testing or reverse engineering.

If you are in a hurry there is a cheat sheet that will give you an overview:

Cheat Sheet (PDF)

Here you will find a reference of the functions:

Connection Settings Dialog Box

This dialog box pops up on application start. You have to choose the connection parameters, necessary to connect to the LoconetOverTcp server.

Connection Settings Dialog Box
Connection Settings Dialog Box

“Host” Field

Type in the name of the host (computer) where the LoconetOverTcp server is running. If you want to use a server that is currently running on your local machine, use the default localhost. A DNS name like lbserver.domain.de is allowed. You can also enter a IPv4 (like 192.168.1.23) or IPv6 (like ::1) address.

“Port” Field

Type in the port number on which the server is listening for connections. A port number is a positive integer in the range up to 65535 that identifies a service that a server might provide. If you do not know what a port or service is try 1234 which is the default port number used by the server.

“OK” Button

Press this button when you have finished to enter the server host and port. The program will try to connect to the server and close this dialog box. If a connection could not be established an error message will be displayed and the connection settings dialog will be shown again.

“Cancel” Button

Press this button when you decide to abort and close the program.

“Help” Button

Press this button or the “F1” key when you need more information.

LocoNetMessageTester Main Window

To send a message enter the message as hexadecimal bytes and then press the Send button.

Depending on the LoconetOverTcp Server and the LocoNet Interface used, you can send invalid message (e.g. illegal opcodes, messages with invalid length or invalid high bits). But most times you will send valid messages. LocoNetMessageTest will help you to validate these while typing.

The Main Window
The Main Window

From left to right, top to down:

The following keys are defined:

F1
Press F1 to get help about the application.
F2
Show the about box of the application. This includes Information about server connection, operating system and framework used: About Box

“Message” Entry Box

Here you can enter the message as hexadecimal bytes. Use spaces, commas, semicolons or tabs as separator. It is allowed to enter bytes as one or two chars and lower or upper case. Remember that there are some rules to obey on the format of a LocoNet message .

“Checksum” Box

When the checksum is calculated by LocoNetMessageTest this is the place where it is displayed. The box is empty, when the Add Checksum check box is not ticked or the message is invalid.

“Error Message” Field

This is the place where you get information about the message you are just typing or any response from the LoconetOverTcp server used. These Colors are used:

blue
The version information from LoconetOverTcp server
gray
Information about the message you are just typing
green 
The response from the LoconetOverTcp server starting with “OK”
pink 
The response from the LoconetOverTcp server starting with “ERROR”
white 
LocoNetMessageTest is sending the message

“Validate” Check Box

Usually this should be checked and LocoNetMessageTest is trying to parse your message.

When you would like to send messages that are generally invalid on LocoNet uncheck this. Then you are allowed to enter messages with invalid length, invalid high bytes and invalid checksum. Be aware that it depends on the LoconetOverTcp server and the interface you use, if this messages will ever go out to the LocoNet. Using a LoconetMonitor in parallel is advised.

“Add Checksum” Check Box

When checked LocoNetMessageTest calculates and adds the checksum automatically.

When unchecked no checksum is added. You have to enter it manually.

“Send” Button

This button is only enabled when LocoNetMessageTest thinks that your entry is valid. This depends also on the settings of the check boxes.

When you press the button the message is sent to the LoconetOverTcp server. You will see the response in the Error Message Field.


Valid Messages

The rules for your entry in the field “Message” are:

When validation is enabled by the “Validate” Check Box it is additionally tested that:


Other Resources

Project page of the LocoNetOverTcp Project:
http://loconetovertcp.sourceforge.net/