User Tools

Site Tools


odroid_repeater_controller

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

odroid_repeater_controller [2018/09/14 00:54]
vk3smb created
odroid_repeater_controller [2018/09/14 01:05] (current)
vk3smb
Line 1: Line 1:
-==Intro==+=====Intro=====
 I have not seen anyone compile asterisk app_rpt on an Odroid-U3. ​ I believe this should have enough horsepower to do DSP. I have not seen anyone compile asterisk app_rpt on an Odroid-U3. ​ I believe this should have enough horsepower to do DSP.
  
-This is based on the Fedora Odroid remix as most of the packages that are needed are there. ​ In this wiki I will start with a ready to go Fedora installation. ​ If you don't know how to do this, goto www.ordoid.in website and follow the instructions. ​ I recommend using an SD card of at least 8GB in size.  Complete all the first boot stages and it is ready to go.+This is based on the Fedora Odroid remix as most of the packages that are needed are there. ​ In this wiki I will start with a ready to go Fedora installation. ​ If you don't know how to do this, goto [[www.ordoid.in]] website and follow the instructions. ​ I recommend using an SD card of at least 8GB in size.  Complete all the first boot stages and it is ready to go.
  
 These Instructions have been written for the U3, but should work on the U2 These Instructions have been written for the U3, but should work on the U2
  
-==Prerequisites== +====Prerequisites==== 
-You need to complete the steps in [[Setting up the Odroid]] and [[Kernel Operations]] before going any further.+You need to complete the steps in [[setting_up_the_odroid|Initial Steps]] and [[odroid_kernel_operations|Update the kernel]] before going any further.
  
  
 update the software repositories:​ update the software repositories:​
-<pre>yum update</pre>+<code>yum update</code>
  
 Install the following software Install the following software
-<pre>yum install -y gcc gcc-c++ make openssl-devel newt-devel ncurses-devel ​+<code>yum install -y gcc gcc-c++ make openssl-devel newt-devel ncurses-devel ​
 doxygen libtermcap-devel libxml2-devel perl curl curl-devel libusb ​ doxygen libtermcap-devel libxml2-devel perl curl curl-devel libusb ​
-libusb-devel zlib-devel unixODBC-devel libtool libpri alsa-oss</​pre>+libusb-devel zlib-devel unixODBC-devel libtool libpri alsa-oss</​code>
  
  
- +====Get the source files====
-===Get the source files===+
  
 Download the current version of Allstar/​Asterisk with app_rpt and a modified version of zaptel and Untar them: Download the current version of Allstar/​Asterisk with app_rpt and a modified version of zaptel and Untar them:
  
-The modified version of zaptel is here on the website: ​[[File:​zaptel.tar.gz]] +The modified version of zaptel is here on the website: ​{{ :​zaptel.tar.gz ​|}} 
-<pre>wget stats.allstarlink.org/​dl/​installcd/​files.tar.gz+<code>wget stats.allstarlink.org/​dl/​installcd/​files.tar.gz
 tar zxvf zaptel.tar.gz tar zxvf zaptel.tar.gz
 tar zxvf files.tar.gz tar zxvf files.tar.gz
-</pre>+</code>
  
-==Zaptel installation==+====Zaptel installation====
  
 After kernel 3.8 The kernel has depreciated CONFIG_PROC_FS function. ​ meaning it may be the end of Zaptel. ​ We will have to try and use DahDi After kernel 3.8 The kernel has depreciated CONFIG_PROC_FS function. ​ meaning it may be the end of Zaptel. ​ We will have to try and use DahDi
  
 I have patched zaptel to allow it to work with the newer kernel of the odroid. ​ Build it: I have patched zaptel to allow it to work with the newer kernel of the odroid. ​ Build it:
-<pre>cd ~/zaptel+<code>cd ~/zaptel
 ./configure ./configure
-KSRC=~/​linux-odroid-3.8.y make menuconfig</​pre>+KSRC=~/​linux-odroid-3.8.y make menuconfig</​code>
  
 In the zaptel menuconfig, you only need to select ztdummy in the kernel modules. In the zaptel menuconfig, you only need to select ztdummy in the kernel modules.
  
 Now install zaptel: Now install zaptel:
-<pre>​KSRC=~/​linux-odroid-3.8.y make+<code>​KSRC=~/​linux-odroid-3.8.y make
 KSRC=~/​linux-odroid-3.8.y make install KSRC=~/​linux-odroid-3.8.y make install
 KSRC=~/​linux-odroid-3.8.y make config KSRC=~/​linux-odroid-3.8.y make config
-KSRC=~/​linux-odroid-3.8.y make install-udev</​pre>+KSRC=~/​linux-odroid-3.8.y make install-udev</​code>
  
 There is an installation fault with udevadm and zaptel. ​ This causes the incorrect devices in /dev.  rather than re-writing the code, there is a simple fix for this: There is an installation fault with udevadm and zaptel. ​ This causes the incorrect devices in /dev.  rather than re-writing the code, there is a simple fix for this:
  
