Jnos2.0m.1rc

Maiko has been busy again to make some adjustments in Jnos. A friend of mine had asked if it was possible to save a Most Heard list. A few days later it was already done. Fantastic. It is also possible to leave the file ftpusers and use hashed passwords.

Read change.2.0m.1.txt for al the new options.

Jnos Download

Save and Load ax25 Heard List
 -----------------------------

 The ax25 heard list can now be saved to a file or loaded (restored) from a file.

 Decided to also revamp the 'ax heard' command at the JNOS console, since there are
 now several commands available, all of which really should be categorized as being
 subcommands of 'ax heard' - so with this update, the new syntax is as follows :

     Usage : ax heard < show | dest > [<iface>]
             ax heard < save | load >

 The 'dest' and 'hearddest' commands are gone, absorbed by the above syntax.

 The heard data is kept in a new 'AxHeardFile' in the JNOS root directory.

 There are two files to update (ax25cmd.c and axheard.c), they have been added
 to the patch file noted further down (under the Password Management section),
 so if you're not interested in the password code, just extract the 2 files.

 Add '#define BACKUP_AXHEARD' to your config.h, then :

    rm ax25cmd.o axheard.o ; make

 

Write to Jnos UDP port.

I was reading in the release notes of NOSAprs and found something to play with.

Release 1.15b5 (patch)
======================

  • June 24, 2003
  •  DID YOU KNOW – You can send aprs data to NOSaprs using UDP port 16161, and it will go out the APRS rf port. It’s actually been like that for quite some time.

This are two ways to write data to the udp port 16161

#!/bin/bash
exec 3<>/dev/udp/192.168.1.101/16161
echo -e "writing to udp port 16161 Jnos" >&3
exec 3>&-

Sun Dec 22 20:59:52 2019 – ax0 sent:
KISS: Port 0 Data
AX25: PD9Q-10->APZ200 v WIDE1-1 UI pid=Text
0000 …writing to udp port 16161 Jnos…

#!/bin/bash
ver=$(uptime)
echo -n “$ver” | nc -4u -w1 192.168.1.101 16161

Sun Dec 22 20:59:56 2019 – ax0 sent:
KISS: Port 0 Data
AX25: PD9Q-10->APZ200 v WIDE1-1 UI pid=Text
0000 … 20:59:56 up 6:03, 2 users, load average: 0.16, 0.17, 0.17…

