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