Packet connection script

414 views
Skip to first unread message

Scott Currie

unread,
Sep 29, 2023, 12:03:41 AM9/29/23
to pat-users
So, I have asked this before, but don't see that is was ever really answered. Does Pat support packet connections that require multiple hops through network nodes?

In Winlink Express we call this connection scripts, and it is trivial to do. It is virtually impossible to connect to our local gateways here without going through a network node, so you must first connect to the node, then tell the node to connect to the gateway (and specifically on a different port on the node). A typical script would be:
c W6SLO-1  <--connect to the node
CONNECTED  <--the expected response text
C 2 AE6EQ-7 <--tell the node to connect to AE6EQ-7 on port 2
CONNECTED <--the expected response from the node when the connection is made

Once the second "CONNECTED" is received, the script ends and the connection continues as though it was a direct connection to the gateway.

If I can't figure out a way to do this, we really can't deploy Pat here.

-Scott, NS7C

Ben Kuhn

unread,
Sep 29, 2023, 10:55:43 AM9/29/23
to pat-users
There is an open bug report requesting this and it's set as a milestone for version 1.1


If you have a Github account, maybe a note there regarding the proposed options and your use case would help.

You can use a digipeater in pat, but that has it's own issues, and doesn't work at all if you need to connect to the Winlink gateway on a different port/frequency and the node isn't configured to digipeat between ports.

73,
Ben KU0HN

Scott Currie

unread,
Sep 29, 2023, 4:21:57 PM9/29/23
to pat-users
Hmm, almost 6 years ago, that's discouraging. Network nodes have been in use on packet for over 35 years now, seems like this would be an issue for a lot of people. Or maybe they are all using Winlink Express if their local network includes these resources.

-Scott, NS7C

Jon Jacox

unread,
Sep 29, 2023, 5:19:08 PM9/29/23
to pat-users
This is a feature I am waiting for as well. I use PAT at my QTH but I can't use it at our EOC because of this issue. 

Scott Currie

unread,
Nov 16, 2023, 10:22:17 PM11/16/23
to pat-users
Yes, I can't recommend moving forward with Pat in our region. Without scripting it is impossible to connect to any of our RMS stations on V/UHF. That leaves Linux and Mac users with few options.

-Scott, NS7C

Benjamin Seidenberg

unread,
Nov 17, 2023, 10:46:54 AM11/17/23
to pat-users
I'd like to remind folks that Pat is open source. If it's missing a feature that's important to you, you can just build that feature yourself, or find someone in your region to do so.

As someone who needed features to build a monitoring node for my own EmComm group, I can tell you I did just that (learned Go just for this), and the development team was incredibly helpful and friendly and supportive with taking my initial efforts and polishing and including them into Pat.

So don't just wait...help!

73,
Benjamin, WY2K

Brian Hendrix

unread,
Nov 17, 2023, 11:19:18 AM11/17/23
to Benjamin Seidenberg, pat-users
So I’d like to try that. I’m Senior Linux Engineer — mostly scripting — what’s the toolset to start to help? You mentioned Go. Is that the place to start?
Sent from my iPhone

On Nov 17, 2023, at 9:46 AM, Benjamin Seidenberg <astr...@gmail.com> wrote:

I'd like to remind folks that Pat is open source. If it's missing a feature that's important to you, you can just build that feature yourself, or find someone in your region to do so.
--
You received this message because you are subscribed to the Google Groups "pat-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pat-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pat-users/e00654df-1ad8-45ca-9315-0471ea057869n%40googlegroups.com.

LA5NTA

unread,
Nov 18, 2023, 6:12:47 AM11/18/23
to pat-users
That's excellent! Thanks for volunteering Brian :D And thanks for pitching in with the encouragement, Benjamin :)

Yes, this is a much needed feature. I'd be happy to help in anyway I can. I don't have access to any packet nodes configured in such a way, so I won't be able to help with testing unfortunately.

