Menu

RealTerm Script

Anonymous
2022-04-06
2022-04-29
  • Anonymous

    Anonymous - 2022-04-06

    I am wanting to use RealTerm to connect to several different stations that we have to send a firmware update. Since we have so many I am wanting to create a script to automate this process in a sense have it open RealTerm connect to a station issue update disconnect and then connect to the next one.

    Has anyone ever done something like this before? Also what language would you recommend doing this with? I would like to use Python if possible. I guess I am just unsure on how to get started in automating this program to run in the background for me.

     
  • Anonymous

    Anonymous - 2022-04-07

    This quite do able. It is much easier if your system can be updated "blind" i.e. you just send file/s of commands and data, and it updates, and you can get some return string that tells you if you succeeded or failed.

    You have two ways to control Realterm: CommandLine (CLI) or COM

    If what you want to do can be done by a series of individual Realterm jobs, then CLI might be easiest (i.e. batch file, python script that just send command lines.)
    By this I mean: If a job is "start RT, send file X, capture return data for 5 secs, quit"
    The CLI approach is very easy to understand, and each job is easy to test and make go. It is how we do the automatic test of our I2C adaptors. On the misc tab there is a button to bring up a commandline helper, where you can see all the params, how they are currently set in the UI, and go straight to the help page on each param.
    https://realterm.sourceforge.io/#Command_Line_Parameters

    If you need to make something more complex and need to do it all using a single instance of RT, then use the COM interface. Note that there is a COM method to execute command line commands.

     
  • Mitchell Nuss

    Mitchell Nuss - 2022-04-08

    So I have started creating my script and when I am issuing the RT.Port command in the script the parameters in the docs say I can enter in an IP address but I am getting a Typescript error after I enter in x.x.x.x:xxxx it says it is expecting a ";" but I do have RT.Port=x.x.x.x:xxxx;

    Any thoughts on this?

     
  • Simon Bridger

    Simon Bridger - 2022-04-09

    Don't strings have some sort of quotation symbols around them?

     
  • Mitchell Nuss

    Mitchell Nuss - 2022-04-29

    After I began developing this with some guidance, Simon, the correct syntax for python for what I am doing is RT.Port = "x.x.x.x:xxxx". Worked great after we were able to figure that out. The excel example in the downloads files helped greatly once we looked at the VB code. But not all commands/syntax were listed there for RealTerm.

     
  • Simon Bridger

    Simon Bridger - 2022-04-29

    Most things are on the website. Don't forget this:

    (V3.0.0.27+) The DoCommands method makes all commandline parameters available to ActiveX/COM user. If the ActX lacks a command, check the commandline.

    The commandline has had more things added to it that the COM interface in recent years.

     
  • Mitchell Nuss

    Mitchell Nuss - 2022-04-29

    Simon, did you happen to see the ticket I put in for the possible bug using Winsock? It seems that no matter what I try I cannot my program to change that setting.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB