Installing DD-WRT
1. Visit the DD-WRT FTP to get the latest BS build, pick the year (2015), pick the current build (the latest is 12-01-2015-r28397) and find your current WRT1900AC (Just press Ctrl+F, type in wrt1900ac since there's a lot of routers in the list... it begins with linksys-) and pick the model you have (it currently shows the ac, acs and v2).
2. Download the factory-to-ddwrt.img
3. Login to the router stock firmware at 192.168.1.1 (or whatever address you have it configured as) and click connectivity on the side. There will be a way to upload firmware called "Manual". Choose the img file you downloaded and click start. You will get a few warnings... just say yes and let it upload. The router will reboot eventually and you'll need to navigate back to 192.168.1.1 (The screen will show waiting... but it will be waiting forever until you renavigate).
Congratulations. You just installed DD-WRT. You can now go from there and setup your user/password and configure your router.
I read somewhere to upgrade to a newer build you should return back to the stock firmware and upgrade from there rather than using the DD-WRT interface so you don't overwrite the partition stock is on. Doing so would make it harder to recover the unit in the event of misconfiguration or if a setting bricks the unit.
Booting back to stock from other patition
When you install DD-WRT over stock, it installs on a different partition. You can use the following command by entering it in DDWRT commands on the administration tab, Telnet or SSH to determine what partition DD-WRT is running on.
Code:
ubootenv get boot_part
The last number it returns is the partition (it will return 1 or 2). In my case, DD-WRT is on partition 1, so to return to Stock, enter (If yours returns 2, put 1):
Code:
ubootenv set boot_part 2
and then reboot. You can use the command
Code:
reboot
To reset and boot to stock if you brick DD-WRT installation
1. Assuming the router is on, turn it off.
2. Turn it back on... the power light will illuminate and then go out briefly as it prepares to boot. As soon as it goes out, turn it off again. Repeat this step three times, leaving the router on after the third time you turn it off.
3. Let it boot. It should return to stock after you let it boot.
Ubuntu 14.04 - ZM 1.26.5 or later to 1.30.0 or the latest PPA version
Become root
sudo su
Add Repository
Note: if you need to remove a repository use: add-apt-repository --remove ppa:iconnor/zoneminder
add-apt-repository ppa:iconnor/zoneminder
apt-get update
Stop Zoneminder
service zoneminder stop
Upgrade the installation
apt-get upgrade (may return nothing to upgrade)
apt-get dist-upgrade
You will be asked if you want to replace /etc/init.d/zoneminder. Choose "Y"
With ZM 1.30.3 the database will automatically upgrade.
Add back the delay to allow MySQL to start before Zoneminder
nano /etc/init.d/zoneminder
Add sleep 15 as shown:
start() {
sleep 15
echo -n "Starting $prog: "
Ctrl+o Enter to save
CTRL+x to exit
Remove symbolic link
rm /etc/apache2/conf-enabled/zoneminder.conf
Set permissions of /etc/zm/zm.conf to root:www-data 740
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
Enable Zoneminder and rewrite
a2enconf zoneminder
a2enmod rewrite
Start Zoneminder (Note: Zoneminder may have started automatically after the dist-upgrade)
service zoneminder start
Add timezone to PHP
nano /etc/php5/apache2/php.ini
Search for [Date] and make changes as follows for your time zone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save
CTRL+x to exit
Restart Apache
service apache2 restart
Open Zoneminder. Click on Options - Paths
Change PATH_ZMS to /zm/cgi-bin/nph-zms
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Pic stream URL For FOSCAM PI9805I
Source Type - Remote
Remote Protocol - HTTP
Remote Method - Simple
Remote Host Path - /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=USER&pwd=PASSWORD
Target colorspace - 24 bit colour
Capture Width (pixels) - 1280
Capture Height (pixels) - 960
"http://IP:PORT/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=USER&pwd=PASSWORD"
Become root
sudo su
Add Repository
Note: if you need to remove a repository use: add-apt-repository --remove ppa:iconnor/zoneminder
add-apt-repository ppa:iconnor/zoneminder
apt-get update
Stop Zoneminder
service zoneminder stop
Upgrade the installation
apt-get upgrade (may return nothing to upgrade)
apt-get dist-upgrade
You will be asked if you want to replace /etc/init.d/zoneminder. Choose "Y"
With ZM 1.30.3 the database will automatically upgrade.
Add back the delay to allow MySQL to start before Zoneminder
nano /etc/init.d/zoneminder
Add sleep 15 as shown:
start() {
sleep 15
echo -n "Starting $prog: "
Ctrl+o Enter to save
CTRL+x to exit
Remove symbolic link
rm /etc/apache2/conf-enabled/zoneminder.conf
Set permissions of /etc/zm/zm.conf to root:www-data 740
chmod 740 /etc/zm/zm.conf
chown root:www-data /etc/zm/zm.conf
Enable Zoneminder and rewrite
a2enconf zoneminder
a2enmod rewrite
Start Zoneminder (Note: Zoneminder may have started automatically after the dist-upgrade)
service zoneminder start
Add timezone to PHP
nano /etc/php5/apache2/php.ini
Search for [Date] and make changes as follows for your time zone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save
CTRL+x to exit
Restart Apache
service apache2 restart
Open Zoneminder. Click on Options - Paths
Change PATH_ZMS to /zm/cgi-bin/nph-zms
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Pic stream URL For FOSCAM PI9805I
Source Type - Remote
Remote Protocol - HTTP
Remote Method - Simple
Remote Host Path - /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=USER&pwd=PASSWORD
Target colorspace - 24 bit colour
Capture Width (pixels) - 1280
Capture Height (pixels) - 960
"http://IP:PORT/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=USER&pwd=PASSWORD"
Niekaip nesugebėdavau suprasti užrašų tokių kaip "DDRC |=(1<<1)" arba "DDRC &=~(1<<2)" O vikas čia paprasta. Užrašas 1<<1 1 paslenka i kairę per vieną bitą arba 1<<2 į kairę per du bitus. Toks užrašymas naudojamastam jog nereikėtų rašyt daug nulių arba galvoti kaip tai užrašyti kita kokia skaičiavimo sitema. Paprašciausiai nurodom kad tai bus 1 kuris turi stovėti (būti paslinktas) per kiek tai pozicijų į kairę. Rezultate, pasislinkę per vieną poziciją, gauname 0000 0010 o per du 0000 0100 nes pradžioje turėjome 0000 0001.
Toliau jei reikia nustatyti ta konkretų bituką į 1 tuomet paimama jau esanti porto reikšmė (tiesiog prieš simbolį "|" praleidžiama DDRC) ir su ARBA "|" pagalba gauname tik to konkretaus bituko nustatymą į 1 Sakykim mes nežinom kokia buvo porto reiksmė, tad ja pažymėsim xxxx xxxx. Musu turima reišmė po paslinkimo yra 0000 0010. Atliekant ARBA gausime xxxx xx1x nes:
x ARBA "|" 1 = 1 prie betkokiu x reikšmių (x gali būti tik 0 arba 1)
O jei reikia nustatyti į 0 tuomet paslinkta reikšmė invertuojama su "~" ir naudojamas IR "&" loginis sulyginimas. Sakykim mes nežinom kokia buvo porto reiksmė, tad ja pažymėsim xxxx xxxx. Musu turima reišmė po paslinkimo ir invertavimo yra 1111 1011. Atliekant ARBA gausime xxxx x0xx nes:
x IR "&" 0 reikšmė keičiasi 1 tik jei abudu yra 1. O mes lyginam su 0 tad mums reikalingas bitas visuomet įgaus 0 reikšmę ir rezultate gausime xxxx x0xx.
Toliau jei reikia nustatyti ta konkretų bituką į 1 tuomet paimama jau esanti porto reikšmė (tiesiog prieš simbolį "|" praleidžiama DDRC) ir su ARBA "|" pagalba gauname tik to konkretaus bituko nustatymą į 1 Sakykim mes nežinom kokia buvo porto reiksmė, tad ja pažymėsim xxxx xxxx. Musu turima reišmė po paslinkimo yra 0000 0010. Atliekant ARBA gausime xxxx xx1x nes:
x ARBA "|" 1 = 1 prie betkokiu x reikšmių (x gali būti tik 0 arba 1)
O jei reikia nustatyti į 0 tuomet paslinkta reikšmė invertuojama su "~" ir naudojamas IR "&" loginis sulyginimas. Sakykim mes nežinom kokia buvo porto reiksmė, tad ja pažymėsim xxxx xxxx. Musu turima reišmė po paslinkimo ir invertavimo yra 1111 1011. Atliekant ARBA gausime xxxx x0xx nes:
x IR "&" 0 reikšmė keičiasi 1 tik jei abudu yra 1. O mes lyginam su 0 tad mums reikalingas bitas visuomet įgaus 0 reikšmę ir rezultate gausime xxxx x0xx.
Sugalvojau savo DX Patrol iškraustyti ant aukšto ir suorganizuoti jam TCP prisijungimą. Tad kišam į gyvenantį Ubuntu 14.04 serverį RTL SDR softą. Jungiamės standartiškai su Putty pagalba per SSH ir dirbam.
Kazkodėl po Ubuntu instaliacijos neveikia neiviena tinklo korta. Tad pradžiai susitvarkom su tuo
sudo nano /etc/network/interfaces
ir gale failo įrašom
auto wlan0
iface wlan0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8
wpa-ssid R10
wpa-psk 67455665
(Toks wlan įjungimas tinka mano turimam Dell laptopui tad nesu tikras dėl kitų. Wi-Fi korta Intel 5100)
Vuolia turim tinklą.
Toliau instaliuojam visus RTL-SDR reikalus.
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install libusb-1.0-0.dev
sudo apt-get install build-essential
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
pakonfigūruojam blacklist-rtl.conf failą arba sukuriam jei tokio nėra.
sudo nano /etc/modprobe.d/Blacklist-rtl.conf
Faile turi būti :
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
blasklist rtl2838
Kaip ir viskas baigta. Pajungiam DX Patrol ir pekraunam sistemą.
Patikrinam su
rtl_test -t
ar randa įrengini. Jei taip tai paleidziam su komanda
rtl_tcp -a 192.168.1.10 (IP musu Ubuntu serverio. Gale galim nurodyti porta su -p)
Perkrovę patikrinam ar servisas pasileido
sudo ps -e
ieškom rtl_tcp serviso
Jei pasileido vadinasi viskas gerai.
Kazkodėl po Ubuntu instaliacijos neveikia neiviena tinklo korta. Tad pradžiai susitvarkom su tuo
sudo nano /etc/network/interfaces
ir gale failo įrašom
auto wlan0
iface wlan0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8
wpa-ssid R10
wpa-psk 67455665
(Toks wlan įjungimas tinka mano turimam Dell laptopui tad nesu tikras dėl kitų. Wi-Fi korta Intel 5100)
Vuolia turim tinklą.
Toliau instaliuojam visus RTL-SDR reikalus.
sudo apt-get install git
sudo apt-get install cmake
sudo apt-get install libusb-1.0-0.dev
sudo apt-get install build-essential
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
pakonfigūruojam blacklist-rtl.conf failą arba sukuriam jei tokio nėra.
sudo nano /etc/modprobe.d/Blacklist-rtl.conf
Faile turi būti :
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
blasklist rtl2838
Kaip ir viskas baigta. Pajungiam DX Patrol ir pekraunam sistemą.
Patikrinam su
rtl_test -t
ar randa įrengini. Jei taip tai paleidziam su komanda
rtl_tcp -a 192.168.1.10 (IP musu Ubuntu serverio. Gale galim nurodyti porta su -p)
Perkrovę patikrinam ar servisas pasileido
sudo ps -e
ieškom rtl_tcp serviso
Jei pasileido vadinasi viskas gerai.