├── templates └── ambed.service ├── README.md └── ambe-debian-installer /templates/ambed.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=AMBED 3 | 4 | [Service] 5 | Type=simple 6 | ExecStartPre=-/sbin/rmmod ftdi_sio 7 | ExecStartPre=-/sbin/rmmod usbserial 8 | ExecStart=/ambed/ambed LOCAL-IP 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | Alias=ambed.service 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ambed-debian-installer 2 | This is a simple install script to install AMBED, a piece of software that when combined with hardware AMBE vocoder chips and another piece of software, XLXD, can transcode digital voice modes. This script simply runs through the official install instructions found at: 3 | https://github.com/LX3JL/xlxd/blob/master/ambed/readme 4 | ### To Install: 5 | 1. Have a Debian 9.x computer ready and up to date with a 64bit CPU architecture. 6 | 2. Plug the AMBE vocoder chips into the server. 7 | 3. 8 | ```sh 9 | git clone https://github.com/n5amd/ambed-debian-installer 10 | cd ambed-debian-installer 11 | ./ambe-debian-installer 12 | ``` 13 | 4. Reboot after installation is complete. 14 | 15 | ### To interact with ambed after installation: 16 | ```sh 17 | systemctl start|stop|status|restart ambed 18 | ``` 19 | - Installs to /ambed 20 | - Logs are via systemctl status 21 | 22 | 23 | **The other parts to this install, if you need it can be found at:** 24 | 25 | https://github.com/n5amd/Multi-Reflector-Installer 26 | 27 | **For more information, please visit:** 28 | 29 | https://n5amd.com/digital-radio-how-tos/build-digital-voice-transcoding-server/ 30 | -------------------------------------------------------------------------------- /ambe-debian-installer: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #A tool to install AMBE server. 3 | #This is essentially a scripted version of: 4 | #https://github.com/LX3JL/xlxd/blob/master/ambed/readme 5 | #Step 1: Install Debian 9.x and make sure it has internet and is up to date. 6 | #Step 2: Plug AMBE Chip(s) into computer. 7 | #Step 3: Run this script on the computer with the ambe chips. 8 | #Step 4: Reboot after installation. 9 | # systemctl status ambed #to show the status 10 | # systemctl stop ambed #to stop ambed 11 | # systemctl start ambed #to start ambed 12 | # ambed logs are part of /var/log/messages 13 | #Lets begin------------------------------------------------------------------------------------------------- 14 | WHO=$(whoami) 15 | if [ "$WHO" != "root" ]; 16 | then 17 | echo "" 18 | echo "You Must be root to run this script!!" 19 | exit 0 20 | fi 21 | if [ ! -e "/etc/debian_version" ] 22 | then 23 | echo "" 24 | echo "This script is only tested in Debian 8,9 and x64 cpu Arch. for now." 25 | exit 0 26 | fi 27 | DIRDIR=$(pwd) 28 | LOCAL_IP=$(ip a | grep inet | grep "eth0\|en" | awk '{print $2}' | tr '/' ' ' | awk '{print $1}') 29 | ARC=$(lscpu | grep Arch | awk '{print $2}') 30 | X64=https://ftdichip.com/wp-content/uploads/2022/07/libftd2xx-x86_64-1.4.27.tgz 31 | X32=https://ftdichip.com/wp-content/uploads/2022/07/libftd2xx-x86_32-1.4.27.tgz 32 | ARM=https://ftdichip.com/wp-content/uploads/2022/07/libftd2xx-arm-v7-hf-1.4.27.tgz 33 | AMBINSTDIR=/root/reflector-install-files/ambed 34 | DEP="wget git build-essential" 35 | GITREPO=https://github.com/LX3JL/xlxd.git 36 | echo "------------------------------------------------------------------------------" 37 | echo " Installing required software..." 38 | echo "------------------------------------------------------------------------------" 39 | apt-get -y install $DEP 40 | mkdir -p /ambed 41 | mkdir -p $AMBINSTDIR 42 | if [ ! -e /usr/local/lib/libftd2xx.so ] 43 | then 44 | echo "" 45 | echo "------------------------------------------------------------------------------" 46 | echo "Downloading and installing FTDI driver...." 47 | echo "------------------------------------------------------------------------------" 48 | cd $AMBINSTDIR 49 | if [ "$ARC" = "x86_64" ]; 50 | then 51 | wget $X64 52 | tar xfvz libftd2xx-x86_64-1.4.27.tgz 53 | cd release/build 54 | cp libftd2xx.* /usr/local/lib 55 | chmod 0755 /usr/local/lib/libftd2xx.so.1.4.27 56 | ln -sf /usr/local/lib/libftd2xx.so.1.4.27 /usr/local/lib/libftd2xx.so 57 | elif [ "$ARC" = "armv71" ]; 58 | then 59 | wget $ARM 60 | tar xfvz libftd2xx-arm-v7-hf-1.4.27.tgz 61 | cd release/build 62 | cp libftd2xx.* /usr/local/lib 63 | chmod 0755 /usr/local/lib/libftd2xx.so.1.4.27 64 | ln -sf /usr/local/lib/libftd2xx.so.1.4.27 /usr/local/lib/libftd2xx.so 65 | elif [ "$ARC" = "i686" ]; 66 | then 67 | wget $X32 68 | tar xfvz libftd2xx-x86_32-1.4.27.tgz 69 | cd release/build 70 | cp libftd2xx.* /usr/local/lib 71 | chmod 0755 /usr/local/lib/libftd2xx.so.1.4.27 72 | ln -sf /usr/local/lib/libftd2xx.so.1.4.27 /usr/local/lib/libftd2xx.so 73 | fi 74 | else 75 | echo "------------------------------------------------------------------------------" 76 | echo "It looks like the driver is already installed. If this is wrong, see what '/usr/local/lib/libftd2xx.so' is up to. Skipping FTDI Driver install. " 77 | fi 78 | echo "------------------------------------------------------------------------------" 79 | echo "Downloading and installing AMBED..." 80 | echo "------------------------------------------------------------------------------" 81 | cd $AMBINSTDIR 82 | git clone $GITREPO 83 | cd $AMBINSTDIR/xlxd/ambed/ 84 | make clean 85 | make 86 | make install 87 | if [ -e ambed ] 88 | then 89 | echo "------------------------------------------------------------------------------" 90 | echo "It looks like everything compiled successfully. There is an 'ambed' application file. " 91 | echo "------------------------------------------------------------------------------" 92 | else 93 | echo "------------------------------------------------------------------------------" 94 | echo "I dont see an AMBED file after compiling. Look at the errors above and try again. Exiting....." 95 | echo "------------------------------------------------------------------------------" 96 | exit 0 97 | fi 98 | echo "" 99 | echo "" 100 | echo "------------------------------------------------------------------------------" 101 | echo "Copying ambed files and systemd files... " 102 | echo "------------------------------------------------------------------------------" 103 | cp ambed /ambed 104 | cp $DIRDIR/templates/ambed.service /etc/systemd/system/ 105 | sed -i "s/LOCAL-IP/$LOCAL_IP/g" /etc/systemd/system/ambed.service 106 | systemctl daemon-reload 107 | systemctl enable ambed 108 | echo "" 109 | echo "" 110 | echo "************************************************************************" 111 | echo "" 112 | echo "" 113 | echo " The install is complete. " 114 | echo " ******* Now reboot the server. ******* " 115 | echo " Use 'systemctl status ambed' to check the status. " 116 | echo " ambed logs are part of /var/log/messages. " 117 | echo " Just make sure this computer can be accessed over UDP 10100-10199 " 118 | echo "" 119 | echo "" 120 | echo "************************************************************************" 121 | --------------------------------------------------------------------------------