Brian - Yes, Go is the language of choice in this project. It's a language with a relatively small footprint, designed to be easy to get started with. If you have any experience with more traditional languages like C or Java you'll pick this up quick I believe. I'd recommend starting by building Pat from source. And please also read CONTRIBUTING.md.

As for the actual implementation details, let's keep discussing this in https://github.com/la5nta/pat/issues/114.

Thanks!

-- 
73 de LA5NTA / Martin

Corey Minyard

unread,
Nov 28, 2023, 9:50:12 AM11/28/23
to Scott Currie, pat-users
If you want something right now, I have a fork of Pat called
Pat-gensio at https://github.com/cminyard/pat (look under the
"Releases" section for binaries). It has a script capability, and I
believe others have used it for this capability. It uses the gensio
library, which has a bunch of capabilities.

If you are interested, I can help you set it up.

You probably still want to plan on getting mainline Pat to do this, as
this is really just my experimental playground, but I'm happy for
other people to use it. Then you can switch back when someone gets
scripts working in Pat.

-corey
> --
> You received this message because you are subscribed to the Google Groups "pat-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pat-users+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/pat-users/66c5803b-7b5d-43ee-b571-6455038f2543n%40googlegroups.com.

Martin Hebnes Pedersen

unread,
Dec 7, 2023, 1:38:29 AM12/7/23
to pat-users

Getting really close to finalizing the lower level functionality :) The PR adds a prehook by executing a script/program and proxies data through stdio. The script is expected to do the node traversal.

Need testers soon. Anyone up for it?

Please read the PR description and my recent posts in the referenced issue.

Thanks!

-- 
73 de LA5NTA / Martin

MJ Inabnit

unread,
Dec 8, 2023, 3:36:08 PM12/8/23
to pat-...@googlegroups.com

Hello Martin,

Is this going to use the serial port/kiss to connect with TNC or the
ax25 stack? I'm all for a direct serial/kiss testing.

Tnx & 73
Jaye

On 12/6/23 10:38 PM, Martin Hebnes Pedersen wrote:
> https://github.com/la5nta/pat/pull/432
>
> Getting really close to finalizing the lower level functionality :) The
> PR adds a prehook by executing a script/program and proxies data through
> stdio. The script is expected to do the node traversal.
>
> Need testers soon. Anyone up for it?
>
> Please read the PR description and my recent posts in the referenced issue.
>
> Thanks!
>
> -- 
> 73 de LA5NTA / Martin
>
> lør. 18. nov. 2023, 12:12 skrev LA5NTA <martin.h...@gmail.com
> <mailto:martin.h...@gmail.com>>:
>
> That's excellent! Thanks for volunteering Brian :D And thanks for
> pitching in with the encouragement, Benjamin :)
>
> Yes, this is a much needed feature. I'd be happy to help in anyway I
> can. I don't have access to any packet nodes configured in such a
> way, so I won't be able to help with testing unfortunately.
>
> Brian - Yes, Go is the language of choice in this project. It's a
> language with a relatively small footprint, designed to be easy to
> get started with. If you have any experience with more traditional
> languages like C or Java you'll pick this up quick I believe. I'd
> recommend starting by building Pat from source
> <https://github.com/la5nta/pat/wiki/Building-from-source>. And
> please also read CONTRIBUTING.md
> <https://github.com/la5nta/pat/blob/master/CONTRIBUTING.md>.
>
> As for the actual implementation details, let's keep discussing this
> in https://github.com/la5nta/pat/issues/114.
>
> Thanks!
>
> -- 
> 73 de LA5NTA / Martin
> fredag 17. november 2023 kl. 17:19:18 UTC+1 skrev
> dbrian...@gmail.com <mailto:dbrian...@gmail.com>:
>> <https://groups.google.com/d/msgid/pat-users/e00654df-1ad8-45ca-9315-0471ea057869n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "pat-users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to pat-users+...@googlegroups.com
> <mailto:pat-users+...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pat-users/1d44dcfb-3b00-456e-a901-72743cda05d3n%40googlegroups.com
> <https://groups.google.com/d/msgid/pat-users/1d44dcfb-3b00-456e-a901-72743cda05d3n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "pat-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pat-users+...@googlegroups.com
> <mailto:pat-users+...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pat-users/CAAUuLGn5vqM63w03Vk0D%2BJ9Dgc8AuyPT1NyuTdE5Sy5vhHr56A%40mail.gmail.com
> <https://groups.google.com/d/msgid/pat-users/CAAUuLGn5vqM63w03Vk0D%2BJ9Dgc8AuyPT1NyuTdE5Sy5vhHr56A%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--

