Comments (9)
Just FYI, I have added Go language support to the gensio library.
from wl2k-go.
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.
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.
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.
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.
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.
Still, this is exciting! I can't wait to try it out!
from wl2k-go.
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.
from wl2k-go.
Related Issues (20)
- fbb: Support yet another undocumented date header layout (2006-01-02 15:04) HOT 1
- lzhuf: port to Go
- ardop: Migrate to the new host interface introduced in v0.5 HOT 1
- ardop: Host interface changed yet again HOT 2
- Support for KISS over TCP HOT 5
- Switch to github.com/tarm/serial HOT 2
- ardop: panic: close of closed channel
- ardop: support version 2 HOT 1
- transport: Support AGWPE over TCP (direwolf) HOT 22
- Add support for ICS forms HOT 2
- Add support for VARA HOT 4
- Linux NetROM support HOT 10
- Dangling socket on failed connection HOT 2
- FBB: More lenient date\time parsing HOT 3
- CLI client for manual WL2K commands?
- Issue with Hurricane form HOT 1
- ARDOP: Enable FSKONLY mode HOT 6
- Error handling B2F message with leading CRLFs
- Connection failure using agwpe implementation HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wl2k-go.