3

I am testing some boards and the system used to test these is Tera Term. In Tera Term I use the Serial Port to send commands to the board in order to log in and run certain settings that I want.

Instead of typing these commands each time I test a board I want to create a program that sends these commands without the requirement to type them again and again each time.

Also I need to set a delay between each command as the system needs to to load between them.

Question
How can automate the typing of commands and delay between subsequent commands in teraterm?

Mohit Jain
  • 30,259
  • 8
  • 73
  • 100
Adam
  • 71
  • 1
  • 1
  • 5

3 Answers3

4

I used the Tera Term Language (TTL) and created a macro which solved my problem. I used code to wait for a prompt from the system and then print out the command I wanted.

Here's a link to the TTL syntax:
http://ttssh2.osdn.jp/manual/en/macro/syntax/

Adam
  • 71
  • 1
  • 1
  • 5
1

Don't use Tera Term for that. It is not made for scripting, but rather for interactive use. Try to get a command line serial terminal emulator.

If you are on Linux you can use screen or there like.

If you are on Windows you can just write echo command > COM1 in a normal com.exe-window, according to this link: https://batchloaf.wordpress.com/2013/02/12/simple-trick-for-sending-characters-to-a-serial-port-in-windows/ (Replace COM1 with the name of your serial interface)

Make sure you don't have your Tera Term open while you use the echo-command, otherwise you'll get "Access Denied".

Dakkaron
  • 5,930
  • 2
  • 36
  • 51
  • 1
    what about using a .ttl file? – Adam Jun 30 '15 at 16:10
  • This is a very uninformed answer. Teraterm scripting language includes a [very complete API](https://ttssh2.osdn.jp/manual/4/en/macro/command/index.html) – ryyker Jan 03 '23 at 18:17
0

That's exactly what Teraterm is for using the ttl language. It will work great as Adam stated.