RS232/USB Probe

From OpenCircuits
Jump to navigation Jump to search

Summary

  • Name: RS232/USB Probe
  • Status: still developing, but is working
  • Technology: Java -- should run on many platforms, Windows 98 through Vista
  • Author: russ_hensel ( where you can find an email address to reach me )
  • License: not fully determined, but open source and object code.

Purpose:

The project is a specialized terminal emulator designed to talk to microcontrolles and similar devices either to control them or to try to deduce what there control protocol is.

Several areas are provided for input to the device. This is typed as strings, but escape sequences also allow special characters including any ASCII character entered by its hex code. Data is sent by pressing the send button. Several areas are provided so that you can easily reissue earlier commands.

A complete log of activity is provided both to the screen and to a log file.

Early Mock Up of Screen

Screen Shot

Download

Coming soon, for early adopters email me russ_hensel

Install

comming.... for early adopters email me russ_hensel

Use Details

Some Use Details

Before running the program make sure the property file ( RS232Probe.properties ) has the values you want to use. This file is documented internally. Make sure you save a backup somewhere of the original file ( there is a backup in the installed files ). Double click the batch file to launch the program. Startup information will appear in the Java console ( the dos window associated with the program, and in the program log area, and in the log file. )

Fill in one of the blanks under Data ( the column by defaults contains SendMe ) and press the <Send> button. The device response ( if any ) will appear in the corresponding Received Data field. You can edit the data and send it again or just send it again. The panel on the bottom shows the activity of the application >> precedes sent data, and << received data. The rows are repeated so that you can easily switch between string sent.

One somewhat complicated, but important area to understand is how the program knows that the microcontroller has finished responding. We have three ways:

  • Wait for some special character ( which I call the termination character ) to be recieved. Very often the carriage return serves this purpose. In this program you can specify a character for the program to look for.
  • Wait some maximum anount of time and assume by then that the microcontroller is finished. This method is not fast, and is not particurllarly reliable. Nice to have as a backup method or if waiting for a termination character when the microcontroller has crashed could wait forever.
  • Stop after some maximum length of response. Alsmost always an error condition.

These are specified by entering data in some of the gui fields and can be different for different data that you send.

Here is some detail on all the Graphical User Elements.


GUI Element Use
Button: Send Press it to send your data. ( the data in the field to its right )
Field: Data Input: The data you want to send. This field uses special character translation so you can send any ASCII character(s). See Special Character Translation below.
Field: Waits Input: A time in some arbitrary units that the probe will wait for a return from the BitWacker. Data usually comes back pretty fast. Try starting with 50. If the termination reason is maximum wait exceeded, the time has run out and you may have an error condition or need to increase the time.
Field: Term C: Termination Character Input: A string for the character you want to be used by the microcontroller to indicate that its transmission is over. This field uses special character translation. The most common termination is the carriage return “~r”
Field: Maximum Length Input: The maximum length in character of the response that will be accepted from the BitWacker. If it is exceeded the response is cut off and the termination reason is listed as maximum length exceeded.
Field: Response Output: Whatever the bitwacker returns for data. Cut off at the first occurrence of the termination character if any.
Field: Termination Reason Output: The reason why the received data was terminated. Normally it is an error if the reason is anything other than Termination Character received.
Field: Log Area

Output: Lots of information about events in the probe are logged here ( and to the log file ) This is normally set up information and then when data is sent it is preceded by >> and when it is received it is preceded by <<. You cannot type in here, but can highlight text and copy it.

Field: Comment

If you enter a comment here you can log it to the log area by pressing the <button> button. This data is just for the log and is not sent to the bitwacker.

Button: Comment Send the data in the comment field to the log area, none of this is sent to the bitwacker.
Field: Term Char for All Sends This data is appended to the end of all data sent, leave it blank if you do not want to use it.
Menu: File -> Clear Log Clears the log area ( no effect on the log file ).
Menu: File -> Clear Pending Data Checks the recieve buffer for data from the bitwacker that came in after the end of the last recieve. Log it, but otherwise throw it away.

Sets up for clean communication on the next send, but lets you see that there was some unprocessed data.

Special Character Translation

Special Char. As typed in GUI Char Sent Comment
~r or ~R Cr = 0x0D Carriage return, the normal end to a transmit to the microcontroller
~t or ~T tab = 0x09 Also know as horizontal tab.
~n or ~N new line = 0x0a Also know as line feed
~xx The character corresponding to xx in hex. xx must be exactly 2 valid hex digits ( 0 to F )