Unifi

1. telnet password for D-link Router

  • username:root
  • password:root

I am getting my own router first thing Monday. meanwhile, hiding this LAN segment from my network to the internet.

2. VLAN for PPPOE

  • VLAN ID 500

3. VLAN for HyppTV

  • VLAN ID 600

4. Hidden VLAN to user segment with bridge to VLAN ID 1

  • VLAN ID 209

5. RIPV2 Protocol not supported

6.my IPS and IDS Screamed like hell on the Ethernet level.

7. D-link modem has bad bandwidth

8. If you are connecting the ONU to your own linux router (ubuntu based), use the following inside your /etc/network/interfaces

auto unifi2
iface unifi2 inet ppp
pre-up /sbin/vconfig add eth1 500
pre-up /sbin/ifconfig eth1.500 up
pre-up /sbin/vconfig add eth1 600
pre-up /sbin/ifconfig eth1.600 up
provider unifi2

auto br6
iface br6 inet dhcp
bridge_port eth1.600 eth2
bridge_fd 0
bridge_stp on
bridge_maxwait 0

9. Clamp MSS to PMTU do not work, have to set MTU to 1460 or below. seems to be optimised to 1460 or 1459 on TM’s side

Ubuntu to add MTP support

sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9

bash script to get default gateway

route -n |awk ‘/^0.0.0.0/ {print $2}’ip route |awk ‘/^default/ {print $3}’

or

route -n |awk ‘/^0.0.0.0/ {print $2}’

host down

Looks like cloud at cost is currently having some issue with one of the buffalo’s host. hoped they don’t come up with more delays in recovery

embedded time-code content with dual media matching!

This is a challenging feat! An old friend just posted this challenge to me. Let’s see how this goes!

zoneedit (easydns) new update script

I have created a new script for zoneedit update

#!/bin/bash
IFACE=ppp0
DNS=8.8.8.8
USER=<username>
PASS=<password>
DNSHOST=<choose one hostname>
HOST=<hostnames>
URL=http://$USER:$PASS@dynamic.zoneedit.com/auth/dynamic.html?host=$HOST
IFACE_IP=$(/sbin/ifconfig $IFACE | awk '/inet/ {print $2}'|cut -d: -f2)
DNS_IP=$(/usr/bin/nslookup $DNSHOST - $DNS | grep -v "#53"|awk '/^Address/ {print $2}')
if [ "$IFACE_IP" != "$DNS_IP" ]; then 
 RESULT=$("/usr/bin/curl -s URL")
 if [ "$(echo $RESULT | awk -F\" '{print $(NF-5)}' )" == "200" ]; then 
   if [ "$1" != "-q" ]; then echo $RESULT | awk -F\" '{print $(NF-3)}' ; fi
 fi
else
 if [ "$1" == "-v" ]; then echo "Nothing to update"; fi
fi

contention ratio

There seems to be two version of contention ratio implementation

  1. contending contention ratio
  2. forced contention ratio

I wonder which model should I code into the edge network equipment?

Raspberry pi cam

I have just built an enclosure consist of raspberry pi running on 12v PoE with a keychain remote that will take a picture whenever a button is been pressed. It is also a WiFi AP, a captive portal and radius authenticator. But this box seems to be now knocked down to just the remote and the camera running.

 

  1. Here are the BOM
  2. Raspberry Pi with NOOBS
  3. Logitech C310 usb camera
  4. Car garage door remote
  5. LM2596S 12v to 5v regulator
  6. RJ45 modular jack
  7. Pin connector for 5 wires
  8. Plastic casing
  9. Power connector

 

This is a 12 volts PoE. LM 2596 S rectify the output to 5.00 exact.

First attempt using LM7805 causes the powercord to melt. I installed another LM7805 to rectify but the harmonics causes the raspberry pi to go into a reboot cycle.

The garage door opener remote uses 12V power at 30mW, I was thinking of reducing the circuitry with just the receiver circuit but the receiver switch can only do a power-on/off and not a contact on/off.

I am still waiting for the reduced size TF/SD adapter which is on the way from my mail order. going to burn-in the embedded box tonight with the LM2596S so far, the heat problem has not arise yet.

#!/bin/bash
button1=15
button2=16
jpgfilepath=/storage

setup ()
{
 /usr/local/bin/gpio mode $button1 up
 /usr/local/bin/gpio mode $button2 up
}

waitbutton ()
{
while [ `/usr/local/bin/gpio read $button1``/usr/local/bin/gpio read $button2` == 11 ]; do
 test=1
done
}

begincapture ()
{
 today=$(date +"%d-%m-%Y.%T")
 /usr/bin/fswebcam -q -r 1280x960 $jpgfilepath/$today.jpg 
}

setup
echo press button to take a picture
while true;
do
 waitbutton
 begincapture
done