Showing posts with label ALSA. Show all posts
Showing posts with label ALSA. Show all posts

Monday, June 5, 2017

Configuring my SA9227 with PCM5102A 32BIT / 384KHZ USB3 Hifi Audio DAC on Linux

Configuring my SA9227 with PCM5102A 32BIT / 384KHZ USB3 Hifi Audio DAC on Linux


SA9227 with PCM5102A 32BIT / 384KHZ USB3 Hifi Audio DAC 
I was looking for a high end Audio DAC for Linux and found this unit. I wanted to generate IQ moderation for a transmitter and this module would work nicely. It Unfortunately it only works on USB3 so this one cant be used on raspberry Pi 3 :-( but works fine on my Ubuntu laptop.


Description

  • Input :5 V (USB supply),
  • THD+N: <0.005% (RL = 10 kω)
  • independence: >95 dB
  • DRC: >95 dB
  • USB sample rate:16-32BIT/32-284KHZ
I first tried it on a USB 2 port but got this error when connecting the Device to the usb2 port

/var/log$ tail -f syslog
Jun  5 21:32:03 anton-SATELLITE-P755 kernel: [101544.064132] usb 2-1.2: device descriptor read/64, error -32
Jun  5 21:32:03 anton-SATELLITE-P755 kernel: [101544.240155] usb 2-1.2: new full-speed USB device number 21 using ehci-pci
Jun  5 21:32:03 anton-SATELLITE-P755 kernel: [101544.312119] usb 2-1.2: device descriptor read/64, error -32
Jun  5 21:32:03 anton-SATELLITE-P755 kernel: [101544.488089] usb 2-1.2: device descriptor read/64, error -32
Jun  5 21:32:04 anton-SATELLITE-P755 kernel: [101544.664066] usb 2-1.2: new full-speed USB device number 22 using ehci-pci
Jun  5 21:32:04 anton-SATELLITE-P755 kernel: [101545.072135] usb 2-1.2: device not accepting address 22, error -32
Jun  5 21:32:04 anton-SATELLITE-P755 kernel: [101545.144111] usb 2-1.2: new full-speed USB device number 23 using ehci-pci
Jun  5 21:32:05 anton-SATELLITE-P755 kernel: [101545.552096] usb 2-1.2: device not accepting address 23, error -32
Jun  5 21:32:05 anton-SATELLITE-P755 kernel: [101545.552269] usb 2-1-port2: unable to enumerate USB device
Jun  5 21:32:05 anton-SATELLITE-P755 gnome-session[2394]: (gnome-software:2545): Gs-WARNING **: failed to call gs_plugin_refine on appstream: Error opening file: Permission denied


I then tried it on a usb 3 port  and got the following log.

Jun  5 21:49:55 anton-SATELLITE-P755 kernel: [102616.072168] usb 3-1: new full-speed USB device number 2 using xhci_hcd
Jun  5 21:49:55 anton-SATELLITE-P755 kernel: [102616.192175] usb 3-1: device descriptor read/64, error -71
Jun  5 21:49:55 anton-SATELLITE-P755 kernel: [102616.416205] usb 3-1: device descriptor read/64, error -71
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102616.632092] usb 3-1: new full-speed USB device number 3 using xhci_hcd
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102616.752241] usb 3-1: device descriptor read/64, error -71
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102616.976267] usb 3-1: device descriptor read/64, error -71
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102617.192119] usb 3-1: new full-speed USB device number 4 using xhci_hcd
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102617.192513] usb 3-1: Device not responding to setup address.
Jun  5 21:49:56 anton-SATELLITE-P755 kernel: [102617.396397] usb 3-1: Device not responding to setup address.
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.600038] usb 3-1: device not accepting address 4, error -71
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.712114] usb 3-1: new high-speed USB device number 5 using xhci_hcd
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.733859] usb 3-1: New USB device found, idVendor=262a, idProduct=9227
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.733864] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.733867] usb 3-1: Product: HD USB Audio
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.733869] usb 3-1: Manufacturer: XENRAN Audio
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.737019] input: XENRAN Audio HD USB Audio as /devices/pci0000:00/0000:00:1c.5/0000:05:00.0/usb3/3-1/3-1:1.0/0003:262A:9227.0002/input/input16
Jun  5 21:49:57 anton-SATELLITE-P755 kernel: [102617.737332] hid-generic 0003:262A:9227.0002: input,hidraw0: USB HID v1.00 Device [XENRAN Audio HD USB Audio] on usb-0000:05:00.0-1/input0
Jun  5 21:49:57 anton-SATELLITE-P755 mtp-probe: checking bus 3, device 5: "/sys/devices/pci0000:00/0000:00:1c.5/0000:05:00.0/usb3/3-1"
Jun  5 21:49:57 anton-SATELLITE-P755 mtp-probe: bus: 3, device: 5 was not an MTP device
Jun  5 21:49:57 anton-SATELLITE-P755 systemd-udevd[19211]: Process '/usr/sbin/alsactl -E HOME=/run/alsa restore 1' failed with exit code 99.
Jun  5 21:50:01 anton-SATELLITE-P755 gnome-session[2394]: (gnome-software:2545): Gs-WARNING **: failed to call gs_plugin_refine on appstream: Error opening file: Permission denied


