Showing posts with label Jingtong. Show all posts
Showing posts with label Jingtong. Show all posts

Saturday, July 27, 2013

EchoLink on Ubuntu (Setting up Svxlink server and qtel)

EchoLink on Ubuntu. (12.04) (Setting up Svxlink server and qtel)

Svxling is a application that allows you to setup a Echolink link or a Echolink repeater on your server.
You will need to build a interface between your computer Serial port and Mic and line in and outputs of the available sound card on your server.
Here is a typical interface diagram. You can get this interface in prebuild format at http://www.giga.co.za/ocart/index.php?route=product/product&product_id=385&search=radio+digi
 

 
Computer to Radio interface.


Jingtong Radio interface.
Jingtong HT

I now use the Baofeng uv-5r and not the Jingtong due to the squelch not being stable.


Qtel is a Echo link client that allows you to connect to Echolink system as a client simulating a radio. Communication is done using VOIP from your client to Echolink system.

Here is the steps that you neet to take if you want to set-up Svxlink link or you could only install client Qtel see nr 4.

You will have to verify your call-sign on http://www.echolink.org/ with proof of your Radio amateur license documents. (The verification process can take 24 ours, so do it upfront and you need to verify your call sign for -L link and -R repeater options)

Ones this is done you will have call-sign and password required for the configuration below.

I would suggest you get a APRS servers password as well but is not required to get your Svxserver going. ( you could add the APRS functionality later.)
1) First add the Svxlink repository ref. to Ubuntu 
sudo add-apt-repository ppa:felix.lechner/hamradio

2) Update all repository config files for Ubutu.
sudo apt-get update

3) Install the Svxlink from the new repository configerd above.
sudo apt-get install svxlink-server

4) Install the qtel client.
sudo apt-get install qtel

5) Configure the Svxling server confugeration
sudo vi /etc/svxlink/svxlink.conf

6) Change the following fields in the /etc/svxlink/svxlink.conf file

LOCATION_INFO
     Example:
     LON_POSITION=09.02.20E
     Example:
     LAT_POSITION=51.02.22N

CALLSIGN
     Examples:
     CALLSIGN=EL-ZR0ABC # callsign for a link EL for link and ER for repeater.

PTT_PORT
     Examples:
     PTT_PORT=/dev/ttyS0 # this could be a USB serial port  /dev/ttyUSB0 ?? change this to your device

FREQUENCY
     Example:
     FREQUENCY=430.050 # tx-frequency is 145.550 MHz (Radio Frequency)


TX_POWER
     Example:

     TX_POWER=3 # tx output is 3 watts

ANTENNA_GAIN
     Example:

     ANTENNA_GAIN=5 # antenna gain is 5 dBd

ANTENNA_HEIGHT











     Example: 
     ANTENNA_HEIGHT=10m # 10 meters above the ground 
     OR ANTENNA_HEIGHT=90 # 90 feet

Save the file.

Now comes the difficult part where you need to define your audio device for TX and RX.

Run the Command sudo aplay -l  This command will display all the alsa devices that can play sound to ext Speak.

sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
Home directory /home/anton not ours.
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

sudo arecord -l


In my case I only have one device "card 0: Intel [HDA Intel]"

You could properly use the device name Intel.

And to get the input device available on your computer run the command sudo arecord -l

sudo arecord -l









**** List of CAPTURE Hardware Devices ****
Home directory /home/anton not ours.
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: V10 [FUNcube Dongle V1.0], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In my case there was two devices and I wanted to use the same alsa device and above so it will be the "Intel" device
Defining alsa device by going to your home directory 
cd
now edit the asla config file .asoundrc in your home directory (create one if it dose not exists)

sudo vi .asoundrc    The Intel part in the file must be changed to have your computers interface card name from the above process.

#This configuration file is for alsa interface configuration.
# 1) Intel motherboard (1 stereo input and 1 stereo output)
#
#************************** pcm definition ************************************
pcm.Intel_card {# defining the card to be used
     type hw
     card Intel # this has to be done to force reboot to point to same card
}
#************************* control section ***********************************
ctl.Intel_card {#defining the control interface
     type hw
     card Intel # this has to the same as above
     }


Save the file.


