Groups | Search | Server Info | Login | Register
Groups > comp.protocols.kermit.misc > #18
| From | John <jhw1309@gmail.com> |
|---|---|
| Newsgroups | comp.protocols.kermit.misc |
| Subject | Sending from script to serial port in K95g |
| Date | 2011-12-11 09:57 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <ac6a22fb-ae6d-48d1-8000-eca0aad5b2a0@a31g2000pre.googlegroups.com> (permalink) |
The following is a partial script I developed under Windows XP to set
up a ham radio
Terminal Network Controller (tnc). It works under XP. I'm trying to
use the same USB serial
dongle on a new machine running Windows 7 Home Premium. Under W7, the
script outputs gibberish to the tnc. If I type the lineout commands
one at a time,
at the Kermit prompt, the commands go to the tnc and it responds
correctly. But
the same lineout commands running in the script result in gibberish.
The same
thing happens with two very dissimilar tncs (A Kenwood TM-D700A and an
AEA
PK-232MBX; if you don't recognize the tnc, don't worry about it. I
can't imagine
that's where the problem could be.) Any Kermit gurus have an idea why
this would be?
The serial port is a USB dongle with the Prolific innards, using the
latest driver.
set line COM7
set speed 9600
set serial 8n1
set carrier-watch off
set flow-control xon/xoff
set key \264 \8
set term echo off
set term apc off
set term autodown ask
;This macro passes text to the tnc and waits for a new prompt. If the
;prompt doesn't show up in 10 seconds, it tries again. I use this
instead
;of a string of lineouts to fix a problem caused by overrunning the
tnc input
;buffer.
def telltnc {
:loop1
clear input
lineout \%1
input 10 cmd:
if success {
reinput 0 ?
if success goto loop1
}
else goto loop1
}
log session C:/logs/th-d7alog.txt append
;In the next section, I tried replacing all the telltnc calls with
lineout commands.
;The results were the same. But typing lineout commands one at a time
works.
:restart
clear input
lineout \003
input 10 cmd:
if failure goto restart
telltnc "xflow on"
telltnc "autolf on"
telltnc "echo on"
telltnc "flow on"
telltnc "beacon every 0"
telltnc "unproto CQ"
telltnc "monitor on"
connect
goto alldone
:error
echo An expected response was not found.
echo Exiting startth-d7a script.
:alldone
Back to comp.protocols.kermit.misc | Previous | Next — Next in thread | Find similar
Sending from script to serial port in K95g John <jhw1309@gmail.com> - 2011-12-11 09:57 -0800 Re: Sending from script to serial port in K95g bonomi@host122.r-bonomi.com (Robert Bonomi) - 2011-12-13 10:58 -0600 Re: Sending from script to serial port in K95g Edward Berner <erb@bernerfam.com> - 2011-12-28 14:25 -0800
csiph-web