Pat-gensio -.7, Pat with built-in ax25 (and a few other things) is released

267 views
Skip to first unread message

Corey Minyard

unread,
Aug 10, 2022, 11:20:34 PM8/10/22
to pat-users

This release adds the ability to run a script after gax25 connects. It also fixes rig support for gax25, which wasn't working in 0.6.

To use scripting, add script= to the url as a standard url item. So, for instance, I used:

Ā Ā  pat connect 'gax25:///n5cor-10?parms=extended=0&script=./testscr'

the script is a program. If the program writes to stdout, that will be written to ax25. Data received on ax25 will be sent to stdin on the program. Once the program exits, the connection process will continue. This way you can write a script in the programming language of your choosing, like expect, for instance. Or python. Or shell.

If connecting via the web gui, you can add &script=... to the parms field and it should work.

This is not well tested.Ā  I don't have an easy way to test this without doing a lot of hacking things up.Ā  The scripting gensio is tested, I've tested that I can run a script, but that script couldn't do any I/O without breaking my as25 connection.

This should work on Windows, as all the code is generic, but is not tested.

It's available at https://github.com/cminyard/pat/releases/tag/gensio-0.7

For a review, this version of Pat is one with an AX25 packet stack built in. Ā This means:

* You don't have to mess around with the Linux AX25 stack for packet. Ā It's all configured in Pat.
* AX25 packet works on Windows and Mac.

Also:

* I have ported over some patches and added my own patches to fix some forms issues; it will now properly load the To field and others from a form.

* D710 setup is availableĀ  See https://github.com/cminyard/pat/tree/gensio-work

* and, of course, there is scripting now.

It currently has a separate configuration area in the configuration file.Ā  It will be added for you if you haven't use Pat before, but if you already have a Pat configuration, you will need to add:

Ā  "gax25": {
Ā  Ā  "gensio": "kiss,keepopen(discard-badwrites=yes),tcp,localhost,8001",
Ā  Ā  "beacon": {
Ā  Ā  Ā  "every": 3600,
Ā  Ā  Ā  "message": "Winlink P2P",
Ā  Ā  Ā  "destination": "IDENT"
Ā  Ā  }
Ā  },