Now edit the line AUDIO_DEV=alsa:pcm.Intel_card in the sudo vi /etc/svxlink/svxlink.conf file with the name U defined in the .asoundrc file U edited above ( in section Rx1 and Tx1)

Save the file.

Now you need to configure the echo-link connectivity details.
sudo vi /etc/svxlink/svxlink.d/ModuleEchoLink.conf

change the following fields.

CALLSIGN=CALLSIGN-L # your callsign

PASSWORD=your_verified_password #verify you callsign at http://www.echolink.org/

SYSOPNAME=your name and info

LOCATION=[Svx] Fq, your location town ....

DESCRIPTION="You have connected to a SvxLink node,\n"
            "a voice services system for Linux with EchoLink\n"
            "support.\n"
            "Check out http://svxlink.sf.net/ for more info\n"
            "\n"
            "QTH:     South of Johannesburg, South Africa\n"
            "QRG:     Simplex link on 145.550 MHz\n"
            "CTCSS:   My_CTCSS_fq_if_any RX only working on TX Hz\n"
            "Trx:     My_transceiver_type Jingtong JT-208\n"
            "Antenna: My_antenna_brand/type/model Mag mount 1/4 on house roof\n"

Save a file and you should be ready to start the server.

Before we start the server with start-up script lets check if there is any errors.

Run the command sudo svxlink




if all is ok you should see something like this.

SvxLink v0.13.0 (Apr 15 2012) Copyright (C) 2011 Tobias Blomberg / SM0SVX

SvxLink comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it in accordance with the terms and conditions in the
GNU GPL (General Public License) version 2 or later.

Using configuration file: /etc/svxlink/svxlink.conf
--- Using sample rate 48000Hz

Starting logic: SimplexLogic
Home directory /home/anton not ours.
Loading module "ModuleHelp" into logic "SimplexLogic"
        Module Help v0.7.0 starting...
Loading module "ModuleParrot" into logic "SimplexLogic"
        Module Parrot v0.7.0 starting...
Loading module "ModuleEchoLink" into logic "SimplexLogic"
        Module EchoLink v0.10.1 starting...
*** WARNING: The value of ModuleEchoLink/LOCATION is too long. Maximum length is 27 characters.
Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"
        Module Tcl v0.3.0 starting...
Event handler script successfully loaded.
EchoLink directory status changed to ON
--- EchoLink directory server message: ---
To ensure security, each
callsign used with EchoLink
must be validated.  The
callsign you are using has
not yet been validated.

Several different validation
options are available.  To
begin, please go to
www.echolink.org and click on
Validation.


Debugging


1) if you get an error like this.

*** ERROR: The sample rate could not be set to 8000Hz for ALSA device "pcm.Intel_card". The closest rate returned by the driver was 44100Hz.
*** ERROR: Could not open audio device for receiver "Rx1"

Most build in sound-cards should be able to handle 96000 or 48000Hz
Change the sample rate by editing the config file

Try uncommenting the CARD_SAMPLE_RATE=48000 and change it to 8000 or 16000 or 48000 in the /etc/svxlink/svxlink.conf file (high value is better)

2) if you get an error like this.

open serial port: Input/output error
*** ERROR: Could not initialize TX "Tx1"
*** ERROR: Could not initialize Logic object "SimplexLogic". Skipping...
*** ERROR: No logics available. Bailing out...

This means the serial port defined above PTT_PORT=/dev/ttyS0 is wrong and you need to get the correct port. (If you are using USB serial port it could be something like /dev/ttyUSB0)

3) If you get an error like this.
*** WARNING: SvxLink can only handle WAV files with sample rate 8000: /usr/share/svxlink/sounds/en_US/EchoLink/name.wav

It seems that the Ubuntu install install 16 bit audio files by default.
You can check the files by running the command.
file  /usr/share/svxlink/sounds/en_US/Default/0.wav
This what you will get from the command conferming it is 16bit

/usr/share/svxlink/sounds/en_US/Default/0.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
I had to replace the files with this link https://launchpad.net/~felix.lechner/+archive/hamradio/+build/4783829

backup the existing wave files
Remove / uninstall the 16 khz files
sudo dpkg -r  svxlink-sounds-en-us-heather-16khz

