Giter Club home page Giter Club logo

Comments (9)

cminyard avatar cminyard commented on May 29, 2024 1

Just FYI, I have added Go language support to the gensio library.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024 1

I was able to get it to work under Windows. gensio is compiled with mingw64. There were a few little fixes, but nothing big, and it's all checked into the master branch of gensio.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024

I realized I commented in a closed issue. So here it is again...

I have just finished implementing an AX25 library in C. It's part of the gensio library at https://github.com/cminyard/gensio and it's portable to Windows, MacOS, and Linux. It has C++ and Python bindings at the moment. I assume Go wouldn't be very hard.

I would really like to avoid having to deal with the Linux kernel AX25 stack. I don't know Go, though. I could learn it if you are interested.

The gensio library can do a lot of other things that might be useful, too.

Obviously it hasn't been around that long, but I'm planning to keep working on it. I have my own uses for it.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024

I now have native AX.25 support working in pat. To use this, do the following:

git clone https://github.com/cminyard/wl2k-go.git
cd wl2k-go
git checkout gensio-work
cd ..
git clone https://github.com/cminyard/pat.git
cd pat
git checkout gensio-work
./make.bash libax25
./make.bash gensio
./make.bash

This adds a new connection type named "gax25" that works much like ax25, except it doesn't require the kernel's ax25.
There is a new pat configuration entry for it.

This is based on the gensio library, and the connection below the ax25 layer is specified with a gensio string specifier. The default one is:

kiss,tcp,localhost,8001

which will connect to port 8001 and run kiss on top of that and ax25 on top of that. To connection to a kiss tnc:

kiss,serialdev,/dev/ttyS0,9600n81

Many other transports are available, like UDP, SCTP, unix sockets, ptys, stdio to another program, and connections to remote serial ports with serial port control (RFC2217). It can do encryption and authentication, too. For instance, I've tested by setting up a UDP repeater and run it on a local network without a radio. Handy for testing, especially automated.

I'm hoping this is interesting to the maintainers. It's a lot easier than using the kernel stack. It's going to be rough on the edges at this point, but it does seem to work ok for connecting into the winlink network and for P2P communication.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024

Oh, I forgot, you need a bleeding-edge version of swig, the master branch at https://github.com/swig/swig so you'll need to check that out and install it so it's first in the PATH.

I've found quite a few issues with swig and Go, and there are still a few pending that I have workarounds for.

Also note that gensio works on Windows, so it would be possible to have native AX.25 support on WIndows with this.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024

Well, sorry, the swig people haven't pulled in some patches I sent yet. You will need to get swig from https://github.com/cminyard/swig and use the add-goin-newline, branch. It's a pain, yes. But swig will generate go code that won't compile without those patches.

from wl2k-go.

xylo04 avatar xylo04 commented on May 29, 2024

Still, this is exciting! I can't wait to try it out!

from wl2k-go.

martinhpedersen avatar martinhpedersen commented on May 29, 2024

Very exciting indeed 🙂 👍 Looks like gensio and Go's net package solves much of the same things, by providing a common abstraction over networked I/O. Could be a very good fit 👍

I have some concerns regarding taking in such a large non-Go dependency though. It complicates the build process, especially when it comes to cross compilation to other platforms. That's one of the reasons why a native AX.25 implementation would be such a nice addition to the project. Currently, we can provide everything but AX25 natively. Meaning you can build a full-blown Pat binary for your Android phone as simply as GOOS=android GOARCH=arm64 go build, without the AX.25 support.

But since we're already using cgo to link against libax25 on Linux, I guess we could consider replacing it with this to support even more platforms. The way I ended up implementing support for Linux's AX.25 stack was to use a specific opt-in build tag libax25 in combination with the OS specific build tags. It ensures that both wl2k-go and Pat can be compiled as pure Go programs, making it highly portable. We have also emphasized on not linking against shared libraries, to make the binaries as portable and self-contained as possible. I guess it should be possible to statically link against gensio the same way? 🤔

Another approach could be to wrap gensio in a small app much like libhamlib's rigctld. Then gensio would be like any another modem for Pat 🙂 The benefit of this approach is of course that you could add multiplexing support so multiple apps could share the same AX.25 device.

from wl2k-go.

cminyard avatar cminyard commented on May 29, 2024

from wl2k-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.