Nice let`s think about that

Jnos aprs setup

I running Jnos2.0m with the Aprs server enabled. This is the configuration that I use.

# NOSAPRS
#==================
aprs log /home/pd9q/jnos/aprs/master.log
aprs interface ax0
#
aprs logon call PD9Q-10
#
# I want the APRS Internet System to only send me traffic
# for stations that are within 300 KM, of my location. In my
# case, the city of Winnipeg is roughly 49d54m (Latitude)
# and -97d7m (Longitude).
#
#aprs logon filter r/51.3352/3.4815/50
#
# Configure the Position and Status texts that are broadcast
# out to the APRS Internet System (APRS IS).
#
aprs bc stat "Jnos inet/aprs gateway PD9Q-10"
aprs bc pos "5133.52N/00348.15E & JNOS https://packet-radio.net"
aprs bc timer 720
#
# Configure the Position and Status texts that are broadcast out
# the default APRS RF port (set by the aprs interface command).
#
aprs bc rfstat "Jnos inet/aprs gateway PD9Q-10"
aprs bc rfpos "5133.52N/00348.15E & JNOS https://packet-radio.net"
aprs bc rftimer 10
#
# APRS route add
ax25 route add apz200 ax0 WIDE1-1
ax25 route add id ax0 WIDE1-1
#
# I don't use WX - following for development purposes only
#
aprs wx call PD9Q-13
aprs wx stat "Weather Station - Kortgene JO11VN"
aprs wx pos "5133.52N/00348.15E_METEO packet-radio.nl:14501"
aprs wx data "/home/pd9q/jnos/wx/current.wx"
aprs bc rftimer 10
#
# Heard table
#
aprs hsize 10
#
# Turn on digi
#
aprs flags +digi +debug
#
# Stuff for the 14501 status page
#
aprs contact m "pd9q@packet-radio.net"
aprs locator "JO11VN"
#
# Connection to APRS internet system
#
aprs server add pa4tw.nl 10152
#
# Potential APRS Clients
#
#aprs client add 44.135.124.62 14825
#
# IF you want to gate traffic to RF - BE VERY CAREFULL
# with these filters. You don't want to FLOOD your local
# frequencies with solid traffic. You've been warned !!
#
#aprs calls fwdtorf VE4 VA4 VE3JJ VE3HDU
#aprs calls postorf VE4 VA4 VE3JJ VE3HDU
#aprs calls stattorf VE4 VA4 VE3JJ VE3HDU
#aprs calls wxtorf VE4 VA4 S VE3JJ VE3HDU
#
# This next entry gives specific IP address(s) permission to use the
# browser based APRS message center to it's full capacity. By default,
# the message center allows READ-ONLY access (ie, you can't send).
#
aprs calls ip45845 192.168.1.186
#
aprs email local
#
# Activate the core NOSaprs service
#
aprs listen on
#
# If you want the NOSaprs status page to be available,
# for example, 'http://localhost:14501'.
#
start aprs 14501
#
# If you want the NOSaprs browser based message center
# for example, 'http://localhost:14845'.
#
start aprs 45845

 

 

Weather beacon

I wanted to broadcast a weather beacon, but since I don’t have a weather station it became a bit more difficult. After some searching on the internet I came across a site where I can download a file with an api with weather data that is no more than 10 minutes old. Great. After downloading the file looks a little messy.

 "liveweer": [{"plaats": "Kortgene", "station": "DE BILT AWS", "timestamp": "1577030283", "time": "22-12-2019 16:58:03", "temp": "7.3", "gtemp": "4.6", "samenv": "Van tijd tot tijd lichte regenbuien of regen", "image": "regen", "windrgr": "182.7", "windr": "ZZO", "windms": "4.06", "windbft": "3", "windknp": "7.9", "windkmh": "14.6", "windstootms": "5.19", "windstootbft": "3", "windstootknp": "10.1", "windstootkmh": "18.7", "luchttemp": "7.2", "lv": "99", "luchtd"

I can’t do much with this. Let`s manupilate the file. First add some “enters”/”new lines” in the file.

