This shows you the differences between two versions of the page.
|
odroid_repeater_controller [2018/09/13 14:54] vk3smb created |
odroid_repeater_controller [2018/09/13 15:05] (current) vk3smb |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==Intro== | + | =====Intro===== |
| I have not seen anyone compile asterisk app_rpt on an Odroid-U3. | I have not seen anyone compile asterisk app_rpt on an Odroid-U3. | ||
| - | This is based on the Fedora Odroid remix as most of the packages that are needed are there. | + | This is based on the Fedora Odroid remix as most of the packages that are needed are there. |
| 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</ | + | libusb-devel zlib-devel unixODBC-devel libtool libpri alsa-oss</ |
| - | + | ====Get the source files==== | |
| - | ===Get the source files=== | + | |
| Download the current version of Allstar/ | Download the current version of Allstar/ | ||
| - | The modified version of zaptel is here on the website: | + | The modified version of zaptel is here on the website: |
| - | <pre>wget stats.allstarlink.org/ | + | <code>wget stats.allstarlink.org/ |
| 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. | After kernel 3.8 The kernel has depreciated CONFIG_PROC_FS function. | ||
| I have patched zaptel to allow it to work with the newer kernel of the odroid. | I have patched zaptel to allow it to work with the newer kernel of the odroid. | ||
| - | <pre>cd ~/zaptel | + | <code>cd ~/zaptel |
| ./configure | ./configure | ||
| - | KSRC=~/ | + | KSRC=~/ |
| 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> | + | <code> |
| KSRC=~/ | KSRC=~/ | ||
| KSRC=~/ | KSRC=~/ | ||
| - | KSRC=~/ | + | KSRC=~/ |
| There is an installation fault with udevadm and zaptel. | There is an installation fault with udevadm and zaptel. | ||
| - | The command make '' | + | The command make //install-udev// installs a file in /// |
| - | rename this file to '' | + | rename this file to //20zaptel.rules// |
| - | <pre>mv zaptel.rules 20zaptel.rules</ | + | <code>mv zaptel.rules 20zaptel.rules</ |
| 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</ | + | <code>nano 20zaptel.rules</ |
| 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/ | # zaptel devices with ownership/ | ||
| SUBSYSTEM==" | SUBSYSTEM==" | ||
| - | </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 > / | + | <code>echo ztdummy > / |
| Now set zaptel to start on boot: | Now set zaptel to start on boot: | ||
| - | <pre> | + | <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. | The Alsa-oss emulation drivers need to be loaded before the Asterisk program or it will fail with a usb lockup. | ||
| - | <pre>echo snd-pcm-oss > / | + | <code>echo snd-pcm-oss > / |
| 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> | + | <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 |
| - | We now need to edit the chan_usbradio.c file. Remove any occurences of this string: <pre>&& | + | We now need to edit the chan_usbradio.c file. Remove any occurences of this string: <code>&& |
| - | <pre>cd ~/ | + | <code>cd ~/ |
| - | nano chan_usbradio.c</ | + | nano chan_usbradio.c</ |
| 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># | + | <code># |
| - | #include < | + | #include < |
| - | This goes between | + | This goes between |
| 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> | + | Run the following command to create the build menu: <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</ | + | <code>make && make install</ |
| By default Asterisk is not installed as a service. | By default Asterisk is not installed as a service. | ||
| - | <pre>cp ~/ | + | <code>cp ~/ |
| 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. | 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. | ||
| 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 "" | echo "" | ||
| - | echo "/ | + | echo "/ |
| 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 "" | echo "" | ||
| - | echo "/ | + | echo "/ |
| 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 '': | When editing the crontab, enter the following and press '': | ||
| - | <pre>@reboot /usr/bin/sh / | + | <code>@reboot /usr/bin/sh / |
| - | </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 / | cp *.conf / | ||
| cd usbradio | cd usbradio | ||
| - | cp *.conf / | + | cp *.conf / |
| After the config files have been copied, restart asterisk: | After the config files have been copied, restart asterisk: | ||
| - | <pre>service asterisk restart</ | + | <code>service asterisk restart</ |
| 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/* / | + | <code>cp sounds/* / |
| - | ==End Notes== | + | ====End Notes==== |
| - | The configuration files are fairly self explanatory, | + | The configuration files are fairly self explanatory, |
| Anything out of the ordinary, and examples on how to reload asterisk from the keypad/web interface so the radio' | Anything out of the ordinary, and examples on how to reload asterisk from the keypad/web interface so the radio' | ||