AX25

Kernel Integration

UserSpace

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
#include <sys/socket.h>

#include <netax25/axlib.h>
#include <netax25/axconfig.h>

int main(int argc, char *argv[])
{
 struct full_sockaddr_ax25 dest;
 struct full_sockaddr_ax25 src;
 int mysocket, myarguments, dlen, len;
 char addr[20], *myport, *message, *portcall;
 char *srccall = NULL, *destcall = NULL;

 while ((myarguments = getopt(argc, argv, "c:d:t:v")) != -1) {
  switch (myarguments) {
   case 'c':
    srccall = optarg;
    break;
   case 'd':
    destcall = optarg;
    break;
   case 'v':
    printf("myax25app: %s\n", "0.1");
    return 0;
   case '?':
   case ':':
    fprintf(stderr, "usage: ax25 [-c <source>] [-d <destination>] [-v] <ax25port> <message>\n");
    return 1;
  }
 }

 if (optind == argc || optind == argc - 1) {
  fprintf(stderr, "usage: ax25 [-c <source>] [-d <destination>] [-v] <ax25port> <message>\n");
  return 1;
 }

 myport    = argv[optind];
 message = argv[optind + 1];

 if (ax25_config_load_ports() == 0) {
  fprintf(stderr, "beacon: no AX.25 ports defined\n");
  return 1;
 }

 if ((portcall = ax25_config_get_addr(myport)) == NULL) {
  fprintf(stderr, "beacon: invalid AX.25 port setting - %s\n", myport);
  return 1;
 }

 if (destcall != NULL)
  strcpy(addr, destcall);
 else
  strcpy(addr, "IDENT");

 if ((dlen = ax25_aton(addr, &dest)) == -1) {
  fprintf(stderr, "beacon: unable to convert callsign '%s'\n", addr);
  return 1;
 }

 if (srccall != NULL && strcmp(srccall, portcall) != 0)
  sprintf(addr, "%s %s", srccall, portcall);
 else
  strcpy(addr, portcall);

 if ((len = ax25_aton(addr, &src)) == -1) {
  fprintf(stderr, "beacon: unable to convert callsign '%s'\n", addr);
  return 1;
 }

 if ((mysocket = socket(AF_AX25, SOCK_DGRAM, 0)) == -1) {
  return 1;
 }

 if (bind(mysocket, (struct sockaddr *)&src, len) == -1) {
  return 1;
 }

 if (sendto(mysocket, message, strlen(message), 0, (struct sockaddr *)&dest, dlen) == -1) {
  return 1;
 }

 close(mysocket);

 return 0;
}

Others

in command line, as root

aptitude install ax25-tools ax25-xtools ax25-apps libax25-dev

add the following line under /etc/ax25/axports

aprs XE1GYQ 9600 255 2 TinyTrack 4 (9600 bps)

in command line, as root

ifconfig

sudo kissattach /dev/ttyS0 aprs 44.128.0.1

AX.25 port radio bound to device ax0

sudo kissparms -p aprs -t 500 -r 128 -s 200 -l 100

ifconfig

/usr/bin/axlisten

aptitude install ax25-tools ax25-xtools ax25-apps libax25-dev

under /etc/ax25/axports

radio XE1GYQ-15 1200 255 2 TinyTrack 4 (19200 bps)

/usr/sbin/kissattach /dev/ttyUSB0 radio 44.128.0.1

AX.25 port radio bound to device ax0

kissparms -p radio -t 100 -s 100 -r 25

Linux Kernel, AX.25

Carga el modulo ax25

$ sudo modprobe ax25

$ lsmod | grep ax25

$ ls /proc/net/ax25*

Carga el modulo mkiss

$ sudo modprobe mkiss

$ lsmod | grep mkiss

Carga el modulo 6pack

$ sudo modprobe 6pack

$ lsmod | grep 6pack

What is contained under drivers/hamradio

AX25 Tools

sudo apt-get install ax25-tools ax25-xtools ax25-apps libax25-dev

sudo apt-get install aprsd aprsdigi

sudo apt-get install soundmodem

Creating a kiss device

sudo kissattach /dev/ttyS0 aprs 44.128.0.1

sudo kissparms -p aprs -t 500 -r 128 -s 200 -l 100

Dual Port TNC's

/usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1

/usr/sbin/kissattach /dev/ttyq0 port1 44.135.96.242