-The command make ''​install-udev'' ​installs a file in ''​/​etc/​udev/​rules.d'' ​called ​''​zaptel.rules''​+The command make //install-udev// installs a file in ///​etc/​udev/​rules.d// called ​//zaptel.rules//
  
-rename this file to ''​20zaptel.rules''​ +rename this file to //20zaptel.rules// 
-<pre>mv zaptel.rules 20zaptel.rules</​pre>+<code>mv zaptel.rules 20zaptel.rules</​code>
  
 This means the file will be called towards the beginning of the system startup. This means the file will be called towards the beginning of the system startup.
Line 58: Line 57:
 This file needs to be modified with symlinks to make sure the correct devices appear to the system. This file needs to be modified with symlinks to make sure the correct devices appear to the system.
  
-<pre>nano 20zaptel.rules</​pre>+<code>nano 20zaptel.rules</​code>
  
 Modify the contents of this file as follows (Add the SYMLINK bits): Modify the contents of this file as follows (Add the SYMLINK bits):
  
-<pre>+<code>
 # udev rules to generate the /dev/zap device files (if not yet provided ​ # udev rules to generate the /dev/zap device files (if not yet provided ​
 # by your distribution):​ # by your distribution):​
Line 74: Line 73:
 # zaptel devices with ownership/​permissions for running as non-root # zaptel devices with ownership/​permissions for running as non-root
 SUBSYSTEM=="​zaptel", ​ OWNER="​asterisk",​ GROUP="​asterisk",​ MODE="​0660"​ SUBSYSTEM=="​zaptel", ​ OWNER="​asterisk",​ GROUP="​asterisk",​ MODE="​0660"​
-</pre>+</code>
  
 The kernel module will not load on boot so a config file needs to be made that automatically loads it. The kernel module will not load on boot so a config file needs to be made that automatically loads it.
  
-<pre>echo ztdummy > /​etc/​modules-load.d/​zaptel.conf</​pre>+<code>echo ztdummy > /​etc/​modules-load.d/​zaptel.conf</​code>
  
 Now set zaptel to start on boot: Now set zaptel to start on boot:
  
-<pre>​chkconfig zaptel on</pre>+<code>​chkconfig zaptel on</code>
  
 after you run that script you can start zaptel: after you run that script you can start zaptel:
-<pre>service zaptel start</pre>+<code>service zaptel start</code>
  
-==Sound driver loading==+====Sound driver loading====
  
 The Alsa-oss emulation drivers need to be loaded before the Asterisk program or it will fail with a usb lockup. ​ Create a file that automatically loads it: The Alsa-oss emulation drivers need to be loaded before the Asterisk program or it will fail with a usb lockup. ​ Create a file that automatically loads it:
  
-<pre>echo snd-pcm-oss > /​etc/​modules-load.d/​pcm-snd-oss.conf</​pre>+<code>echo snd-pcm-oss > /​etc/​modules-load.d/​pcm-snd-oss.conf</​code>
  
 for the interim, to load it before a reboot, run the following command: for the interim, to load it before a reboot, run the following command:
  
-<pre>​modprobe snd-pcm-oss</​pre>+<code>​modprobe snd-pcm-oss</​code>
  
-==Compiling Asterisk== +====Compiling Asterisk==== 
-I have modified a version of [[File:chan_usbradio.tar.gz]] This file could be an old version of the file.+I have modified a version of {{ :chan-usbradio.tar.gz ​|}} This file could be an old version of the file.
  
-We now need to edit the chan_usbradio.c file.  Remove any occurences of this string: <pre>&&​ !defined(AST_BUILDOPT_LIMEY)</​pre>  This will make sure that chan_usb compiles correctly under the kernel that the odriod runs. +We now need to edit the chan_usbradio.c file.  Remove any occurences of this string: <code>&&​ !defined(AST_BUILDOPT_LIMEY)</​code>  This will make sure that chan_usb compiles correctly under the kernel that the odriod runs. 
-<pre>cd ~/​asterisk/​channels +<code>cd ~/​asterisk/​channels 
-nano chan_usbradio.c</​pre>+nano chan_usbradio.c</​code>
  
 You also need to add the following includes at the start of the file: You also need to add the following includes at the start of the file:
-<pre>#​include <​dirent.h>​ +<code>#​include <​dirent.h>​ 
-#include <​libgen.h></​pre>+#include <​libgen.h></​code>
  
-This goes between ​''​#include <​search.h>​'' ​and ''​#include <​linux/​ppdev.h>​'' ​around line 50 or so.+This goes between ​//#include <​search.h>​// and //#include <​linux/​ppdev.h>​// around line 50 or so.
  
 Move into the Asterisk source folder created above. Move into the Asterisk source folder created above.
  
-Run the following command to create the build menu: <pre>​./​configure && make menuselect</​pre>+Run the following command to create the build menu: <code>​./​configure && make menuselect</​code>
  
 When the menu appears, make sure you select at least app_rpt and chan_usbradio. When the menu appears, make sure you select at least app_rpt and chan_usbradio.
Line 120: Line 119:
 Now run: Now run:
  
