[Xastir-dev] interface xastir to aprs-over-lora

Tom Russo russo at bogodyn.org
Fri Jul 23 14:46:07 PDT 2021


On Fri, Jul 23, 2021 at 06:17:05PM +0200, we recorded a bogon-computron collision of the <kristoff at skypro.be> flavor, containing:
> Hi all,
> A quick question.

There is no such thing. ;)

> A few people in our local radioclub have become interested in aprs over
> lora, mainly using the LilyGo T-beam devices. This is in essence an ESP32
> running arduino-code + a 'lora32' module (which is a clone of of the
> sx1276).
> I have been tinkering with the kit, mainly using micropython to get to
> understand the sx1276 chip.
> 
> So,
> If I would would want to use that device as an interface for xastir, what
> would be the most easy way to do this?

I don't think there is an easy way, just varying degrees of difficult
ways.

I am not the best person to answer you, but as nobody else has jumped on
your question, I'm the best you've gotten so far.  I am completely unfamiliar 
with the data format LoRa requires, and can only offer general comments.

> I guess just use the serial interface and create some kind of "bridge"
> between the serial packets and the Lora "air-interface"?

You would have to come up with a means to send the appropriate commands and
data to the Lora.  

Xastir is mostly set up to communicate to regular packet radio terminal 
node controllers, most of which share a common command interface.  There
is not a whole lot of support for alternate computer-to-radio interfaces,
and if Lora is really very different from packet radio TNCs you might have
your work cut out for you.

If you can translate between TAPR TNC2 format or KISS data streams into
the type of data stream Lora is expecting, that might be an option.  Adding
a new interface type and all the code needed to support it directly to Xastir
would be a difficult task, though a determined hacker would probably be 
able to get it done.  The interface code in Xastir is not particularly
easy to read or extend.

All of these devices are more like network interface cards than modems or 
serial ports --- they packetize the data in AX.25 network format on transmit,
and strip the payload out of the packet on receive.

> What is the difference between the "Serial TNC", "Serial KISS TNC" and the
> "Serial Multi-Port KISS TNC"?

"Serial TNC" is a standard TAPR TNC2-compatible TNC on a serial port.  This is
the same type of TNC used for regular packet radio for decades, and there are
lots of places to learn about the data format and command system it expects.

A google search for "TNC2 compatibility" will get you a lot of information.

This mode of TNC operation is basically originally intended for normal packet
radio conversations, and so is completely human readable.  One could 
connect a serial terminal to such a TNC and simply type commands and data
into it, and the data would be converted to packet information (with 
source and destination addresses and other information added) and 
sent over the air.

When using this interface, Xastir is sending data to the TNC in fairly
human readable text format that includes commands to tell the TNC what
our own call sign is, to accept a line of data, and lines of formatted APRS 
data as given in the spec: http://aprs.org/doc/APRS101.PDF

Not only that, but it is looking for responses from the TNC, and expecting
incoming data to conform to that TAPR TNC2 standard.

"Serial KISS TNC" is a TNC in "Keep It Simple Stupid" mode.  This is a
simplified protocol for getting data from the computer to the TNC in a
format that is not human readable.

Here's a start for grokking what KISS TNCs are about:
https://en.wikipedia.org/wiki/KISS_(TNC)

There are many KISS TNCs out there, including software implementations that 
run on Linux.

"Serial Multiport TNC" is a somewhat more specialized device  that can
be used to support multiple radios.  The only one I know of that is of
current manufacture is this one:
https://hamcity.com/ham-equipment/kantronics-tnc/kam-xl.html

I think most Xastir users these days use KISS TNCs, either hardware (if you're
old school like I am) or software (Direwolf is the current favorite as far
as I know).

> Where can I find the documentation for this?

There is no specific documentation for interfacing Xastir to anything but
the various packet radio TNCs already out there.  If you can come up with
a way of basically parsing out the serial TNC data stream (perhaps by having
a fake serial port that talks to your bridge program) and reformat it for
Lora use it is probably the fastest way to get to your goal if you want to 
use Xastir.  

There may be others here who are more familiar with Lora who can give you a
better answer than this.

> I have been discussion with a fellow ham on the use of 'UART pass-through'
> devices on LoRa. These are very simple, once they are configured, you just
> send data and receive data as it is a transparent serial path, ... except
> that it is 'multicast'.
> 
> What would be the best way to connect this kind of device to xastir?

I cannot begin to answer this question having never looked into LoRa
before, but "just send data and receive data as a transparent serial path" is 
not really how the interfaces in Xastir are designed --- there's a strong 
AX.25 assumption throughout that implies we're constructing AX.25 packets.  
What differs is how these are communicated to a device that translates them 
into radio.  

Each interface type in Xastir is trying to encode and decode APRS information
in a manner specifically intended for that type of connected device.  
I don't believe there is any mode in Xastir where you could expect to connect
two computers together via a serial port and run Xastir on each, and have
the two Xastir instances understand each other.  If anything is close to
that, it would be KISS, but even that still has *some* extra command stuff
present in the transmitted serial data that is not supposed to show up on
the receiving end.

It may be the case that you'd have to write your own interface code in 
xastir to make use of this, unless you go the "bridge code" route you suggest,
having something in between Xastir and your LoRa libraries that reformats
the data.  It is probably the case that the KISS format would be the easiest
to work with, but even that might not be "easy".

-- 
Tom Russo    KM5VY
Tijeras, NM  

 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir-dev mailing list