This looked promising

I then checked if Alsa would see the device

sudo aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Audio [HD USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Audio [HD USB Audio], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

and the yellow was added as a new device to be used.

I could now use the normal Alsa audio controls with this device.

Saturday, October 11, 2014

Setting up my 30m APRS on HF using Quisk SDR, Soundmodem and Xastir on Linux.

Setting up my 30m APRS on HF using Quisk SDR, Soundmodem and Xastir on Linux.


Here is how I conferred my HF APRS gateway from a HF SDR. (30m Softrock SDR)

30m APRS hardware

1) Install QUISK  (SDR software) on on Linux.

2) Install Alsa loop. (loopback sound driver)
3) Install Soundmodem.  (AFSK Modem)
4) Install Xastir. ( APRS IGate and map viewer)




So lets begin.

1) Install QUISK  (SDR software) on on Linux.

The Quisk instillation need Python so you will have to install the following first.
Install the following packages.
sudo apt-get install python2.7, python2.7-dev, python-wxgtk2.8, fftw3-dev, libasound2-dev, and portaudio19-dev.

goto your Downloads directory. ( or you favorite directory)

cd Downloads
Download the Quisk application from if you want the latest version at http://james.ahlstrom.name/quisk/docs.html (quisk-3.4.4.tar.gz tar -xvf and then run quisk.py you need python ass seen above) or you could run the command  sudo apt-get install quisk


Here is the instructions if you get the latest version

 sudo apt-get install quisk
wget http://james.ahlstrom.name/quisk/quisk-3.6.18.tar.gz
unzip the quisk source code
tar -xvf quisk-3.6.18.tar.gz
there should now be a directory quisk-3.6.10
goto quisk-3.6.10 directory
cd quisk-3.6.10
Compile the quisk application
sudo make
sudo make install
you now need to create a configuration file for quisk to see your Softrock lite II sdr sound input IQ signal.
Create a text file with you favorite text editor and copy the text below and save it as 30m_aprs_quisk_conf_sdriq.py


#*****************************************************

# These are the configuration parameters for Quisk using the
# SDR-IQ by RfSpace as the capture device.

# Please do not change this sample file.

# Instead copy it to your own .quisk_conf.py and make changes there.
# See quisk_conf_defaults.py for more information.

from sdriqpkg import quisk_hardware             # Use different hardware file


# In ALSA, soundcards have these names:

#name_of_sound_play = "hw:0"
#name_of_sound_play = "hw:1"
#name_of_sound_play = "plughw"
#name_of_sound_play = "plughw:1"
#name_of_sound_play = "default"

use_sdriq = 1                                   # Use the SDR-IQ

sdriq_name = "pcm.sdrXonarD1Record12"
sdriq_clock = 66666667.0                # actual sample rate (66666667 nominal)
sdriq_decimation = 1250                 # Must be 360, 500, 600, or 1250
sample_rate = int(float(sdriq_clock) / sdriq_decimation + 0.5)  # Don't change this
name_of_sound_capt = ""                 # We do not capture from the soundcard
name_of_sound_play = "hw:0"             # Play back on this soundcard need s to be loopback device
playback_rate = 48000                   # Radio sound play rate
channel_i = 0                                   # Soundcard index of left channel
channel_q = 1                                   # Soundcard index of right channel

display_fraction = 0.85                 # The edges of the full bandwidth are not valid
#***************************************************************

Then save the file.
We now need to setup the ALSA sound system to map the alsa audio coming into the server to a friendly name "pcm.sdrXonarD1Record12" see above config file.
Run the command sudo arecord -l it will list all the ALSA audio input devices.

 sudo arecord -l
**** List of CAPTURE Hardware Devices ****
xcb_connection_has_error() returned true
Home directory /home/anton not ours.
card 0: D1 [Xonar D1], device 0: Multichannel [Multichannel]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 2: D1_1 [Xonar D1], device 0: Multichannel [Multichannel]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: M44 [M Audio Delta 44], device 0: ICE1712 multi [ICE1712 multi]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


Please note I have multiple sound cards in my Linux server so you might not have as many interfaces listed as mine above.

Identify the your sound card in the list.