Download the install file
Run sudo wget https://launchpad.net/~felix.lechner/+archive/hamradio/+build/4783829/+files/svxlink-sounds-en-us-heather-8khz_11.11-1~raring~ppa1_all.deb

Run the command
sudo dpkg -i svxlink-sounds-en-us-heather-8khz_11.11-1~raring~ppa1_all.deb

There should be now errors. (if there is errors tel me how you got it fixed below)
Normally you could just edit the /etc/svxlink/svxlink.conf file and fix the error.

My start up scrips did not work with the default instillation procedure as above and I had to add additional info in the script /etc/init.d/svxlink-server as follows.

4) If you get an error like this when you start up svxlink-server: 39: [: -eq: unexpected operator
It also means your PTT_PORT=/dev/ttyS0 is not set correctly.

I had to add the following lines.



Edit the file
sudo vi /etc/init.d/svxlink-server
add the following
LOGFILE=/var/log/svxlink # just below the PATH line

and changed RUNASUSER=svxlink to RUNASUSER=root 


Now lets start the Svxlink server.
sudo /etc/init.d/svxlink-server start

Check that the process is running.
sudo ps -ef | grep svxlink

We still need to adjust the audio levels for tx and rx.
run the alsa mixer to adjust the audio levels

run  sudo alsamixer   In my case I gad to set the Capture volume for the Audio from radio.

The log file will indicate if the level is set to high.


alsamixer (F5, F6, space bar, m, up, down selection keys )











Tail the log file for possible configuration errors when u start the server.

sudo tail -f /var/log/svxlink







To stop the server 
sudo /etc/init.d/svxlink-server stop

How to start Qtel client

sudo qtel

Linux Qtel Client

Qtel CLient













Client on windows

Echolink Client












Android Client
Echolink Station list




















Link connection screen
Connection view






























If the APRS server details, username and password is configured correctly you should be able to see your station on the APRS map.
What is nice is the fact that your APRS station details get updated with connection details as stations connect to your Svxlink server.


EL-ZR6AIC APRS























Please give me feedback on any mistakes.
more info is avalible at http://www.svxlink.net/?tag=svxlink-server-on-ubuntu-12-04

Thursday, February 16, 2012

Packet Radio on Ubuntu using Soundmodem

Packet Radio on Ubuntu using Soundmodem (144.800Mhz)











I got my ax25 configuration working with soundmodem on Ubuntu.


1) Install soundmodem and all ax25 options with Synaptic Package Manager or with (apt-get)
1.1)The list of apps I installed. ax25-apps, ax25-tools, ax25-xtools, ax25mail-utils, ax25spyd, soundmodem,

sudo apt-get install ax25-apps
sudo apt-get install ax25-tools
sudo apt-get install ax25-xtools
sudo apt-get install ax25mail-utils
sudo apt-get install ax25spyd
sudo apt-get install soundmodem

1.2) I found this script EasyPacket (install it) http://www.w1hkj.com/EasyPacket.html .
It consist of a series of scipts to simplify the process of starting and configerating a user packet node, see documentation in /usr/share/doc/easypacket (after instillation) for mode details.
1.3) The document was in Spanish and I had to translate it with google. Here is the content.
****************************************************
README
Greetings, My name is Pavel and I am CO7WTCosta Milanes, a Cuban Amateur Radio

This packete software was created to provide aconfiguration standard in mind to facilitate the assembly of apacket station in GNU / Linux, is expected to be as automatic as possible throughout their development.

The ideas or main bases of this software are:

- Used to create 3 soundmodem software modems simultaneous / Individual
- Create three ports of packet: 1k2, 9k6 and 4K8,which correspond to the speed AFSK 1200, 4800 and 9600 AFSK FSK,or all together or each individually.
- As a GNU / Linux has to assign an IP address toScholarly interface, suggests the use of AMPR declared 44.128.xxsegment test for each of the interfaces on different network segments, you must reset the IP address what proveea your local coordinator, allocation is as follows:
IP Address Mode Speed ​​port interface
1200 baud AFSK 1k2 44.128.0.1 x0
4K8 AFSK
4800 baud ax1 44.128.1.1
9600 baud FSK 9k6 44.128.2.1 ax2
- Only taken into account the connections AX25;NETROSE BPQ and others are referred
- Default incoming connections to ttylinkd enrrutanis not actualemnte functional.
- The indicative NOCALL default and is configured using the packetconfig script.
*********************************************
I found the README a bit cryptic.

