Difference between revisions of "APRX: APRX di RaspberryPi dengan soundmodem"

From OnnoWiki
Jump to navigation Jump to search
(New page: DIXPRS ON A RASPBERRY 05/06/2013 12:06:10 am This document describes step by step how to install an iGate / Digipeater on a Raspberry PI, using soundmodem as the TNC. It is no...)
 
 
Line 533: Line 533:
  
 
* http://www.pa0esh.nl/index.php?option=com_content&view=article&id=91&Itemid=108
 
* http://www.pa0esh.nl/index.php?option=com_content&view=article&id=91&Itemid=108
 +
* http://mstewart.net/super8/aprs/RASP/index.htm
 +
 +
==Pranala Menarik==

Latest revision as of 08:30, 20 November 2013

DIXPRS ON A RASPBERRY 05/06/2013 12:06:10 am


This document describes step by step how to install an iGate / Digipeater on a

Raspberry PI, using soundmodem as the TNC.


It is noted that for the time being, you have to twiddle a bit around with the TX

delay settings of the soundmodem, because I am still implementing the

hardware to make the TX go ON/OFF so for the time being, the TX should be

able to work with VOX.


Step 1

Create a fresh image of Raspbian “wheezy”, which you can download from

here and where they also provide many links to how to do this….

Personally I use a little programme called PiWriter.

http://sourceforge.net/projects/piwriter/


Since I do not have a HDMI screen for the Raspberry, I use the SSH method,

either direct from a Linux machine or through Putty on windows. Take your

pick.


Find the IP address of the Raspberry after it has booted.

SSH into the machine using pi as the username – The password is raspberry

Execute sudo su

Then change the su root password by executing passwd

So now we have bot a user (pi) as well as a root account under control.


Step 2


Update the Raspberry to the latest status

$ sudo apt-get update

Now upgrade the Raspberry

$ sudo apt-get upgrade


Since we are going to install dixprs, we require python 2…. (already installed,

but also the python-serial as well as sqlite3 modules


$ sudo apt-get install python-serial sqlite3 libax25 build-essential

python-dev libax25-dev



Since you most likely wish to run the digipeater autonomous, also in case of a

restart, I suggest we move to the root user right now


$ sudo su


On LINUX DIXPRS can communicate to a KISS TNC directly via a serial

interface. However it is advised to use TNC's and modems via AX.25 stack. It

makes other type modems, like USCC card, BAYCOM modem, etc. usable with

DIXPRS. It requires an additional Python module installed, developed for

DIXPRS, called pyax25.

Note: procedure requires libax25, Python development files and basic

development tool chain with GCC installed. They were installed above

(libax25 & python-dev)


Download pyax25.tar.gz and extract to a temporary folder.

• mkdir pyax25

• cd pyax25

• wget https://sites.google.com/site/dixprs/downloads/pyax25.tar.gz

• tar -xzvf pyax25.tar.gz



Then enter


./compile_ax25.py build

./compile_ax25.py install



Check installation as follows:


Start Python (simply type python) and type


import _ax25


If everything is OK, only prompt displayed, no error message.


For more dixprs information see the website from Béla Márkus, HA5DI,

The most informative Google groups about dixprs is located at

https://groups.google.com/forum/?fromgroups - !forum/dixprs

Step 3


Create the dixprs directory and cd into it

$ mkdir –p /usr/local/dixprs && cd /usr/local/dixprs

Download the source code from using wget…..




$ wget https://sites.google.com/site/dixprs/downloads/dixprs-

2.2.2.tar.gz

or from the download page on the website

Unpack the tar ball

$

Now chmod all files

$ chmod 755 *

Step 4

Soundmodem and soundmodem tools installation

Skip this paragraph if you are using AX25 or KISS with TNC modem !

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

So now a bit of hardware

I use a very cheap soundcard - from eBay…,

which looked like this and did not cost much.

But that may also create problems. So look

around for USB sound modules, and be

prepared to be disappointed that you may

have to buy another one.

In my case one worked, and one did not…

Here is the link if it still exists.

Stick the USB dongle into the Raspberry and check what you have got.

$ lsusb Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.

Bus 001 Device 004: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

Bus 001 Device 005: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB

Bus 001 Device 006: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius G- Talk)