in my case it is :card 3: M44 [M Audio Delta 44], device 0: ICE1712 multi [ICE1712 multi]
You now need to configure the ALSA system to map the name of quisk to this card and you do it in the ALSA config file in your user home directory. (in my case it is /home/anton)

cd  to go to your home directory

pwd To list your home directory

/home/anton
edit the following ALSA audio mapping file with you favorite text editor .asoundrc  (note the dot in front of the name it means its hidden) I use VI as an editor


 vi .asoundrc

Add the following and change the names relevant your sound card name (RED)

#************************** pcm definition ************************************
pcm.sdrM44_card {# defining the card to be used
     type hw
     card M44 # this has to be done to force reboot to point to same cards
}

#************************* controller section ***********************************
ctl.sdrM44_card {#defining the control interface
     type hw
     card M44 # this has to the same as above

     }
#****************************** recording ***********************************
pcm.sdrM44Record12 { # input input 1 and 2
     type plug
     slave {
     pcm "dsnooper_M44"
     channels 4
     }
         ttable.0.0 1
         ttable.1.1 1
}



Run the quisk with your costume configuration  with the full path to the configfile

sudo quisk -c /home/anton/Downloads/quisk-3.6.10/quisk_conf_softrock_iq.py






Now we need to setup the ALSA loop back audio interface for Quisk to send the USB demodulated audio to Xastir or Fldigi or what ever modem device you are using.

2) Install ALSA loop. (Loopback sound driver)



To check if it is already installed in the ALSA device driver.
run the command sudo arecoed -l 

If you see the loopback devise skip this section below and go section 3

Compiling snd-aloop if needed

Update: it may not be needed any longer as of kernel 2.6.38 ...

It may well be that the ALSA Loopback kernel module was not included in your distribution's kernel package (it is the case in e.g. debian, as far as I know). This is no bother as we can easily compile it. Note that there is no way around since the loopback ALSA module is not part of the kernel baseline in general. So unless your kernel packager had done the following work, you will have to do it yourself ...
Warning: I tried alsa-driver 1.0.21 against 2.6.33.5-rt22 and while it compiled fine, it would not load at all, even when forced. So don't waste your time with this version combo.
Make sure you really don't have it installed. Better check that not :)
sudo modinfo snd-aloop
If modinfo reports nada, time to check that you have installed the kernel headers corresponding to your presently running kernel. I'll leave this to you as this is very distro dependent. In debian based distros, the package is called something like linux-headers-xxx and must match the installed kernel (package linux-image-xxx).
Time to make a backup of the installed kernel modules. Example:

cd
mkdir backup
cd backup
cp -a /lib/modules/`uname -r`/kernel/sound .


Prerequisite: you of course need a compiler and other tools. In debian based distros, you can check that you have a package called build-essential installed:
dpkg -l build-essential
If not, just get it:
sudo apt-get install build-essential

Now grab the alsa-driver source code (same version as your installed ALSA, in my case 1.0.23 which I will use in my description) from the The ALSA website, uncompress, untar it and cd to the alsa-driver top dir. Here is a command summary

cd
mkdir source
cd source
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.23.tar.bz2
tar jxvf alsa-driver-1.0.23.tar.bz2
cd alsa-driver-1.0.23


Now you have to configure the source package for compilation. To help you, look at what ALSA modules are currently loaded:
cat /proc/asound/modules

make
sudo make install

It will normally install all the compiled modules into the correct location of your kernel installation. Now check that the kernel knows about the loopback module:

~$ sudo modinfo snd-aloop
filename: /lib/modules/2.6.32/kernel/sound/drivers/snd-aloop.ko
license: GPL
description: A loopback soundcard
author: Jaroslav Kysela <perex@perex.cz>
srcversion: B85A5847D027749DCF96195
depends: snd-pcm,snd
vermagic: 2.6.32 SMP preempt mod_unload modversions CORE2
parm: index:Index value for loopback soundcard. (array of int)
parm: id:ID string for loopback soundcard. (array of charp)
parm: enable:Enable this loopback soundcard. (array of bool)
parm: pcm_substreams:PCM substreams # (1-8) for loopback driver. (array of int)


Now lets load it. But before that, shut down all audio apps (including firefox). Once done, do this:
sudo modprobe snd-whatever-module-you-need
sudo modprobe snd-aloop
sudo alsa force-unload



Now, see if it works: ~$ lsmod | grep aloop snd_aloop 4732 0
snd_pcm 57065 6 snd_aloop,snd_hdsp
snd 40404 18 snd_aloop,snd_hdsp,snd_pcm,snd_hwdep,snd_rawmidi,snd_seq,snd_timer,snd_seq_device