2) I did the following.


2.1)I run soundmodemconfig  you will need X window server if you are doing this remotely via ssh

sudo soundmodemconfig

Soundmodem config screen













2.2) Configure the sound modem as in the pictures above. ( it will save the config when you exit the app)

plughw0.0 could be different for your Linux depending how many Audio sound cards you have in your ALSA configuration.  

sudo arecord -l will list your device's

**** List of CAPTURE Hardware Devices ****
xcb_connection_has_error() returned true
Home directory /home/anton not ours.
card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: V10 [FUNcube Dongle V1.0], device 0: USB Audio [USB Audio]
  Subdevices: 1/1

  Subdevice #0: subdevice #0

plughw0.0  will be card 0


2.3) I connected the external speaker sound plug on Radio to laptop line in and tuned VHF radio to 144.800Mhz FM to see some local packet traffic.






























2.4) Select new configuration in file menu and then sound card.
On the older Ubuntu it was /dev/dsp (soundcard) new Ubuntu its (alsa and plughw:0,0) and your serial port (my port was /dev/ttyS0) for your PTT (I am using ZS1I radio interface between radio and laptop)

to see what is the list of serial devices run the command ls -al /dev/* | grep ttyS

crw-rw----  1 root dialout   4,  64 Sep  4 17:42 /dev/ttyS0
crw-rw----  1 root dialout   4,  65 Sep  4 17:42 /dev/ttyS1
crw-rw----  1 root dialout   4,  74 Sep  4 17:42 /dev/ttyS10
crw-rw----  1 root dialout   4,  75 Sep  4 17:42 /dev/ttyS11
crw-rw----  1 root dialout   4,  76 Sep  4 17:42 /dev/ttyS12

U can use the terminal program to see if its the correct serial port.
Install minicom serial terminal program.

sudo apt-get install minicom

sudo minicom

Welcome to minicom 2.5

OPTIONS: I18n
Compiled on May  2 2011, 00:39:27.
Port /dev/tty8

Press CTRL-A Z for help on special keys

Press [ctrl]A and then Z

You should then get this menu

    +-------------------------------------------------------------------+
     |                                  Minicom Command Summary                       |
     |                                                                                                      |
     |          Commands can be called by CTRL-A <key>                       |
     |                                                                                                      |
     |               Main Functions                  Other Functions                     |
     |                                                                                                      |
     | Dialing directory..D  run script (Go)....G        | Clear Screen.......C  |
     | Send files.........S  Receive files......R         | cOnfigure Minicom..O  |
     | comm Parameters....P  Add linefeed.......A | Suspend minicom....J  |
     | Capture on/off.....L  Hangup.............H          | eXit and reset.....X  |
     | send break.........F  initialize Modem...M      | Quit with no reset.Q |
     | Terminal settings..T  run Kermit.........K      | Cursor key mode....I  |
     | lineWrap on/off....W  local Echo on/off..E      | Help screen........Z  |
     | Paste file.........Y                                            | scroll Back........B   |
     |                                                                                                      |
     |      Select function or press Enter for none.                                     |
     |                                                                                                      |
     |             Written by Miquel van Smoorenburg 1991-1995               |
     |             Some additions by Jukka Lahtinen 1997-2000                  |
     |             i18n by Arnaldo Carvalho de Melo 1998                           |
     +-------------------------------------------------------------------+

Select option  O

+-----[configuration]------+
 | Filenames and paths      |
 | File transfer protocols    |
 | Serial port setup            |
 | Modem and dialing        |
 | Screen and keyboard     |
 | Save setup as dfl           |
 | Save setup as..              |
 | Exit                               |
+--------------------------+

Select Serial port setup

Change your comm port by selecting A

and then edit your port  /dev/ttyS0  ??

Save and exit to get back to terminal and send some characters and check your serial port TX pins for data.
select  X to exit


2.5) Then select file new channel in the soundmodemconfig ( Select modulator and demodulator afsk the rest of the defaults should be ok.)
Change your cal-sign in Packet IO tab.

2.6) Select Channel menu on left and the click on Diagnostics menu and click on scope. You should see your audio from your radio ext speaker. ( if you get an error you have the wrong audio device change it until it work)




Set the volume on receiver for reasonable level (You might have to set the level with sudo alsamixer)


Sudo alsamixer

Use the F5 and F6 keys to select the sound card and input M also selects options

2.7) Exit the soundmodem config program. ( it will save the config on exit)

2.8) There should be a config file in /etc/ax25/soundmodem.conf

2.9) make a copy and rename it to soundmodem.9k6.conf

3) you can now start the easypacket script (sudo packeton 9k6)

3.1) you should see something like (The following interfaces are ready to rock: sm0 ZR6AIC)
hi......
Almost done.
you could now monitor packet in listening mode with the following commands. (sudo ax25spy or sudo  listen  has changed to sudo axlistin -c -a).



I will continue next time how to connect using the ax25 tools ....

here is the list of commands that manages your AX25 connections.
CommandDescription
mheard
Mheard  displays information about most recently heard AX.25 callsigns, the interface upon which they were heard, the total packets heard,  the time  at  which  the  last one was heard and other information.  Mheard displays different information, in different orders  depending  on  the settings  of  the  arguments. Information on specific ports can be displayed by giving the port names as arguments.
ax25d
Ax25d  is  a  general purpose server daemon that listens on a number of AX.25, NET/ROM and Rose ports and offers different  services  depending upon port, callsign and other parameters.
axctl
The axctl commands to be issued to the Linux AX.25 protocol layer for existing AX.25 connections. The connection is uniquely  identified  via  the  combination  of port, destination callsign and source callsign, with that information the kernel is able to change the parameters, or abort the connection. .
axparms
Configure AX.25 interfaces
axspawn
Allow automatic login to a Linux system
beacon
Transmit periodic messages on an AX.25 port
bpqparms
Configure BPQ ethernet devices
mheardd
Collect information about packet activity
rxecho
Route AX.25 packets between ports transparently
sethdlc
Get/set Linux HDLC packet radio modem driver port information
smmixer
Get/set Linux soundcard packet radio modem driver mixer
smdiag
Linux soundcard packet radio modem driver diagnostics utility
kissattach
Attach a KISS or 6PACK interface
kissnetd
Create a virtual network
kissparms
Configure KISS TNCs
net2kiss
Convert a network AX.25 driver to a KISS stream on a pseudo-tty
mkiss
Attach a multi KISS interface
nodesave
Saves NET/ROM routing information
nrattach
Start a NET/ROM interface
nrparms
Configure the NET/ROM interface
nrsdrv
KISS to NET/ROM serial converter
netromd
Send and receive NET/ROM routing messages
rsattach
Start a ROSE interface
rsdwnlnk
User exit from the ROSE network
rsparms
Configure the ROSE interface
rsuplnk
User entry into the ROSE network
ttylinkd
TTYlink daemon for AX.25, NET/ROM, ROSE and IP
rip98d
Send and receive RIP98 routing messages
ax25_call
Make an AX.25, NET/ROM, ROSE or TCP connection
netrom_call
Make an AX.25, NET/ROM, ROSE or TCP connection
rose_call
Make an AX.25, NET/ROM, ROSE or TCP connection
tcp_call
Make an AX.25, NET/ROM, ROSE or TCP connection
yamcfg
Configure YAM driver parameters
dmascc_cfg
Configure dmascc devices
ax25ipd
AX.25 into IP Encapsulator
ax25rtd
AX.25 routing daemon
ax25rtctl
AX.25 routing daemon control utility
call > now axcall
Make an AX.25, NET/ROM or ROSE connection
listen
Monitor AX.25 traffic
ax25mond
Dump the AX.25 network traffic and and provide sockets where the received data will be retransmitted
soundmodem
Soundcard modem driver
soundmodemconfig
Soundcard modem configuration utility
aprsd
APRS daemon
aprspass
APRS passcode generator
aprsdigi
APRS digipeater
aprsmon
Monitor APRS AX.25 traffic for JavAPRS

More info is avalable here http://www.tldp.org/HOWTO/AX25-HOWTO/index.html