-<pre>make && make install</​pre>+<code>make && make install</​code>
  
 By default Asterisk is not installed as a service. ​ To accomplish this a file needs to be copied to the init.d folder: By default Asterisk is not installed as a service. ​ To accomplish this a file needs to be copied to the init.d folder:
  
-<pre>cp ~/​asterisk/​contrib/​init.d/​rc.redhat.asterisk /​etc/​init.d/​asterisk</​pre>+<code>cp ~/​asterisk/​contrib/​init.d/​rc.redhat.asterisk /​etc/​init.d/​asterisk</​code>
  
 Asterisk can now be started by the following: Asterisk can now be started by the following:
-<pre>service asterisk start</pre>+<code>service asterisk start</code>
  
-===Loading errors on reboot===+====Loading errors on reboot====
 As Udevadm loads devices and other things willy nilly, and as I do not know how to make them sequence, we need to build a couple of little scripts to make asterisk load well and truly after snd-pcm-oss loads. ​ To do this, run the following commands: As Udevadm loads devices and other things willy nilly, and as I do not know how to make them sequence, we need to build a couple of little scripts to make asterisk load well and truly after snd-pcm-oss loads. ​ To do this, run the following commands:
  
 Create a delayed start program: Create a delayed start program:
-<pre>cd ~+<code>cd ~
 echo #/bin/bash > delaystart.sh echo #/bin/bash > delaystart.sh
 echo ""​ >> delay start.sh echo ""​ >> delay start.sh
-echo "/​usr/​bin/​at now +2 minutes < /​root/​astart.sh"</​pre>+echo "/​usr/​bin/​at now +2 minutes < /​root/​astart.sh"</​code>
  
 Create the asterisk start program: Create the asterisk start program:
-<pre>cd ~+<code>cd ~
 echo #/bin/bash > astart.sh echo #/bin/bash > astart.sh
 echo ""​ >> delay start.sh echo ""​ >> delay start.sh
-echo "/​usr/​sbin/​service asterisk start"</​pre>+echo "/​usr/​sbin/​service asterisk start"</​code>
  
 Change them to executable: Change them to executable:
-<pre>+<code>
 chmod +x delaystart.sh chmod +x delaystart.sh
 chmod +x astart.sh chmod +x astart.sh
-</pre>+</code>
  
 Now a Cron Job needs to be created at reboot that calls the delayed start program: Now a Cron Job needs to be created at reboot that calls the delayed start program:
-<pre>crontab -e</pre>+<code>crontab -e</code>
  
 When editing the crontab, enter the following and press '':​w :​q''​ to save and exit: When editing the crontab, enter the following and press '':​w :​q''​ to save and exit:
-<pre>@reboot /usr/bin/sh /​root/​delaystart.sh >/​dev/​null & +<code>@reboot /usr/bin/sh /​root/​delaystart.sh >/​dev/​null & 
-</pre>+</code>
  
 If all is good, you should be able to reboot the Odroid, and it will load zaptel, ztdummy, pcm-snd-oss and then after 2 mins, Asterisk. If all is good, you should be able to reboot the Odroid, and it will load zaptel, ztdummy, pcm-snd-oss and then after 2 mins, Asterisk.
  
-==Basic Config files==+====Basic Config files====
 Got to the configs folder and copy the config files for asterisk to run Got to the configs folder and copy the config files for asterisk to run
-<pre>+<code>
 cd ~/configs cd ~/configs
 cp *.conf /​etc/​asterisk/​ cp *.conf /​etc/​asterisk/​
 cd usbradio cd usbradio
-cp *.conf /​etc/​asterisk/</​pre>+cp *.conf /​etc/​asterisk/</​code>
  
 After the config files have been copied, restart asterisk: After the config files have been copied, restart asterisk:
-<pre>service asterisk restart</​pre>+<code>service asterisk restart</​code>
  
 It should now be looking for a fob and attempting to work. It should now be looking for a fob and attempting to work.
  
-===Allstar sounds===+====Allstar sounds====
 To get the sound files specific to app_rpt, goto the asterisk source folder and enter the following: To get the sound files specific to app_rpt, goto the asterisk source folder and enter the following:
-<pre>cp sounds/* /​var/​lib/​asterisk/​sounds -a</pre>+<code>cp sounds/* /​var/​lib/​asterisk/​sounds -a</code>
  
-==End Notes==+====End Notes====
  
-The configuration files are fairly self explanatory,​ and there is mountains of information at [http://www.ohnosec.org/drupal ohnosec.org]+The configuration files are fairly self explanatory,​ and there is mountains of information at [[http://allstarlink.org|Allstarlink.org]]
  
 Anything out of the ordinary, and examples on how to reload asterisk from the keypad/web interface so the radio'​s can change identity (ie from analogue to D-star) will eventually turn up here. Anything out of the ordinary, and examples on how to reload asterisk from the keypad/web interface so the radio'​s can change identity (ie from analogue to D-star) will eventually turn up here.
odroid_repeater_controller.txt · Last modified: 2018/09/14 01:05 by vk3smb