wishing you well
Jaye, ke6sls--via the toshiba w/thunderchicken

Chris Keller

unread,
Dec 8, 2023, 3:36:08 PM12/8/23
to Martin Hebnes Pedersen, pat-users
In theory there's enough packet infra in Denver for me to help test. I've never tried hopping through nodes this way, though.

Herbert Crosby

unread,
Dec 8, 2023, 3:36:08 PM12/8/23
to Martin Hebnes Pedersen, pat-users
Happy to test.
Herbert Crosby KD5PQJ 

LA5NTA

unread,
Dec 8, 2023, 3:40:33 PM12/8/23
to pat-users
Hi Jaye,

The implementation will support all transports available in Pat :)

-- 
73 de LA5NTA / Martin

LA5NTA

unread,
Dec 8, 2023, 4:04:15 PM12/8/23
to pat-users
Chris, Herbert - Thanks, that would be very nice!

The branch should be usable now, and my latest comment in the PR provides an example script as a starting point.

    ("fast route" will suffice for agwpe and serial-tnc)

Herbert - If you're not comfortable building from source, then please let us know and we'll send you a pre-built binary.

Thanks!

-- 
73 de LA5NTA / Martin

Scott Currie

unread,
Dec 28, 2023, 12:28:20 PM12/28/23
to pat-users
I'm trying to follow the "fast route" build, but I'm not sure what to version to pull to test this. Can someone give me the correct version here: go install github.com/la5nta/pat@latest ??

I'll probably need a lot more hand-holding....

-Scott, NS7C

Martin Hebnes Pedersen

unread,
Dec 28, 2023, 3:08:34 PM12/28/23
to Scott Currie, pat-users
Try `go install github.com/la5nta/pat@3b2a25453659c2b59b3f3f7f6e89241f1532b45b`

That's the commit sha of the latest commit of the prehook-branch :)



--
You received this message because you are subscribed to the Google Groups "pat-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pat-users+...@googlegroups.com.

Jean Létourneau

unread,
Apr 22, 2026, 6:52:46 AM (7 days ago) Apr 22
to pat-users
Hi, Have you got and answer about using Nodes with PAT? I have been searching and cannot find any working script.
73 de Jean
VA2OM / VE2PKT

Corey Minyard

unread,
Apr 22, 2026, 8:07:50 AM (7 days ago) Apr 22
to Jean Létourneau, pat-users
On Wed, Apr 22, 2026 at 5:52 AM Jean Létourneau <ve2...@gmail.com> wrote:
Hi, Have you got and answer about using Nodes with PAT? I have been searching and cannot find any working script.

I believe the trouble with this is that the script has to run below the AX.25 layer, and Pat doesn't have access to that, it runs above it.

The question should be: Is whatever you are using at a modem + AX.25 capable of doing this script?  Like direwolf.

I added script capability to Pat+gensio a while ago for someone, so it can do it.  I'd be surprised if direwolf didn't have something like this.

-corey
 
--
You received this message because you are subscribed to the Google Groups "pat-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pat-users+...@googlegroups.com.

Ed Bloom

