Dante's Serial Port Communication Analyzer v1.0.x

(nickname SPCA)

latest version always available at

http://www.geocities.com/tdanro

http://patrick.lidstone.net/ha/dante
 

User manual

Contents

 

Overview

Program graphical interface design

Generic initialization

IRMan initialization

Creative Infra initialization

CM12(X10) initialization

GSM Data initialization

Transparent mode initialization

Program history

Copyright

 

Overview

The main purpose of this tool is to analyze the serial traffic between the PC and some specific hardware devices. It can be very useful to understand the protocol and then to help you to build specific routines in order to communicate with that device.

<home>

Program graphical interface design

The graphical interface is presented in the following picture:

(1) - The COM port parameters are:

        - COM port - select one from the available COM ports. This listbox is enabled even for specific protocols;

        - Select port speed from 110 to 128000 bauds;

        - Select data length (5-8 bits); some combinations are prohibited (like 1.5 stop bits for 8 bit data) and are disabled by the interface;

        - Select parity mode (none, even, odd, etc.);

        - Select the number of stop bits (1, 1.5, 2);

        - Select the desired handshaking (none, XON-XOFF, Hardware);

        - when in Transparent mode, you can select the alternate COM port for communication monitoring.

(2) - Select the desired interface (if available). If not, select Generic. This will allow you to modify all the available parameters of the COM port;

(3) - This is a dynamically allocated button. It is used to initialize the port and if the port is initialized to disconnect it. The button label is changed accordingly;

(4) - Select the data type you want to enter in the 'Data' field. For each format, specific rules are applied when you try to send data.

    - When 'Hex' mode is selected, you must enter an even number of HEX digits, but without any blancs (spaces) in between;

    - When 'Dec' mode is selected, you must enter a single byte in a decimal form (from 0 to 255);

    - When 'Bin' mode is selected, you must enter only '0's and '1's in a multiple of 8 bits;

    - When 'Char' mode is selected, you can enter any character or string of characters (no matter the length);

(5) - When selected, the Carriage Return character (CR=0x0d) is appended at the entered string before send;

(6) - When selected, the Line Feed character (CR=0x0a) is appended at the entered string before send;

(7) - Enter here the data you want to send trough the serial port;

(8) - Here is displayed the value of the DCD bit (Data Carrier Detect - pin 1 of the DB-9 connector). The pin is polled 10 times per second;

(9) - Here is displayed the value of the RI bit (Ring Indicator - pin 9 of the DB-9 connector). The pin is polled 10 times per second;

(10) - Here is displayed the value of the DSR bit (Data Set Ready - pin 6 of the DB-9 connector). The pin is polled 10 times per second;

(11) - Here is displayed the value of the CTS bit (Clear To Send - pin 8 of the DB-9 connector). The pin is polled 10 times per second;

(12) - When selected, you set the DTR bit (Data Terminal Ready - pin 7 of the DB-9 connector), when deselected the bit is cleared;

(13) - When selected, you set the RTS bit (Request To Send - pin 4 of the DB-9 connector), when deselected the bit is cleared;

(14) - Here is displayed in decimal form the value of the ModemStatus byte (bit 7-DCD, bit 6-RI, bit 5-DSR, bit 4-CTS...);

(15) - You must click on this button to send the data entered in the 'Data' field. This button is disabled if the COM port is not initialized;

(16) - Here is displayed de data received. You can choose the display form and the number of bytes per row. This field is reduced in width when transparent mode is enabled and will display the received data from the default COM port selected (first one from the frame);

(17) - Here you can select the number of bytes per displayed row. At the selected position, a CR+LF is inserted in the displayed string. If '0' is selected, then no line separation is inserted. This value can be changed dynamically. In transparent mode, both data received fields are affected by this value;

(18) - Select the format in which the received data is displayed (Hex, Bin or Character). This value can be changed dynamically. In transparent mode, both data received fields are affected by this value;

(19) - Click here to clear the output window. In transparent mode, both data received fields are affected by this value;

(20) - Here is displayed the COM port with the received data from the left field (default application COM);

(21) - Same as (16), but for the received data from the alternate COM port. This field is available only in Transparent mode;

(22) - Here is displayed the COM port with the received data from the left field (alternate COM);

<home>

Generic initialization

In this mode you can choose any parameters you want for the serial port.

This is the most flexible mode.

<home>

IRMan initialization

You must select first the COM port you want to use from the available ones.

COM port is initialized with 9600,8,n,1.

In this mode, the PC power first the IRMan interface (DTR and RTS high), wait a little bit, clear the buffer and then send the 'I' character. After 500ms send the 'R' character. The interface must return 'OK' which is displayed in the output field;

Then the application goes to a standard mode for send and receive.

<home>

Creative Infra initialization

You must select first the COM port you want to use from the available ones.

COM port is initialized with 4800,8,n,1.

Then the application goes to a standard mode for send and receive.

<home>

CM12(X10) initialization

You must select first the COM port you want to use from the available ones.

This is a more specific mode. COM port is initialized with 4800,8,n,1.

Then the application goes to a specific type of send and receive mode.

When you try to send data after the initialization is complete, it will comply with the X10 protocol:

- PC send the bytes (usually 2 or 4);

- CM12 interface must answer with the checksum of the bytes;

- if the answer is correct, then the PC send 0x00;

- the CM12 interface answer with 0x55 (this answer is displayed in the output box).

 

If after several retries still not a valid answer is received from the interface, an error message is displayed;

 

Now the send cycle is finished.

 

NOTE: You cannot send standard data using this mode.

EXAMPLE: See the following link.

<home>

 

GSM Data initialization

In this mode you can select only the COM port. The rest of the parameters are fixed to 115200,8,N,1. Communication is done using character mode and at each line end a CR+LF is added.

<home>

 

Transparent mode initialization

In this mode you can select any parameter you want for the communication ports, but the "Transmitted Data" frame is disabled. You must select the alternate COM port which will be displayed in the right panel.

You can for example connect a PC with this application between a GSM phone (connected through IrDA, cable or Bluetooth) to the default COM port and a host PC which run Phone a application (let's say SMS/Phonebook) Manager connected through a Null Modem cable to the Alternate COM port. Initialize the transparent mode and start the GSM application. You will get the phone answer in the left pane and the PC commands in the right pane. You will be able to monitor the communication with the phone and better understand the protocol.

This is just an example, you can use it with any other serial connected device.

<home>

History

13-Dec-2002        : First public version (0.1.x)

<home>

25-Mar-2003:    First final release (v1.0.x)

 

- arrows keys (Up and Down) can be used to browse through commands history

- GSM Data Mode : used for test communication with GSM data enabled phones, by bluetooth, cable or IrDA;

- Transparent mode with 2 COM ports (to monitor serial communication between a host and a serial device;

- RESET function for the CM11/CM12 X10 interface;
- extended interface functionality.

 

 

Copyright

This application is a freeware. You can distribute it freely if you keep the original file package, including all the copyright notice.

The source code is not included.

New versions of this application will be available at:

http://www.geocities.com/tdanro

and

http://patrick.lidstone.net/ha/dante

Please send any comments or bugs to:

Dan Toma  ( dtoma@fx.ro )

visitors starting with 06 September 2002, based on     Page ranked by   

Last update on 25 Mars 2003