COM port terminal program

18,426

Solution 1

Docklight / Docklight Scripting For testing applications communication over the serial port it is the best tool for the job. It listens for user defined sequences on serial port and can then trigger a transmission with parameters derived from the input message or function in a script.

I wrote a C++ program to test a embedded serial application and it was +/- 1000 lines of code. I was able to replace this with about 20 lines of vb script in Docklight Scripting.

Docklight is definitely worth the money.

Solution 2

I would tend to implement a short python script to do this (it can be compiled to a standalone executable with py2exe if that's what you need). Install python and pyserial. Then use a script like this:

#!/usr/bin/python
import time
import serial

# Interval in seconds
interval = 2.5

# Number of times to send
repetitions = 10

# Simple Command string
command_string = "Hello World"

# Or if it's a binary-type command:
command_bytes = [0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64]
command_string = "".join([chr(c) for c in command_bytes])

# Open the serial port - most of these settings have
# defaults in case you want to be lazy
ser = serial.Serial(
        port=0, # This is COM1, use 1 for COM2 etc
        baudrate=115200,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        xonxoff=0,
        rtscts=0,
        timeout=0)

# Loop 'repetitions' times
for i in range(repetitions):
    # Send the string
    ser.write(command_string)
    # Go to sleep for "interval" seconds
    time.sleep(interval)

However, if you want a more conventional Windows application, then you can probably do it with Docklight, possibly combined with Docklight Scripting (available from the same site).

Solution 3

The serial terminal emulation application Tera Term, has a scripting language which will be capable of setting up timed loops.

http://ttssh2.sourceforge.jp/

http://en.wikipedia.org/wiki/Tera_Term

Solution 4

I use RealTerm. You can write scripts for it and have it send that file repeatedly. You can add delays between characters or delays between lines. It's a little buggy sometimes, but it's great for the price (free).

http://realterm.sourceforge.net/

Solution 5

Although answered already, i use http://www.hw-group.com/products/hercules/index_de.html . Their app is free and in the serial tab, i can send and receive data from rs232. works like a charm.

Share:
18,426
droseman
Author by

droseman

Updated on July 10, 2022

Comments

  • droseman
    droseman almost 2 years

    I have developed an embedded application which requests status information from a device down a communications channel. My customer requires that these will be sent with a specific time period, so what I am looking for is a PC terminal application which can send a text string command repeatedly at a set interval over a period of time. I currently use a serial device tester which can immediately send back a set string when something is sent to it, but I need to control the time period and number of repititions.

    Are there any applications (for Windows) out there which can acheive this?

  • droseman
    droseman about 14 years
    This looks like a good solution to me (though not looked at docklight yet). Is it possible to show the raw hex characters on the link at the same time as the ASCII text?
  • droseman
    droseman about 14 years
    Thanks for the link, that looks exactly what I am after
  • simon
    simon about 14 years
    Not sure if you can show the received string/data on the terminal in both formats; but you might be able to write the received line out twice to a log file.
  • droseman
    droseman about 14 years
    another excellent program, thank you - I think that this one is more relevant to my embedded work. One question, how would you send a string ending in CR LF a number of times with a specific delay (in this case 90ms) between, it looks like the repeat delimiter is a CR only
  • mjh2007
    mjh2007 about 14 years
    Create a file containing the characters you want to send in your case CR LF. You might need to use a hex editor instead of a text editor to make sure those are the only 8-bit characters in the file. Next in real term on the send tab select the file you just created in the “dump file to port” frame. To the right of the file name you will see boxes for character and line delays. Below them a repeat count and repeat delay.
  • kyb
    kyb over 6 years
    Nice one. I used it some time.
  • kyb
    kyb over 6 years
    Super. Most functional program.