right after the end of the "ax25" section.Ā  But either way, "localhost" is the location of the modem (like direwolf, I've also tried soundmodem on Windows) and 8001 is the TCP port of the modem.Ā  The defaults work for direwolf default on the local machine.

The build works similar to a normal Pat build if you want to build it yourself.Ā  Go to https://github.com/cminyard/pat/tree/gensio-work and scroll to near the bottomĀ  under the "Pat with native AX.25" label.Ā  This will give instructions on how to build it.

-corey - AE5KM

Cal Brabandt

unread,
Dec 5, 2022, 11:36:18 PM12/5/22
to pat-users
Hi, Corey.

I'd like to try pat-gensio but I get "'GLIBC_2.33' not found....
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  "'GLIBC_2.34' not found....
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  "'GLIBC_2.32' not found....
etc.

Debian (and my MX-Linux Debian-based distros) skipped 2.32, 2.33, and 2.34. Packages jump from 2.31 to 2.36 from Bullseye (stable) to Bookworm (testing) and Sid (unstable).

From what you describe, I think it would be easier for me to compile a new glibc library than compile pat-gensio (or solder up my NucleoTNC PCB or maybe install Direwolf). Do you have a version that works with Debian?

Thanks!

CalĀ  AD8Q

Cal Brabandt

unread,
Dec 5, 2022, 11:38:53 PM12/5/22
to pat-users
I forgot to include a link to the available Debian glibc (libc6) packages.

CalĀ  AD8Q

Cal Brabandt

unread,
Dec 7, 2022, 2:40:11 AM12/7/22
to pat-users
I gave up on finding a libc6 Debian .deb file that's compatible with the pat-gensio pre-compiled binary and followed the "Building" section here:

I almost made it. On the last make comman, I get the following errors. Has anyone other than the developer ever successfully built pat-gensio?

Thanks,

CalĀ  AD8Q

$ ./make.bash
CFLAGS: -I/home/demo/pat/.build/libax25-0.0.12-rc4
CXXFLAGS: -I/home/demo/pat/.build/gensio-2.6.0-rc6/include -I/home/demo/pat/.build/gensio-2.6.0-rc6/c++/include -DGENSIO_LINK_STATIC
LDFLAGS: /home/demo/pat/.build/libax25-0.0.12-rc4/.libs/libax25.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiocpp.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiomdnscpp.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiooshcpp.a .build/gensio-2.6.0-rc6/lib/.libs/libgensio.a .build/gensio-2.6.0-rc6/lib/.libs/libgensiomdns.a .build/gensio-2.6.0-rc6/lib/.libs/libgensioosh.a -lasound
Downloading Go dependencies...
Running tests...
# github.com/la5nta/wl2k-go/transport/ax25.test
/usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: .build/gensio-2.6.0-rc6/lib/.libs/libgensioosh.a(libgensioosh_la-gensio_osops.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

# github.com/la5nta/pat.test
/usr/local/go/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
/usr/bin/ld: .build/gensio-2.6.0-rc6/lib/.libs/libgensioosh.a(libgensioosh_la-gensio_osops.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

FAIL Ā  Ā github.com/la5nta/pat [build failed]
? Ā  Ā  Ā  github.com/la5nta/pat/cfg Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/buildinfo Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/cmsapi Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/debug Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/directories Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/forms Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/gpsd Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/pat/internal/osutil Ā  Ā [no test files]
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/catalog Ā  Ā (cached)
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/fbb Ā  Ā (cached)
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/lzhuf Ā  Ā (cached)
? Ā  Ā  Ā  github.com/la5nta/wl2k-go/mailbox Ā  Ā [no test files]
? Ā  Ā  Ā  github.com/la5nta/wl2k-go/rigcontrol/hamlib Ā  Ā [no test files]
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/tests Ā  Ā (cached)
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/transport Ā  Ā (cached)
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/transport/ardop Ā  Ā (cached)
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/transport/ardop2 Ā  Ā (cached)
FAIL Ā  Ā github.com/la5nta/wl2k-go/transport/ax25 [build failed]
? Ā  Ā  Ā  github.com/la5nta/wl2k-go/transport/telnet Ā  Ā [no test files]
ok Ā  Ā  Ā github.com/la5nta/wl2k-go/transport/winmor Ā  Ā (cached)
FAIL



Cal Brabandt

unread,
Dec 9, 2022, 2:41:50 AM12/9/22
to pat-users
SOLVED--at least for me!

I haven't fixed the pat-gensio build bug, but I've hacked my way around it. It's a failure of the the configure and makefiles to permit adding an extra library to the gensio build.


If one follows the README.md instructions in the git source (https://github.com/cminyard/pat/blob/gensio-work/README.md) exactly, the make.bash steps for building and linking gensio will lead to a failure due to a missing library in the last two steps. The "DSO missing" error and associated information is displayed on the screen:

Ā  CCLD Ā  Ā  gensiot
/usr/bin/ld: ../lib/.libs/libgensio.a(libgensio_la-gensio_filter_afskmdm.o): undefined reference to symbol 'tan@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:715: gensiot] Error 1
make[2]: Leaving directory '/home/calinb/pat/.build/gensio-2.6.0-rc6/tools'
make[1]: *** [Makefile:528: all-recursive] Error 1
make[1]: Leaving directory '/home/calinb/pat/.build/gensio-2.6.0-rc6'
make: *** [Makefile:460: all] Error 2
CFLAGS: -I/home/calinb/pat/.build/libax25-0.0.12-rc4
CXXFLAGS: -I/home/calinb/pat/.build/gensio-2.6.0-rc6/.build/gensio-2.6.0-rc6/include -I/home/calinb/pat/.build/gensio-2.6.0-rc6/.build/gensio-2.6.0-rc6/c++/include -DGENSIO_LINK_STATIC
LDFLAGS: /home/calinb/pat/.build/libax25-0.0.12-rc4/.libs/libax25.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiocpp.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiomdnscpp.a .build/gensio-2.6.0-rc6/c++/lib/.libs/libgensiooshcpp.a .build/gensio-2.6.0-rc6/lib/.libs/libgensio.a .build/gensio-2.6.0-rc6/lib/.libs/libgensiomdns.a .build/gensio-2.6.0-rc6/lib/.libs/libgensioosh.a -lm -lasound -lnsl -ldl -lpthread


As reported in the error, the reference to tan is not available because /usr/bin/ld: /lib/x86_64-linux-gnu/libm.so was not correctly linked by the -lm LDFLAG. This seems to be caused by the pat/.build/gensio-2.6.0-rc6/ Makefile being re-downloaded and configured by make.bash every time a build is attempted.

I worked around it by running the build steps to the error and then adding -lm this line in the pat/.build/gensio-2.6.0-rc6/Makefile:

LIBS = -lm -lnsl -ldl -lpthread -lasound

Next and before running make.bash, I had to disable the section that redownloads, patches, and configures the gensio source. Note the lines that I commented out in pat/make.bash:

function install_gensio {
Ā  Ā  Ā  Ā  mkdir -p .build && cd .build
Ā  Ā  Ā  Ā  if [ ! -f "${GENSIODIST}" ]; then
Ā  Ā  Ā  Ā  Ā  Ā  Ā Ā  echo "Downloading ${GENSIODIST_URL}"
# Ā  Ā  Ā  Ā Ā  Ā Ā  curl -LSsf "${GENSIODIST_URL}" | tar zx
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  cd "${GENSIODIST}"
# Ā  Ā  Ā  Ā  Ā Ā Ā  for i in ${GENSIODIST_PATCHES}; do
# Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  echo "Applying patch $i"
# Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  curl -LSsf "${GENSIODIST_BASEURL}/$i" | patch -p1
# Ā  Ā  Ā  Ā  Ā  Ā Ā  done
Ā  Ā  Ā  Ā  else
Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  cd "${GENSIODIST}"
Ā  Ā  Ā  Ā  fi
Ā  Ā  Ā  Ā  ./configure --prefix=/ --enable-static --disable-shared --with-go=no --with-sctp=no --with-mdns=no --with-ssl=no --with-certauth=no --with-ipmisol=no && make && cd ../../

Finally the build completed and produced a pat executable file customized for my libc6. I've not tested the AX.25 and 1200 baud AFSK modem features yet but it ran and served up the http interface on localhost:8080 with no libc6 runtime errors, which the pre-compiled version produces on my MX-Linux systems.

73

CalĀ  AD8Q

Corey Minyard

unread,
Dec 13, 2022, 3:32:09 PM12/13/22
to Cal Brabandt, pat-users
Well, I apologise, I should have responded to this much earlier.

However, your perseverance and smarts have paid off for you, it appears.

The
"'GLIBC_2.33' not found....
"'GLIBC_2.34' not found....
"'GLIBC_2.32' not found...
thing should be covered by glibc 2.36, newer versions should cover the
older versions. But this is always a pain with shared libraries.

The missing -lm in the build is a bit odd. configure should add that
automatically, but I will fix the build to add it. Obviously, we are
doing math, we need the math library.

BTW, I'ld like to hear if this is working ok for you.

Thanks,

-corey
> --
> You received this message because you are subscribed to a topic in the Google Groups "pat-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/pat-users/zq44_CRLq5I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to pat-users+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/pat-users/fcd0da4b-9251-4d2e-8ce9-2b4252605b8cn%40googlegroups.com.

Cal Brabandt

unread,
Dec 29, 2022, 3:05:00 AM12/29/22
to pat-users
Thanks for your reply and thanks for fixing the -lm, Corey. Yes--pat-gensio 1200 baud AFSK is working for me. I've not yet made a QSO but I've tested most of the steps to get there. The problem is my geographically challenging QTH here in rural Idaho. I tried to hit some Winlink RMStations using it with my IC-7100 but the stations are too far away (and I live halfway down the 2000' deep Clearwater river canyon) so my QTH is quite challenging and limited for VHF and UHF, in general. I monitored the output of my IC-7100 with my Baofeng HT and the pat-gensio output sounds like it should work--at least to my human ear. One of the members of the 3Rivers Ham Radio club runs a Winlink RMS. I'm a member too so maybe I'll try it when I drive to a meeting an hour's drive away someday.

I also should be able to use VOX PTT on my Baofeng, but VOX works poorly on it. It requires a very large audio level to trigger and the latency might be too great, regardless. Maybe I'll pack my IC-7100 to ham a club meeting an hour's drive away and try it sometime. Of course my 7100 works with rigctld.

I like that pat-gensio integrates everything needed for packet into pat. I actually have a mobilinkd NucleoTNC PCB and all the parts, but I've not built it yet. Your pat-gensio program held more interest for me. Maybe I'll buy a better HT someday. One of the reasons that pat-gensio appeals to me is I have a Pinephone (Linux arm64 phone) and it runs pat-gensio too! Of course it has a "soundcard" to so all I need is pat-gensio and my Pinephone (and maybe a better HT)--no extra bulky soundcard or TNC/modem required!

Your arm64 binaries run on both my Pinephone and my Pinebook pro. My Intel/AMD x64 laptops required the custom build. I almost built libc instead, but that was turning into a huge project so I went for building pat-gensio instead. There is no 2.32 and up .deb package that works on my amd64 architecture machines (MX-Linux) or Debian. A .deb package is available for Ubuntu but it uses zst compression, which Debian and MX don't support so a custom dpkg build would be required, if that path were taken instead.

BTW, I participate in Idaho's "Winlink Wednesday" net exercise every week and I now use pat-gensio for it instead of the regular pat, but I need HF and ardopc from my QTH--usually on 80 meters using an NVIS-capable OCFD.

Sorry for my tardy reply and thank you for your pat-gensio contribution to packet radio, Winlink, and amateur radio!

73
CalĀ  AD8Q
Reply all
Reply to author
Forward
0 new messages