Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending from script to serial port in K95g

22 views
Skip to first unread message

John

unread,
Dec 11, 2011, 12:57:15 PM12/11/11
to
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

Robert Bonomi

unread,
Dec 13, 2011, 11:58:14 AM12/13/11
to
In article <ac6a22fb-ae6d-48d1...@a31g2000pre.googlegroups.com>,
John <jhw...@gmail.com> wrote:
>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?

Some obvious things to try.
1) turn on _complete_ logging,
*show* the log results of 'doing things manually' where it works
AND the results of the scripted run, where things are garbled.
(in both cases, show -everything- from the beginning of the session.
what happens -before- the problem shows up is significant_
2) see what happens with just a -single- command to the TNC where the
string of 'telltnc' calls is?
3) try a 'sleep 1' after every lineout, and/or 'telltnc'

Edward Berner

unread,
Dec 28, 2011, 5:25:02 PM12/28/11
to
On 12/11/2011 9:57 AM, John wrote:
> 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.
[snip]

Hello,

Your script worked okay for me using Kermit95 on both Windows XP and
Windows 7 using a Keyspan USA-19HS usb to serial adapter. (On the other
end I used a small Kermit script on a Linux box to mimic the TNC responses.)

You might try "set output pacing" to slow things down a bit and see if
that makes any difference.

It may or may not yield any useful information but you could wrap all or
part of your script in "set debug on" and "set debug off" and compare
the resulting debug.log files from your Windows XP and Windows 7 systems.

Another workaround might be to put the TNC commands in a text file and
upload the file with "transmit /text".

--
Edward
0 new messages