Compare commits
8 Commits
84c2f3e62b
...
ec7dbbae96
Author | SHA1 | Date |
---|---|---|
M0VUB | ec7dbbae96 | |
M0VUB | 473afa3468 | |
M0VUB | ecb300c710 | |
M0VUB | 37a1047bf2 | |
M0VUB | 887416faac | |
M0VUB | 7fa77a6ed7 | |
M0VUB | b51b5cfa4b | |
M0VUB | c9a956765d |
15
README.md
15
README.md
|
@ -8,17 +8,28 @@ https://github.com/LX3JL/xlxd/blob/master/ambed/readme
|
|||
```sh
|
||||
git clone https://github.com/n5amd/ambed-debian-installer
|
||||
cd ambed-debian-installer
|
||||
./ambe-debian-installer
|
||||
./ambed-debian-installer
|
||||
```
|
||||
4. Reboot after installation is complete.
|
||||
|
||||
### To interact with ambed after installation:
|
||||
### To interact with AMBEd after installation:
|
||||
```sh
|
||||
systemctl start|stop|status|restart ambed
|
||||
```
|
||||
- Installs to /ambed
|
||||
- Logs are via systemctl status
|
||||
|
||||
### Watchdog for AMBEd
|
||||
5. Install additional tools. Assuming you are still in the ambed-debian-installer dir..
|
||||
```sh
|
||||
cd templates
|
||||
cp watchdog /ambed/watchdog
|
||||
chmod 755 /ambed/watchdog
|
||||
```
|
||||
6. You can run the watchdog every 5 mins with a cron job
|
||||
```sh
|
||||
* */5 * * * * /ambed/./watchdog >> /ambed/watchdog.log
|
||||
```
|
||||
|
||||
**The other parts to this install, if you need it can be found at:**
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#A tool to install AMBE server.
|
||||
#This is essentially a scripted version of:
|
||||
#https://github.com/LX3JL/xlxd/blob/master/ambed/readme
|
||||
#Step 1: Install Debian 9.x and make sure it has internet and is up to date.
|
||||
#Step 1: Install Debian 8, 9 & 10 and make sure it has internet and is up to date.
|
||||
#Step 2: Plug AMBE Chip(s) into computer.
|
||||
#Step 3: Run this script on the computer with the ambe chips.
|
||||
#Step 4: Reboot after installation.
|
||||
|
@ -31,7 +31,7 @@ X64=http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-x86_64-1.4.6.tgz
|
|||
X32=http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-i386-1.4.6.tgz
|
||||
ARM=https://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx-arm-v7-hf-1.4.22.tgz
|
||||
AMBINSTDIR=/root/reflector-install-files/ambed
|
||||
DEP="wget git build-essential"
|
||||
DEP="wget git g++ build-essential figlet"
|
||||
GITREPO=https://github.com/LX3JL/xlxd.git
|
||||
echo "------------------------------------------------------------------------------"
|
||||
echo " Installing required software..."
|
||||
|
@ -81,6 +81,14 @@ echo "--------------------------------------------------------------------------
|
|||
cd $AMBINSTDIR
|
||||
git clone $GITREPO
|
||||
cd $AMBINSTDIR/xlxd/ambed/
|
||||
sleep 5
|
||||
echo "------------------------------------------------------------------------------"
|
||||
echo "Edit your configuration..."
|
||||
echo "------------------------------------------------------------------------------"
|
||||
sleep 5
|
||||
echo "If unsure about this feature then just hit 'CTRL-X'."
|
||||
sleep 3
|
||||
nano main.h
|
||||
make clean
|
||||
make
|
||||
make install
|
||||
|
@ -91,7 +99,7 @@ then
|
|||
echo "------------------------------------------------------------------------------"
|
||||
else
|
||||
echo "------------------------------------------------------------------------------"
|
||||
echo "I dont see an AMBED file after compiling. Look at the errors above and try again. Exiting....."
|
||||
echo "I dont see an AMBEd file after compiling. Look at the errors above and try again. Exiting....."
|
||||
echo "------------------------------------------------------------------------------"
|
||||
exit 0
|
||||
fi
|
||||
|
@ -104,7 +112,13 @@ cp ambed /ambed
|
|||
cp $DIRDIR/templates/ambed.service /etc/systemd/system/
|
||||
sed -i "s/LOCAL-IP/$LOCAL_IP/g" /etc/systemd/system/ambed.service
|
||||
systemctl daemon-reload
|
||||
sleep 2
|
||||
clear
|
||||
sleep 2
|
||||
echo "Starting AMBEd Server....."
|
||||
systemctl enable ambed
|
||||
figlet "AMBEd"
|
||||
sleep 3
|
||||
echo ""
|
||||
echo ""
|
||||
echo "************************************************************************"
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
[Unit]
|
||||
Description=AMBED
|
||||
Description=AMBE Transcoder Daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
Group=root
|
||||
ExecStartPre=-/sbin/rmmod ftdi_sio
|
||||
ExecStartPre=-/sbin/rmmod usbserial
|
||||
ExecStart=/ambed/ambed LOCAL-IP
|
||||
ExecStartPre=-/sbin/rmmod usb_serial
|
||||
ExecStart=/ambed/ambed 127.0.0.1
|
||||
Restart=on-abnormal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Alias=ambed.service
|
||||
WantedBy=multi-user.targe
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
* Watchdog to take care of reliabilty issues on AMBEd as written by LX1IQ
|
||||
*
|
||||
*
|
||||
*************************************************
|
||||
* In your XLXD instance...
|
||||
* Copy xlxd to /etc.init.d/
|
||||
*************************************************
|
||||
* In your AMBEd instance
|
||||
*copy ambed.service to /etc/systemd/system/
|
||||
*copy watchdog to /ambed/
|
||||
*************************************************
|
||||
* xlxd executable must be in /xlxd/ folder
|
||||
* ambed executable must be in /ambed/ folder
|
||||
*************************************************
|
||||
* possible options:
|
||||
*
|
||||
* #systemctl start ambed /starts ambed
|
||||
* #systemctl status ambed /shows status of ambed
|
||||
* #systemctl stop ambed /stops ambed
|
||||
* # systemctl restart ambed /restarts ambed
|
||||
*
|
||||
* automatically get it to start on boot:
|
||||
* #systemctl enable ambed
|
||||
*
|
||||
*************************************************
|
||||
* If your usb port gets unresponsive and you get some persistent timeouts,
|
||||
* the watchdog script restarts the ambed service.
|
||||
* You can run it every 5 minutes by a cronjob.
|
||||
*
|
||||
* */5 * * * * /ambed/./watchdog >> /ambed/watchdog.log
|
||||
*
|
||||
***************************************************
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
sleep 5
|
||||
PATTERN=timed
|
||||
FILE=/var/log/syslog
|
||||
if grep -q $PATTERN $FILE;
|
||||
then
|
||||
echo "ambed timeout error"
|
||||
> /var/log/syslog
|
||||
service ambed restart
|
||||
else
|
||||
echo "all ok"
|
||||
echo "Exiting..."
|
||||
exit 0
|
||||
fi
|
Loading…
Reference in New Issue