[WT-support] Access to antenna controller from LUA-script

Bob Wilson, N6TV n6tv at arrl.net
Sun Dec 18 09:47:31 CET 2016


Great research Gernot, thanks & congrats.

Updated test script attached.

73,
Bob, N6TV

On Sat, Dec 17, 2016 at 4:24 PM, <gt-i at gmx.net> wrote:

> See https://support.microsoft.com/en-us/kb/115831
>
>
> Am 18.12.2016 um 01:02 schrieb gt-i at gmx.net:
>
>> Bob,
>> I just figured out the nasty trick: the antenna switch installs a virtual
>> com port named "COM14". Using this in a call to io.open will create a text
>> file under windows. One has to name all com-ports > COM9 in UNC notation.
>> Here is the adapted code line:
>> local rsw62 = io.open("\\\\.\\"..RSW_COMPORT, "w")
>> Thanks for your support.
>> 73 Gernot, DF5RF
>>
>>
>> Am 16.12.2016 um 01:25 schrieb Bob Wilson, N6TV:
>>
>>> If you install Portmon <https://technet.microsoft.com
>>> /en-us/sysinternals/portmon.aspx> you can trace all bytes being written
>>> to the serial port. Perhaps it requires DTR=ON RTS=ON instead of OFF or a
>>> different baud rate that what I've hard coded in the MODE command.  Send me
>>> your script as an attachment and a PDF file documenting the required
>>> command stream for your antenna switch device, and I'll take a look.
>>>
>>> I wrote bytes to an FTDI serial port using my script, and it seemed to
>>> work fine, the trace showed the bytes being written OK, encluding SOH and
>>> ETX.
>>>
>>> 73,
>>> Bob, N6TV
>>>
>>> On Thu, Dec 15, 2016 at 4:15 PM, <gt-i at gmx.net <mailto:gt-i at gmx.net>>
>>> wrote:
>>>
>>>     Bob,
>>>     good hint. However, after playing quite a while, I'm pretty sure
>>>     that io.write does not send anything out, instead it seems to
>>>     write it to an internal buffer which I can check using :read(1). I
>>>     tried :flush() and :setvbf("no") which did not cure this. I also
>>>     played with variations of io.open(.."w", "r+") etc. I tested on a
>>>     phyiscal COM-port with an Echo-plug (RX/TX, all Modemlines
>>>     connected to each other), to a virtual one using com0com etc - no
>>>     change.
>>>     Any other idea?
>>>     Tnx,
>>>
>>>     Gernot DF5RF
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.f5mzn.org/pipermail/support/attachments/20161218/90cf38d1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: COM_Test.wts
Type: application/octet-stream
Size: 2312 bytes
Desc: not available
URL: <http://lists.f5mzn.org/pipermail/support/attachments/20161218/90cf38d1/attachment.obj>


More information about the Support mailing list