unread,
Apr 22, 2026, 8:22:03 AM (7 days ago) Apr 22
to pat-...@googlegroups.com

I would like to ask a follow on question....

How do I manually connect to a given node (i.e. XX9XXX-1) and then issue the MHEARD command?

Doing this from Winlink Express.................

Respectfully,

Ed Bloom
--

LA5NTA

unread,
Apr 22, 2026, 9:50:32 AM (7 days ago) Apr 22
to pat-users
Hi all,

As mentioned earlier in this thread, we added lower-level support for this a while back. See https://github.com/la5nta/pat/pull/432.

It should (in theory) work, but I've never received feedback. I don't have such packet networks in my local area, so I've only done simulated tests myself.

1. Put an executable (e.g. a script) in the prehooks dir ( `pat help` prints the full path)
2. Run `pat connect 'ax25:///FOOBAR-10?prehook=my-script.sh'`

The devil is in the script details: The executable receives data from the remote node by reading stdin and can send data by printing to stdout. It means you can write scripts in any general-purpose language, giving full flexibility. I've published an example script in the PR written in bash.

Once we have enough data (example scripts), my plan is to define a simpler platform-independent scripting language that can be used instead of the low-level executable approach.

So please, those that have working examples: Share them here, so I can start working on the higher-level scripting language.


-- 
73 de LA5NTA

LA5NTA

unread,
Apr 22, 2026, 9:53:26 AM (7 days ago) Apr 22
to pat-users
onsdag 22. april 2026 kl. 14:22:03 UTC+2 skrev edbl...@gmail.com:

I would like to ask a follow on question....

How do I manually connect to a given node (i.e. XX9XXX-1) and then issue the MHEARD command?

Doing this from Winlink Express.................


That's not support in Pat. You can use a general purpose ax25 terminal program for that. E.g. axcall.

Scott Currie

unread,
Apr 25, 2026, 1:40:36 PM (4 days ago) Apr 25
to pat-users
The reason you have not received feedback is because the low-level support you added is not a workable solution for most people. I know several who have tried to get it working and just gave up. Building a local node test environment is trivial. Everything you need to know about scripts is in the Winlink Express help file. I'll post it here so you don't have to look it up:

Making a Packet Connection to an RMS Packet Server

Packet scripts contain three types of lines:

 

1. Command lines beginning with the character "!" (exclamation point).  Command lines are optional.  If they are not specified, default values are used.  Command lines may be placed anywhere in the script.  Currently, three commands are defined:

 

  !CONNECTTIME seconds -- This specifies the number of seconds allowed for each connection through the network.  The default value is 60.

 

  !TOTALTIME seconds -- This specifies the total number of seconds that will be allowed for the entire script to be completed.  The default value is 300.

 

  !WAITFOR text -- Specifies that the script is to pause until the specified text is found in the response from the packet server.

 

2. Connection/Response pairs -- Other than command lines, the script must have an even number of lines.  The first line of each pair is the command to be sent to the network to establish the connection to the next node.  The second line of the pair is the response that the script will wait for.  Note, the response may be long, and the script will proceed once the specified response is found anywhere in the response from the packet node.

 

The first connection/response pair specifies the initial, entry-point packet node into the network.  The last connection/response pair specifies the node that has the RMS server (Winlink session) or the destination packet station running the client program (peer-to-peer connections).

 

When building packet network scripts, keep the script as simple as possible.  Use "C" for "CONNECT", and "CONN" for "CONNECTED".

Sample packet network Netrom (X1J4, TheNet, K-Net, BPQ, etc.) connect  scripts are shown below.

In this example, Winlink Express VE1YZ-8 connects through network node VE1PKT to RMS Packet server VE1HRE-10.

 

C VE1PKT

CONN

C VE1HRE-10

CONN

 

In this example, Winlink Express VE1YZ-8 connects through network nodes VE1PKT and  VE1PKT-1  (alternate route), to RMS Packet server VE1HRE-10.

 

