Monday, January 28, 2013

Packeton Comments

Recently a user make a comment to my easypacket software, and following his request I will publish in this blog entry the man pages for 2 of the most important scripts in the software: packectconfig and packeton

By it's man pages you will known how to basically configure and operate the software; and sorry for any typo/grammatic/syntax error, I'm a Spanish speaking OM.

Man page for packetconfig (the configuration utillity)



packetconfig - setup the ham radio packet modes in this PC

DESCRIPTION
packetconfig is a script that ask for some values to then automate and configure the packet system in this PC.

It set up 3 modems at with this characteristics:
 PORT    SPEED            MODE    NET_DEV
 1k2    1200 bauds    AFSK    ax0
 4k8    4800 bauds    AFSK    ax1
 9k6    9600 bauds    FSK    ax2

Olso it set a firewall (firehol) to restrict the data flow on these ports,  see more in the doc directory /usr/share/doc/easypacket; you don't want samba or others flooding the channel with UDP packets...

OPTIONS
The packetconfig script does not take any options inline.

HOW IT WORKS
This script ask for your callsign, and then show you all the audio cards in the system, asking for you to select the one you will use for the packet business.

A stop in this part is needed, is HIGHLY RECOMENDED that you use a DEDICATED audio card for packet, because Linux lock the audio card that it use for the normal playback of OS sounds, music playing, etc...

You can use your default audio card, but expect some degree of weird things happening in audio...

The card you selected for dedicated packet radio use must be as old as you can, yes, an old PCI stereo card will do it, even a old  soundblaster ISA card will do it from the beginning. Because modern 5.1 and higher cards we tested did not result in good performance, even some of they have not worked at all, so you have been warned.

Continuing with the work, the script ask for the IP of each mode or interface, because in linux each modem needs to have a IP assigned to it

All your work is done, the script by it self will search for ALSA and OSS support in the system, OSS will take priority over ALSA if it is supported (because it simplicity).

The configuration of the axports, soundmodems, firehol and ax25d will take place with the call, soundcard and IP you provided, and these values are stored in the default folder in etc for the init process.

Then a init script for ubuntu is placed (upstart job) that makes refence to a script for configure the variables at each boot up, this is needed because ALSA and OSS will assign the names of the sound card in an arbitrary order in EACH boot of the OS.

Note: the script also set a firewall template (using Firehol) in which all traffic is allowed on any interface BUT packet ones,  in the packet interfaces all UDP traffic is removed and only ping smtp and pop is allowed. If you wish you can see the configuration in /etc/firehol/firehol.conf, in there are some routing configurations commented if you plan to allow TCP/IP over packet to communicate with the real internet/LAN/WIFI network.

SEE ALSO
packeton, packetoff, save_audio

BUGS
There is a possible issue (not verified) with the detection and setting up of the audio cards for packet mode. This scripts detect the name for the audio card and match it to the selected card, but if in the system are more than a card of the same brand and model the name of the cards will be the same; an possibly the script will set up the first occurrence of the name. ALSA detects the cards in an arbitrary order, so it's possible that wrong setting up of the audio card may occur with more than one card of the same brand and model.

This is not tested, if you have this situation please contact the author for testing and solution of this issue.

Any help for improving the ALSA detection utility will be of great help ;-)




See this snapshot of a packetconfig script for more detail:
For the curious one: the "export LANG=en" before the sudo packetconfig is because the terminal is in spanish (LANG=es) and I want to show you the english version.

BTW the script has personalized comments in spanish and english, defaulting to the last one if other lang is detected.


Man page for packeton (the modem start utility)


packeton - start the ax25 packet modems and setup the interfaces

DESCRIPTION
packeton is the script that start the different sound modems for the packet radio use.

OPTIONS
MODE is the only option that this scrip uses an is the pre-configured modes that come with this software, as for this version the valid modes ares this:

1k2, 4k8, 9k6 and NONE (empty string)

  • 1k2 start the 1200 bauds AFSK modem with a port name of 1k2 and a net device name of ax0 and the TCP/IP pre-configured with packetconfig
  • 4k8 start the 4800 bauds AFSK modem with a port name of 4k8 and a net device name of ax1 and the TCP/IP pre-configured with packetconfig
  • 9k6 start the 9600 bauds FSK modem with a port name of 9k6 and a net device name of ax2 and the TCP/IP pre-configured with packetconfig
  • NONE is a empty string, and that brings up the two fast modems, 4k8 and 9k6 at the same audio and radio channel.

Note that NONE could bring to the 1k2 modem with the 4k8 and 9k6, but the samplerate forced for the fast modes makes 1k2 deaf, so it only use the fast ones in this (at least in my testing scenarios)

Generally, in my tests mixing the 1k2 modem with any other is a no go for the 1k2 modem and a loss of performance for the other.

Besides, 4k8 AND 9k6 seems to work better than either of it alone, weird thigh this, but it's true.

EXAMPLES
Some examples

    packeton
This will start 4k8 and 9k6 modems simultaneously

    packeton 1k2
This will start 1k2 modems only

    packeton 9k6
This will start 9k6 modems only

SEE ALSO
packetconfig, packetoff, save_audio

BUGS
No known bugs.



More insight knowledge of the working details can be acquired by reading the comments in the scripts it selfs, or reading the code if you have the skills.

Any improvement/suggestion/bug/bug/fix/idea/whish is welcomed.

73

No comments:

Post a Comment