pyTkTerm - developer communication tool - free download

Hi everybody,

I’ve uploaded a communication tool for Windows XP (may work on other Windows versions, too) to Walter’s FTP site for file sharing. I wrote it myself, and this version is free for download to the OpenAT community here! It is free as in there is no charge for it, not free as in freeware! Please do not distribute without asking anywhere else!!

[color=blue]u[/u]

Now, what will it do for you? You can use it instead of HyperTerm (or any other terminal emulator). Some of the features are:

  • input history for easy repeating of previously sent commands
  • separate input / output areas
  • automatic saving of port and other settings, input history, output
  • running Python scripts
  • XModem upload support (ideal for target application development)

The documentation still isn’t complete, but you’ll have enough information to understand and use the program… Please find the documentation here:

[color=blue]u[/u]

Interested?

So, feel free to get the installer here:
—edited: 2007/01/20— UPDATE! see below…
[color=blue]u[/u]

The script section in the documentation is quite unfinished as you might have noticed… But the installer includes some examples, so you’ll be able to figure out, how to write scripts for pyTkTerm.

Here is one of the included examples, that you can get an idea how nice a script can make the application download for you: It does it all: AT+WOPEN=0, AT+WOPEN=4, AT+WDWL, then sends the Xmodem file, then AT+CFUN=1 and AT+WOPEN=1 all with just one double-click in the history or a click and selecting the script file…

Here it is:

global script_name
global script_data_handler
global wait

wait_str = None
waiting = False

def my_data_handler( line ):
  global wait_str, waiting
  if waiting and wait_str:
    for strg in wait_str:
      if line[:len(strg)] == strg:
        wait_str = line
        waiting = False
  
def wait( s, timeout ):
  global wait_str, waiting
  if type(s) == type('str'):
    wait_str = [ s ]
  else:
    wait_str = s
  wait_timer = 0
  waiting = True
  while script_name and waiting and (not wait_timer > timeout) :
    if wait_timer % 10 == 0:
      output( "wait timer:", wait_timer )
    wait_timer += 1
    time.sleep(0.1)
  ok = not waiting
  waiting = False
  return ok


def script_main():
  update_status_line( 'Starting application update...' )
  sendln( 'AT+WOPEN=0' )
  if not wait( 'OK', 50 ): return False
  output( 'match:', wait_str )
  sendln( 'AT+WOPEN=4' )
  if not wait( ['OK','ERROR','+CME'], 50 ): return False
  output( 'match:', wait_str )
  sendln( 'AT+WDWL' )
  if not wait( '+WDWL', 10 ): return False
  output( 'match:', wait_str )
  xmodem_start('xyz.dwl')
  while script_name and serial_mode==XMODEM:
    time.sleep(0.2)
  if not( script_name ): return False
  time.sleep(1)
  sendln( 'AT+CFUN=1' )
  update_status_line( 'Please turn ON the device NOW!!' )
  if not wait( 'OK', 100 ): return False
  output( 'match:', wait_str )
  sendln( 'AT+WOPEN=1' )
  return True
  
script_data_handler = my_data_handler

output( "" )
output( script_name, "is running!!!" )

if script_main():  update_status_line( 'Application update successful!' )
else:              update_status_line( 'Application update failed!' )

output( script_name, "is at the end!!!" )
output( "" )

Have fun!!

Best Regards,
Jan

Hi Jan
Thanks for sharing
I think this is a great tool. :laughing:
I also have written something like this.
But mine does not do scipting or work with python.
i have buttons for every AT command and 30 customizable buttons.
I can also do Xmodem and send text files with AT commands to the modem.(but no intelligence like yours)
I used VB6 to write my program and used the MScomm control for my serial comms.
I have found it not to be good with USB to Serial converters.(Microsoft bugs)
When I get this sorted out I will also share.

But thanks for sharing.
I bet it took alot of hours to complete.

Best regards Walter

PS! I can not find the download link on the webpage?

Hi Walter,

Thank you very much for your comments. Actually, developing this most likely took a lot less time than you might imagine… (Python is so much easier to use than the Microsoft development tools…)

Oh, the program is just here at the moment. That’s on purpose, but maybe I’ll add it to my web site some time…

Best Regards,
Jan

Hi everybody,

I’ve uploaded an update for the pyTkTerm communication tool.

A license to install and use this program free of charge is granted to all
OpenAT forum members.

What is new?

  • integrated script editor with syntax coloring (based on the IDLE editor included with Python 2.4.3)
  • more examples (including invoking editor from script, opening new GUI windows with buttons, client/server socket communication between two pyTkTerm windows, open/saveas dialog boxes, communication using a second RS232 port, auto-saving, defining callback function for some function key)
  • more documentation (including a complete script library reference)
  • more functions for scripts (including universal GUI programming capabilities)

The updated documentation is still in the same place:

[color=blue]u[/u]

and the new installer can be found here:

[color=blue]u[/u]

Have more fun :slight_smile:

Best Regards,
Jan

Thank you Jan,
very nice program.

:claps::claps::claps:

Best Regards,
tom

Hi Jan do you have a release note for the new version?
Can you please make the baudrate go up to 921600bps.
The rest is very nice.
Thanks Walter

Hi Walter,

the release notes are included in the documentation. You can reach them right here:

[color=blue]u[/u]

Please stand by for updated baud rates… I don’t know if I can test it, though. I’m not sure if I have any ports that really support that speed…

Best Regards,
Jan

Hi Walter,

a new setup is here:
[color=blue]u[/u]

it includes the higher baud rates. Please let me know if it works…

Note: you should first uninstall the old version, then delete setup.p in the install directory, if you are going to install into the same directory…

Best Regards,
Jan

Hi,

did anybody test the speeds > 115200 baud?

It would be nice to know, if it actually works :wink:

Best Regards,
Jan

Hi Jan Yes thank you it works well.
It works well up to 1Mb.
Best regards
Walter

Hi,

There is now a forum dedicated to the pyTkTerm program. You may access it here: [color=blue]u[/u]

This will give you the chance to interact with other pyTkTerm users…

Also, a newer version is already announced there with a download location, and you will be updated on the further development of this program.

Best Regards,
Jan

Hi,

I am sorry to inform you that there are some issues to continue the distribution of this program. If I am able to work them out, I’ll let you know.

Best Regards,
Jan