If all was ok then add snd-aloop in /etc/modules. (If you wish, you can give the loopback soundcard another name than "Loopback" in a modprobe option but I kept the default throughout the entire HOWTO and there is no need to change it.)
In case anything went wrong and you wish to go back to your previous ALSA installation, no problem:


sudo rm /lib/modules/`uname -r`/kernel/sound sudo cp -a ~/backup/sound /lib/modules/`uname -r`/kernel/ sudo alsa force-reload

there should be two new ALSA devicess 


This virtual sound card consists of 2 devices:
hw:Loopback,0
hw:Loopback,1
to see if the loop back connector is active run the command aplay -l or arecord -l


sudo arecord -l

**** List of CAPTURE Hardware Devices ****
xcb_connection_has_error() returned true
Home directory /home/anton not ours.

card 4: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]

  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 4: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

if you did see the above loopback then you are ok and we can just add the loopback configuration to the 30m_aprs_quisk_conf_sdriq.py file as above.

edit the file 30m_aprs_quisk_conf_sdriq.py
and make shore the it has the following.
name_of_sound_play = "hw:0"             # Play back on this soundcard need s to be loopback device
select the configeration button on quisk to see if the loopback is working fine.


Now we can configure Soundmodem and Xastir to decode our HF APRS....

3) Install Soundmodem. (AFSK Modem)

Instillation of soundmodem
sudo apt-get install soundmodem

We now need to configure the soundmodem and this can easily be done with guide.
sudo soundmodemconfig


Set up the ALSA audio driver and point it to the loopback interface we have configured above " plughw:Loopback,1,0"


Create a new channel by write clicking on the previous configuration that was created and selecting new channel.

Select KISS and then enter the serial device file /dev/soundmodem0

Select Modulator and set the bits 300 board  and Frequencies to 900Hz , 1.1 Khz and enable Differential Encoding.

Select Demodeluator and set the bits 300 board  and Frequencies to 900Hz , 1.1 Khz and enable Differential Encoding.

Now to test your configuration.
Select the diagnose menu and then the spectrum option and then tune the APRS frequency on the Quisk SDR so that the AFSK tones is in the center of pass band section in the spectrum display below. (Center frequency is 1Khz) You can also then check if you Radio audio frequency is flat. (Both peeks is the same high)


Move your mouse cursor over display to find frequency of display. ( wait for APRS message to be received on HF)

Adjust the Quisk SDR frequency until the APRS signal is across the 1Khz frequency. see above



That's it, your soundmodem is configured.

here is a copy of my soundmodem configuration file /etc/ax25/soundmodem.conf that was generated with soundmodemconfig application.

<?xml version="1.0"?>
<modem>

 <configuration name="HF_300Board">
<chaccess txdelay="150" slottime="100" ppersist="40" fulldup="0" txtail="10"/>
<audio type="alsa" device="plughw:Loopback,1,0" halfdup="0" capturechannelmode="Mono"/>
<ptt file="none" gpio="0" hamlib_model="" hamlib_params=""/>
<channel name="Channel 0">
<mod mode="afsk" bps="300" f0="900" f1="1100" diffenc="1" ifname="sm0" hwaddr="ZR6AIC-2" ip="10.0.0.1" netmask="255.255.255.0" broadcast="10.0.0.255"/>
<demod mode="afsk" bps="300" f0="900" f1="1100" diffdec="1"/>
<pkt mode="KISS" ifname="sm0" hwaddr="ZR6AIC-2" ip="10.0.0.1" netmask="255.255.255.0" broadcast="10.0.0.255" file="/dev/soundmodem0" unlink="0"/>
</channel>
</configuration>
</modem>


You will need some test audio so here is a video of a message that was recorded. Play it back and see if your modem is setup coorectely.

 

After your testing you will the close the soundmodemconfig Application and then run it as a soundmodem daemon in the background.

Close the soundmodemconfig application by clicking on the X on top.

then run the deamon sudo soundmodem&

4) Install Xastir. ( APRS IGate and map viewer)


Now lets setup the iGate of your APRS demodulated data to the internet
Install Xastir
sudo apt-get install xastir

run xastir

sudo xastir

Configure the Xastir to get the serial data from your sound modem
Select the interface menu


Now select the add  button and then then the Serial KISS TNC option

The TNC port has to be /dev/soundmodem0 as we configured in the soundmodem setup above

Then setup your internet APRS server details.

Save en setup your station detail.
Select file menu and then configeration.

Update your IGate details and station info see below.



Save your station configuration.
Now start Device 0 and Device 1 in the Interface menu and if all is well the interface will change to the up state.



If all the interfaces when up you should see your IGate on the internet. http://aprs.fi



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 kit form at http://www.giga.co.za/ocart/index.php?route=product/product&product_id=153 or prebuild versions at http://www.giga.co.za/ocart/index.php?route=product/product&product_id=154

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