Add a enter after/new line “, ”
sed -i $’s/”, “/),\\\n(/g’ ~/wx-project/meteo.wx

Now the file looks like this

{ "liveweer": [{"plaats": "Kortgene),
(station": "DE BILT AWS),
(timestamp": "1577030283),
(time": "22-12-2019 16:58:03),
(temp": "7.3),
(gtemp": "4.6),
(samenv": "Van tijd tot tijd lichte regenbuien of regen),
(image": "regen),
(windrgr": "182.7),
(windr": "ZZO),
(windms": "4.06),
(windbft": "3),
(windknp": "7.9),
(windkmh": "14.6),
(windstootms": "5.19),
(windstootbft": "3),
(windstootknp": "10.1),
(windstootkmh": "18.7),
(luchttemp": "7.2),
(lv": "99),
(luchtd": "_),

That’s better, just clean up the mess. I end up with this.

# Remove the non-letters/numbers except . and : and –
sed -i -e “s/[^ 0-9a-zA-Z.:-]//g” -e ‘s/ \+/ /’ ~/wx-project/meteo.wx

liveweer: plaats: Kortgene
station: DE BILT AWS
timestamp: 1577030283
time: 22-12-2019 16:58:03
temp: 7.3
gtemp: 4.6
samenv: Van tijd tot tijd lichte regenbuien of regen
image: regen
windrgr: 182.7
windr: ZZO
windms: 4.06
windbft: 3
windknp: 7.9
windkmh: 14.6
windstootms: 5.19
windstootbft: 3
windstootknp: 10.1
windstootkmh: 18.7
luchttemp: 7.2
lv: 99

Now we can read the line and get the value from it. I do this with “awk”

temp=$(awk ‘NR==5{print $2}’ meteo.wx)
echo TEMP=”$temp”°C Temperature degrees Celsius

Read line 5 word number two. And we have…………….

7.3°C Temperature degrees Celsius.

In the Netherlands we work with the mertrice system. Now the weather beacon is displayed in the imperial system. Now some calculation work must take place.

# Do some calulation
# From °Celsius to Fahrenheit
fah=$(echo "(($temp*1.8)+32)" | bc)
fah1=$(echo "$fah" | awk -F'.' '{print $1}')
fah2=$(echo $fah1 | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo FAH="$fah2"F Temperature degrees Fahrenheit
# (Wind speed miles)From kilometer per hour to miles per hour and add leading zero(s)
wpm=$(echo "$wpk"/1.609344 | bc)
wpm0=$(echo $wpm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo WPM="$wpm0"mph Wind speed in miles per hour
# (Wind guts miles) From kilometer per hour to miles per hour and add leading zero(s)
wgm=$(echo "$wgk"/1.609344 | bc)
wgm0=$(echo $wgm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo WGM="$wgm0"mph Wind guts in miles per hour
# (Rain in inches) From mm to inches the last hour. Remove the (DOT) and only the first 3 numbers
rni=$(echo "$rn"*0.0039370 | bc)
rni0=$(echo $rni | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni0"inch Rain in the last hour in inches
# (Rain (24) in inches) From mm to inches the last 24 hour. Remove the (DOT) and only the first 3 numbers
rni24=$(echo "$rn24"*0.0039370 | bc)
rni240=$(echo $rni24 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni240"inch Rain in the last 24 hour in inches
# (Rain (12) in inches) From mm to inches the last 12 hour. Remove the (DOT) and only the first 3 numbers
rni12=$(echo "$rn12"*0.0039370 | bc)
rni120=$(echo $rni12 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni120"inch Rain in the last 12 hour in inches

We can finally put the beacon together.

# Let show what we have and put it on the place it belong.
echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar"
echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" > /home/pd9q/jnos/wx/current.wx

Output

!5133.52N/00348.15E_272/010g022t046r005p028P017h92b0987

The compleet output looks like this.

TEMP=8°C Temperature degrees Celsius
WPK=16.8km/h Wind speed in Kilometers per hour
WGK=35.6km/h Wind guts in Kilometers per hour
GRD=272° Wind direction in degrees
RAIN=1.48067mm Rain in the last hour in mm
RAIN24=7.23632mm Rain in the last 24 hour in mm
RAIN12=4.53765mm Rain in the last 12 hour in mm
HUM=92% Humidity in procent
Bar=0987mb Barometric pressure in millibars
FAH=046F Temperature degrees Fahrenheit
WPM=010mph Wind speed in miles per hour
WGM=022mph Wind guts in miles per hour
RNI=005inch Rain in the last hour in inches
RNI=028inch Rain in the last 24 hour in inches
RNI=017inch Rain in the last 12 hour in inches
!5133.52N/00348.15E_272/010g022t046r005p028P017h92b098

The complete script look like this.

I put it in a cronjob, now it’s running every 15 minutes.
crontab -e
*/15 * * * * /home/pd9q/wx-project/get-wx.sh >/dev/null 2>&1

!/bin/bash
# Date 22-12-2019... Dammmmm what a job :)
# The weather beacon have to look like this....
# @220424z5057.81N/00729.37E_094/002g005t043r000p006P006h89b09783
# !5133.52N/00348.15E_073/013g...t048h85b10040wWXD
#
# Jun 01 2003 08:07
# 272/000g006t069r010p030P020h61b10150
# ***********************************************************
# 272 - wind direction - 272 degrees
# 010 - wind speed - 10 mph
# g015 - wind gust - 15 mph
# t069 - temperature - 69 degrees F
# r010 - rain in last hour in hundredths of an inch - 0.1 inches
# p030 - rain in last 24 hours in hundredths of an inch - 0.3 inches
# P020 - rain since midnight in hundredths of an inch - 0.2 inches
# h61 - humidity 61% (00 = 100%)
# b10153 - barometric pressure in tenths of a MILLIBAR - 1015.3 MILLIBARS
#
# Get the wx data from Weerlive/Meteoserver
#wget -O - "http://weerlive.nl/api/json-data-10min.php?key=?!?!?!?!?!&locatie=Kortgene" > ~/wx-project/weerlive.wx
#
wget -O - "https://data.meteoserver.nl/api/liveweer_synop.php?locatie=Kortgene&key=!?!?!?!?!?!?&select=1" > ~/wx-project/meteo.wx
#
# Some file manipulation on the METEO.WX file
# Add a enter after ", "
sed -i $'s/", "/),\\\n(/g' ~/wx-project/meteo.wx
# Remove the non-letters/numbers except . and : and -
sed -i -e "s/[^ 0-9a-zA-Z.:-]//g" -e 's/ \+/ /' ~/wx-project/meteo.wx
#
# Getting the data sorted....
now=$(date +%d%H%M)
#
temp=$(awk 'NR==5{print $2}' meteo.wx)
echo TEMP="$temp"°C Temperature degrees Celsius
# Wind speed (Kilometers)
wpk=$(awk 'NR==14{print $2}' meteo.wx)
echo WPK="$wpk"km/h Wind speed in Kilometers per hour
# Wind gust (Kilometers)
wgk=$(awk 'NR==18{print $2}' meteo.wx)
echo WGK="$wgk"km/h Wind guts in Kilometers per hour
grd=$(awk 'NR==9{print $2}' meteo.wx | awk -F'.' '{print $1}')
echo GRD="$grd"° Wind direction in degrees
rn=$(awk 'NR==38{print $2}' meteo.wx)
echo RAIN="$rn"mm Rain in the last hour in mm
rn24=$(awk 'NR==39{print $2}' meteo.wx)
echo RAIN24="$rn24"mm Rain in the last 24 hour in mm
rn12=$(awk 'NR==37{print $2}' meteo.wx)
echo RAIN12="$rn12"mm Rain in the last 12 hour in mm
hum=$(awk 'NR==20{print $2}' meteo.wx)
echo HUM="$hum"% Humidity in procent
bar=$(awk 'NR==21{print $2}' meteo.wx | awk -F: '{ printf "%04i", $1,$2 }')
echo Bar="$bar"mb Barometric pressure in millibars

# Do some calulation
# From °Celsius to Fahrenheit
fah=$(echo "(($temp*1.8)+32)" | bc)
fah1=$(echo "$fah" | awk -F'.' '{print $1}')
fah2=$(echo $fah1 | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo FAH="$fah2"F Temperature degrees Fahrenheit
# (Wind speed miles)From kilometer per hour to miles per hour and add leading zero(s)
wpm=$(echo "$wpk"/1.609344 | bc)
wpm0=$(echo $wpm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo WPM="$wpm0"mph Wind speed in miles per hour
# (Wind guts miles) From kilometer per hour to miles per hour and add leading zero(s)
wgm=$(echo "$wgk"/1.609344 | bc)
wgm0=$(echo $wgm | sed -e :a -e 's/^.\{1,2\}$/0&/;ta')
echo WGM="$wgm0"mph Wind guts in miles per hour
# (Rain in inches) From mm to inches the last hour. Remove the (DOT) and only the first 3 numbers
rni=$(echo "$rn"*0.0039370 | bc)
rni0=$(echo $rni | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni0"inch Rain in the last hour in inches
# (Rain (24) in inches) From mm to inches the last 24 hour. Remove the (DOT) and only the first 3 numbers
rni24=$(echo "$rn24"*0.0039370 | bc)
rni240=$(echo $rni24 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni240"inch Rain in the last 24 hour in inches
# (Rain (12) in inches) From mm to inches the last 12 hour. Remove the (DOT) and only the first 3 numbers
rni12=$(echo "$rn12"*0.0039370 | bc)
rni120=$(echo $rni12 | sed -e 's/^[.]*//g' -e 's/^\(.\{3\}\).*$/\1/')
echo RNI="$rni120"inch Rain in the last 12 hour in inches

#@220424z5057.81N/00729.37E_094/002g005t043r000p006P006h89b09783
# Let show what we have and put it on place it belong.
echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar"
echo !5133.52N/00348.15E_"$grd"/"$wpm0"g"$wgm0"t"$fah2"r"$rni0"p"$rni240"P"$rni120"h"$hum"b"$bar" > /home/pd9q/jnos/wx/current.wx
#

 

Jnos 2.0m run as NON-Root user

From version 2.0m it is possible to run Jnos as a NON-Root user.

The changelog from the website of Maiko.

a) create a new JNOS user and group

       jnos:x:1001:1001::/home/jnos:/bin/bash
       jnos:x:1001:

  b) change ownership of the entire JNOS runtime area

       chown -R jnos:jnos /jnos/rte

  c) as root user, configure a tunN interface, and just leave it there forever.

       ip tuntap add mode tun dev tun4

       ifconfig tun4 192.168.200.200 pointopoint 192.168.200.201 mtu 1500 up

     WARNING : make sure you pick a number N that does not conflict with any
               other tun interfaces that might be running - OpenVPN comes to
               mind for example, some VM subsystems might use tun as well ?

   d) modify autoexec.nos, add an extra parameter to the 'attach tun' entry,
      and make sure to comment out the point to point ifconfig.

      So what was previously run as root, for example, below :

       attach tun tun0 1500 0

       shell ifconfig tun0 192.168.200.200 pointopoint 192.168.200.201 mtu 1500 up

      will now just become a one line entry, below :

       attach tun tun0 1500 0 tun4

I have add some of the stuff in my /etc/rc.local file.

# Jnos
sysctl -w net.ipv4.ip_forward=1
ip tuntap add mode tun dev tun4
ifconfig tun4 192.168.1.100 pointopoint 192.168.1.101 mtu 1500 up

# Put a "Proxy ARP" on the Linux Ethernet so that it can answer any
# querries for the JNOS addres
/usr/sbin/arp -i eth0 -Ds 192.168.1.101 eth0 pub

This is what i have in the autoexec.nos

attach tun tun0 1500 0 tun4
#
ifconfig tun0 ipaddress 192.168.1.101
ifconfig tun0 netmask 0xfffffffc
ifconfig tun0 mtu 1500

Now you can run Jnos as a “normal” user.

Direwolf and Jnos (review)

In the previous post about Direwolf and jnos i use Direwolf-1.3 and does not know about the SERIALKISS port.
John WQ6N point it out to me… Tnx John WQ6N. Nice one.
Read the previous post.
So maybe I wrote that script for nothing. This is working pretty simple 🙂

In Direwolf 1.5-beta is it possible to use SERIALKISS to connect com to com.
I have try to use a PTY pair created with socat.

# Create pty pair
socat -d -d -ly PTY,link=/dev/ttyq1 PTY,link=/dev/ptyq1 &
sleep 2
# Start Direwolf
direwolf -d kn -c /direwolf/direwolf.conf &> /var/log/direwolf.log >/dev/tty3 &
sleep 2

Direwolf.conf
SERIALKISS  /dev/ttyq1 19200

# Jnos autoexec.nos
attach asy ptyq1 - ax25 ax0 4096 256 19200

Fireup Jnos
./jnos -C -g2 -u3 -f nos.cfg -i

I use conspy to look at the output of Direwolf. apt-get install conspy
Use it just like this “conspy 3” The number 3 stands for the tty were Direwolf is running on /dev/tty3.
Hit the escape button a couple of times to exit.

Here is the output of Direwolf

>>> Data frame to KISS client application, port 0, total length = 82
  000:  c0 00 92 88 40 40 40 40 e0 9c 98 70 b4 b4 8a 60  ....@@@@...p...`
  010:  ae 92 88 8a 62 40 63 03 f0 43 6f 6e 6e 65 63 74  ....b@c..Connect
  020:  20 4e 4c 36 5a 5a 45 20 66 6f 72 20 74 68 65 20   PD2LT-6 for the
  030:  4a 4e 4f 53 20 43 6f 6e 76 65 72 73 20 28 6c 69  JNOS Convers (li
  040:  6e 6b 65 64 20 77 69 74 68 20 6f 74 68 65 72 73  nked with others
  050:  29 c0

Ok that is working quit well.
I start Direwolf with the option “-d kn” So you can look at the kiss communication between Direwolf and Jnos.

Some text out of the User-Guide.pdf.
“Up to 3 concurrent TCP KISS client applications are allowed at the same time.
You can raise this limit by increasing the value of MAX_NET_CLIENTS, in source file kissnet.c and recompiling.”

Whoooo thats nice up to 3 (and more) applications can connect to Direwolf on the KISSPORT.
And there is also the AGW and the SERIALKISS port. Men where do I start.

John WQ6N

John WQ6N has found something that is useful. He use a Legacy BSD pseudo pair.
There are no Legacy BSD pseudo pairs in Linux any more. But it is possible to create some.

/etc/default/grub:
Change line from:
GRUB_CMDLINE_LINUX=""
to:
GRUB_CMDLINE_LINUX="pty.legacy_count=10"
(Where 10 is the number of pty legacy devices you require.)
This created 10 ptypX/ttypX terminal pairs.

After editing the grub file run the command “update-grub” and reboot.

So now it`s time to set Direwolf and Jnos to use the pty Legacy devices.

The Direwolf SERIALKISS 
SERIALKISS /dev/ptyp0 19200

The associated JNOS2 attach line:
attach asy ttyp0 - ax25 hfgw 4096 256 19200

Direwolf and Jnos

#!/bin/bash
# 6 march 2018
# Wrote a small script to get the shittie PTS to a file where its belongs.
# Yes you can also use the agw driver from Direwolf for Jnos.
# Now its also possible to "sed" the right PTS to your ax25 start file
#
# socat -d -d -lf /tmp/socat.pts PTY,link=/tmp/kisstnc TCP4:127.0.0.1:8001 &
# sleep 2
# grep -o "/dev/pts/." /tmp/socat.pts > /tmp/devs.pts
# attachthem () {
# read PTS1
# sed -i "s,kissattach -m 256 /dev/.*$,kissattach -m 256 $PTS1 ax0 44.137.31.73," /etc/ax25/ax-start
#
# }
#
# tail -n 1 /tmp/devs.pts | attachthem
# rm /tmp/socat.pts
# rm /tmp/devs.pts
# sleep 3
#
# Or use it with (X)net.
# sed -i "s,attach sdev4 kiss 4 1 19200 /dev/.*$,attach sdev4 kiss 4 1 19200 $PTS1," /usr/local/xnet/AUTOBOOT.NET
#
# Or with BPQ
# sed -i "s,COMPORT=/dev/.*$,COMPORT=$PTS1," /usr/local/linbpq/bpq32.cfg
#
# Oo well maybe work this better
# IPADDR=127.0.0.1
# TCPPORT=8001
#
# Yes there are many way`s to do this, but i had some fun to play with it.
# Maybe it is useful for someone.
#################################################################################################

The scipt…. Small but work quit well

#!/bin/bash
echo "Starting direwolf with socat for jnos/ax25"
# Set the path to direwolf and some stuff
PATH=/direwolf:/usr/bin:/bin:/usr/local/bin
# Start Direwolf
direwolf -c /direwolf/direwolf.conf &> /var/log/direwolf.log >/dev/tty3 &
sleep 3
# Socat kisstnc link with a PTS
socat -d -d -lf /tmp/socat.pts PTY,link=/tmp/kisstnc TCP4:127.0.0.1:8001 &
sleep 2
grep -o "/dev/pts/." /tmp/socat.pts > /home/pd2lt/jnos/spool/ptmx_radio.cfg
echo "Direwolf is connect to" `cat /home/pd2lt/jnos/spool/ptmx_radio.cfg`
echo "Now Jnos is ready to Rock and Roll :)"
rm /tmp/socat.pts
# Dont delete ptmx_radio.cfg before starting Jnos
rm /home/pd2lt/jnos/spool/ptmx_radio.cfg
sleep 1

This is what i found in the change.log of Jnos

Better support for PTY98 (/dev/ptmx, /dev/pts/N) pseudo devices. Bob (VE3TOK)
   asked for this a long time ago, so I figured I better get it implemented.

   Note : Technically one can use the new jnos 'attach baycom' and go direct to
   a kernel KISS type interface, meaning you don't need to run an intermediary
   program (kissattach or net2kiss) anymore. Try it, let me know how it works.

   COMPILE : Make sure '#define JNOSPTY98' exists in your config.h file.

   The best way for me to show how this feature works is by example. One way of
   getting JNOS to use a linux AX25 device is through the 'kissattach' program,
   but get the one from F6BVP (it has a mod that actually outputs the name of
   the slave device after you run the program). The stock ax25 utilities will
   not tell you that (you have to look for a new /dev/pts/N to appear then).

      kissattach /dev/ptmx radio > /jnos/spool/ptmx_radio.cfg

   The issue here is you don't know what slave device you will get, it could
   change each time you run kissattach, there may be no consistent device name
   for you to depend on when running 'attach asy' in the JNOS autoexec.nos.

   Now in JNOS (autoexec.nos), suppose we have this entry below :

      attach asy ptmx_radio - ax25 ax0 4096 256 9600

   I have added a feature where if the 3rd argument starts with 'ptmx_', then
   JNOS will look for a corresponding *.cfg file, and extract the slave device
   name from it, and then attach using that instead of the original argument.

This is some monitor output of Direwolf.

Dire Wolf version 1.3

Reading config file /direwolf/direwolf.conf
Audio device for both receive and transmit: plughw:0,0 (channel 0)
Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate.
Ready to accept AGW client application 0 on port 8000 …
Use -p command line option to enable KISS pseudo terminal.
Ready to accept KISS client application on port 8001 …

Connected to KISS client application …

[0L] PD2LT-2>NODES:<0xfe>
[0L] PD2LT-9>NODES:<0xff>LAPNOS
[0L] PD2LT-9>NODES:<0xfe>LAPNOS

PD2LT-2 audio level = 14(3/3) [NONE] |||||||__
[0.3] PD2LT-2>NODES:<0xfe>

PD2LT-9 audio level = 14(3/3) [NONE] ||||||||_
[0.3] PD2LT-9>NODES:<0xff>LAPNOS

Jnos link local

Setup a local link in jnos to uronode.

root@linux:/etc/ax25# cat axports
# /etc/ax25/axports
#
# The format of this file is:
#
# name  callsign        speed   paclen  window  description
# ----- -----------     ------- ------- ------- ---------------------------
ax6     PD2LT-7         19200   256     2       Link local Jnos pd2lt

root@linux:/etc/ax25# cat nrbroadcast
# /etc/ax25/nrbroadcast
#
# The format of this file is:
#
# ax25_name min_obs def_qual worst_qual verbose
#
ax6     5       203     192     1

# create socat device (jnos-uro)
socat -d -d -ly PTY,link=/dev/ttyq4 PTY,link=/dev/ptyq4 &
sleep 2
kissattach -m 256 /dev/ptyq4 ax6 44.137.31.73
ifconfig ax6 44.137.31.73 netmask 255.255.255.224 up
sleep 1

Autoexec.nos

attach asy ttyq4 - ax25 lap 4096 256 19200
ifconfig lap description "Link uronode"
#
ifconfig lap ax25 maxframe 2
ifconfig lap ax25 paclen 256
#ifconfig lap ipadd 44.137.31.81
#
at 15 "mbox kick pi8lap+"
#
arp eaves lap on
arp poll lap on

ip hp lap on
mbox mport lap on

# pi1lap
ax25 bc lap on
ax25 heard lap
ax25 hport lap on
ax25 bcport lap on

netrom  interface       lap 203 201
netrom  bcpoll          lap
netrom  bcnodes         lap
inp     ifaces          lap

trace lap 0111

 

Jnos rewrite

Setup Jnos rewrite

# Handle local sysop, and sysop bulls
pd2lt@* pd2lt
pi1lap@* pd2lt
sysop pd2lt
sysop@pd2lt* pd2lt
sysop@* sysop
*@sysop sysop
###############

#
# Now pass specific bulletins on to our areas
tcpip@* tcpip
wanted@* wanted
want@* wanted
need@* wanted
sale@* sale
4sale@* sale
trade@* sale
swap@* sale
dx@* dx
amsat@* amsat
arrl@* arrl
nldnet@* nldnet
nld@* nldnet
ww@* ww
eu@* eu
latnet@* latnet
baycom@* baycom
#
*@amsat amsat
*@arrl arrl
*@arl arrl
*@ww ww
*@nldnet nldnet
*@eu eu
*@jpn jpn
*@ita ita
*@dl dl
*@gbr gbr
*@noord noord
*@vknet vknet
*@usa usa
*@nld nld
*@ww ww
*@lunet lunet
*@can can
*@ca ca
#
# Anything else means we must add more, above
*@* check

# Try to handle addressing mistakes by mbox users!
*/* check
*\* check
*&* check
*.* check
#
K

 

Jnos axip link

Setup Jnos axip link

# Attach AXIP to SV1CMG
attach axip cmg 256 44.154.142.2 sv1cmg-6
ifconfig cmg description "AXIP to LAMNOS:SV1CMG-6 Jnos"
ifconfig cmg ax25 maxframe 7
ifconfig cmg ax25 paclen 256
#
at 30 "mbox kick sv1cmg+"
#
arp eaves cmg on
arp poll cmg on
mbox mport cmg on

# sv1cmg
ax25 bc cmg on
ax25 heard cmg
ax25 hport cmg on
ax25 bcport cmg on

netrom  interface       cmg 203 201
netrom  bcpoll          cmg
netrom  bcnodes         cmg
inp     ifaces          cmg

trace cmg 0111