C VE1PKT

CONN

C VE1PKT-1

CONN

C VE1HRE-10

CONN

 

In this example, Winlink Express VE1YZ-8 connects through BPQ network node VE1DAR port 4, to RMS Packet server  VE1HRE-10.

 

C  VE1DAR

CONN

C  4 VE1HRE-10

CONN

 

Kantronics KA-Nodes are somewhat more complex in the construction of the connect script.  When initially connected to a KA-Node (VE1EPC-7 in this example), the KA-Node responds with:

###CONNECTED TO NODE VE1EPC-7(VE1EPC) CHANNEL A

ENTER COMMAND: B,C,J,N, OR HELP ?

 

In this case, the "!WAITFOR" command line is used in the script to look for the last unique character, or text string, before proceeding with the next connect line in the script.  In the menu above, the "?" at the end of the menu line is used as the desired response in the script.

 

When the KA-Node connects to the next node or station, the KA-Node responds with:

###LINK MADE

"LINK" is used  as the desired response in the script.

 

In the KPC-4 (and other Kantronics dual port TNCs), "X" (XCONNECT) may be used to initiate the connect on the opposite port.

 

In this example, Winlink Express VE1YZ-8 connects through KA-Node VE1EPC-7 to RMS Packet server VE1HRE-10.

 

C  VE1EPC-7

CONN

!WAITFOR ?

C VE1HRE-10

LINK

 

In this example, Winlink Express VE1YZ-8 connects through KA-Node VE1EPC-7 to network node VE1PKT, then to RMS Packet server VE1HRE-10.

 

C VE1EPC-7

CONN

!WAITFOR ?

C VE1PKT

LINK

C VE1HRE-10

CONN



-Scott,NS7C


LA5NTA

unread,
Apr 26, 2026, 9:47:13 AM (3 days ago) Apr 26
to pat-users
lørdag 25. april 2026 kl. 19:40:36 UTC+2 skrev scott.d...@gmail.com:
The reason you have not received feedback is because the low-level support you added is not a workable solution for most people. I know several who have tried to get it working and just gave up. Building a local node test environment is trivial. Everything you need to know about scripts is in the Winlink Express help file. I'll post it here so you don't have to look it up:
....

Hi Scott,

Thanks for the documentation. Having the Winlink Express scripting logic clearly laid out in one place is helpful.

To clarify for the list: The current "low-level" prehook is a diagnostic bridge designed to handle the high diversity of node software, response parsing, and timing issues found in the field. Building a robust, universal interpreter requires more than a standard spec - it requires real-world data from varied systems to ensure we handle edge cases and conditional logic correctly. I'm looking for logs and scripts from these diverse scenarios so I can fine-tune a higher-level, workable language that is reliable enough for any environment.

The goal was never to duplicate the scripting language implemented in Winlink Express, but to use these real-world tests to define a syntax that feels native to Pat’s architecture and use-cases. That said, given the detailed specification you provided, I think it might be best to implement the same language in Pat. Having a common scripting language means users can share scripts regardless of the software suite used.

To kick things off I'm going to publish a modified version of the example bash script, with support for the same syntax as Winlink Express uses. Hopefully that's plug-and-play enough to get some feedback.

I'm not convinced a simulated test environment will be diverse enough to capture all of the nuances out there. However, I agree that it would be a good starting point that might cover the most common cases.

If it's trivial to set up, then maybe you (or anyone else) can do it and share a working script or provide feedback in any other way? Remember, this is open-source. I'm excited to see how we can bridge this gap together. If we can get a few working examples for the most common node types, I'll be happy to spend some time implementing a higher-level scripting language directly into Pat's core.

I will be posting the updated example script as soon as I have some spare time. In the meanwhile, if anyone feels up to the task then please feel free to contribute.
Reply all
Reply to author
Forward
0 new messages