Bus 001 Device 007: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

Bus 001 Device 008: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR

mySmartUSB light

The green showed up as the type of sound module and there is plenty of info

about this little machine on the net.

Raspbian “wheezy” comes with the alsa sound system pre installed so let’s see

what we have…



$ aplay –l **** List of PLAYBACK Hardware Devices ****

card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]

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 1: Device [Generic USB Audio Device], device 0: USB Audio [USB Audio]

Subdevices: 1/1

Subdevice #0: subdevice #0


Hmmm, the first module is the build in sound module, and our usb dongle is

listed as number 2.

However, we wish to make this the primary sound device so we nee to tweek

a little around.


We have to edit the /etc/modprobe.d/alsa-base.conf file to make the USB

sound dongle come first

$ nano /etc/modprobe.d/alsa-base.conf gives us:


  1. autoloader aliases

install sound-slot-0 /sbin/modprobe snd-card-0

install sound-slot-1 /sbin/modprobe snd-card-1

install sound-slot-2 /sbin/modprobe snd-card-2

install sound-slot-3 /sbin/modprobe snd-card-3

install sound-slot-4 /sbin/modprobe snd-card-4

install sound-slot-5 /sbin/modprobe snd-card-5

install sound-slot-6 /sbin/modprobe snd-card-6

install sound-slot-7 /sbin/modprobe snd-card-7

  1. Cause optional modules to be loaded above generic modules

install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe -

-quiet snd-seq ; : ; }

install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq- midi ; : ; }

install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd- emu10k1-synth ; : ; }

  1. Keep snd-pcsp from beeing loaded as first soundcard

options snd-pcsp index=-2

  1. Keep snd-usb-audio from beeing loaded as first soundcard

options snd-usb-audio index=-2

  1. Prevent abnormal drivers from grabbing index 0

options bt87x index=-2

options cx88_alsa index=-2

options snd-atiixp-modem index=-2

options snd-intel8x0m index=-2

options snd-via82xx-modem index=-2



Now replace the lines


  1. Keep snd-pcsp from beeing loaded as first soundcard

options snd-pcsp index=-2

  1. Keep snd-usb-audio from beeing loaded as first soundcard

options snd-usb-audio index=-2

  1. Prevent abnormal drivers from grabbing index 0


with

options snd slots=snd_bcm2835,snd_usb_audio

options snd_usb_audio index=0

options snd_bcm2835 index=2


and reboot


Now type aplay –l and you should see this


$ aplay -l **** List of PLAYBACK Hardware Devices ****

card 0: Device [Generic USB Audio Device], device 0: USB Audio [USB Audio]

Subdevices: 1/1

Subdevice #0: subdevice #0


Now we check the sound system:


Start alsamixer,

and unmute the

sound channels

(use F5 and F6

to see more of

the controls, the

M-key mutes /

unmutes a

channel and you

with by

pressing the

left-arrow /

right arrow

keys.



Connect a speaker headphone as well as a microphone for the final tests


$ speaker-test -c 2 gets you noise at the headphone switching from left to right.

Next we check if the sound modules are correctly loaded


$ cat /etc/modules

  1. /etc/modules: kernel modules to load at boot time.
  1. This file contains the names of kernel modules that should be loaded
  1. at boot time, one per line. Lines beginning with "#" are ignored.
  1. Parameters can be specified after the module name.


snd-bcm2835


Here we see that the usb module is not loaded so we change the modules file


$ nano /etc/modules

and add the usb module snd-usb-audio


Note if you are not using the on board sound module at all. You can also

comment it out here


Anyway, after saving the command cat /etc/module should give us the

following:

$ cat /etc/modules

  1. /etc/modules: kernel modules to load at boot time.
  1. This file contains the names of kernel modules that should be loaded
  1. at boot time, one per line. Lines beginning with "#" are ignored.
  1. Parameters can be specified after the module name.


snd-bcm2835

snd-usb-audio


The next file we have to change completely for this usb sound module is

/etc/asound.conf



Replace it with the following content :


pcm.dmixer {

type dmix

ipc_key 1024

slave {

pcm "hw:0,0"

period_time 0

period_size 1024

buffer_size 8192

rate 48000

}

bindings {

0 0

1 1


Referensi

Pranala Menarik