/usr/sbin/kissattach /dev/ttyq1 port2 44.135.96.242

/usr/sbin/kissattach -i 44.136.8.5 -m 512 /dev/ttyS0 radio

/sbin/route add -net 44.136.8.0 netmask 255.255.255.0 ax0

/sbin/route add default ax0

Example: if you have a dual port TNC and it is connected to your /dev/ttyS0 serial device at 9600 bps, the command:

/usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1

/usr/sbin/kissattach /dev/ttyq0 port1 44.135.96.242

/usr/sbin/kissattach /dev/ttyq1 port2 44.135.96.242

aprsdigi

http://hal.g7iii.net/blogs/testblog/articles/amateur-radio-and-the-nslu2-part2/index.html

soundmode

http://ubuntuforums.org/showthread.php?t=1737733

http://wiki.complete.org/LinuxPacketRadio

http://wiki.complete.org/PacketRadio

https://www.thecraag.com/Raspberry_Pi_APRS_Digipeater

https://www.thecraag.com/Raspberry_Pi_HAB_Payload

https://www.thecraag.com/CRAAG1

http://www.pa0esh.nl/index.php?option=com_content&view=article&id=86&Itemid=101

http://www.qbjnet.com/packet.html

https://www.thecraag.com/File:RPi_with_RFM22b_and_MAX6.JPG

http://ava.upuaut.net/store

http://www.daveakerman.com/

http://hamtv.com/info.html#balloon

standard tnc

!/bin/sh

start ax25 on com1 using port defined in /etc/ax25/axports

/usr/sbin/kissattach -m 512 /dev/ttyS0 aprstt 44.94.248.62

sleep 1

Set TNC Parameters txd, persist, slottime, txtail

/usr/sbin/kissparms -p aprs -t 300 -r 128 -s 100 -l 30

sleep 1

route to the 145.05 gateway

/sbin/route add -host 44.94.11.8 dev aprs

route to the rest of the netrom IP capable nodes

/sbin/route add -net 44.94.11.0 netmask 255.255.255.0 gw 44.94.11.8 dev ax0

default route (do you REALLY want to do this) :)

/sbin/route add default 44.94.11.8

sleep 1

listen for various incoming connects like PMS, node, etc.

(MUST first be configured in /etc/ax25/ax25d.conf)

/usr/sbin/ax25d

sleep 1

listen for stations heard

/usr/sbin/mheardd

Soundmodem

!/bin/sh

start ax25 with the soundmodem driver using the port

defined in /etc/ax25/axports

/usr/sbin/soundmodem /etc/ax25/soundmodem.conf -R -M >/dev/null 2>/dev/null&

sleep 1

TNC Parameters txd, persist, slottime, txtail are done by

soundmodemconfig and stored in soundmodem.conf

route to the 145.05 gateway

/sbin/route add -host 44.94.11.8 dev sm0

route to the rest of the netrom IP capable nodes

/sbin/route add -net 44.94.11.0 netmask 255.255.255.0 gw 44.94.11.8 dev sm0

default route (do you REALLY want to do this) :)

/sbin/route add default 44.94.11.8

sleep 1

listen for various incoming connects like PMS, node, etc.

(MUST first be configured in /etc/ax25/ax25d.conf)

/usr/sbin/ax25d

sleep 1

listen for stations heard

/usr/sbin/mheardd

compiling

sudo apt-get install libtool

gcc ax25.c -l:libax25.so.0

Sounmodem

sudo apt-get install soundmodem ax25-tools ax25-apps libax25-dev screen

aplay -l

speaker-test -c 2

arecord -v testsound.wav

aplay testsound.wav

nano /etc/ax24/soundmodem.conf

soundmodem /etc/ax25/soundmodem.conf -R -M >/dev/null 2> /dev/null &

/sbin/route add -net 44.0.0.0 netmask 255.0.0.0 dev sm0

Crontab

          • command to be executed

| | | | | | | | | +----- day of week (0 - 6) (Sunday=0) | | | +------- month (1 - 12) | | +--------- day of month (1 - 31) | +----------- hour (0 - 23) +------------- min (0 - 59)

http://v1.corenominal.org/howto-setup-a-crontab-file/

Text to Speech

Festival

echo "Hi Richo! Where are you?" | festival --tts

http://www.wikihow.com/Convert-Text-to-Speech-on-Linux

results matching ""

    No results matching ""