Wednesday, January 9, 2013

Creating a ffp (fonz fun plug) package for proxychains to run on the dns-323

I wanted to run an application on my dns-323 via a proxy server, specifically a SOCKS5 proxy server.  I couldn't find anyone that had build proxychains so here it is.  These instructions are for ffp 0.5.

Links:

ffp:  information about using ffp with a dlink dns-323

Using the method described in the second link above did NOT work for me.  There was an issue at the final stage, during make install where make was attempting to install proxychains.conf to a location that didn't exist.  And while I was able to manually tweak it to build correctly, that just won't work when adding to the build env because it will download the package each time.  So, instead I will create the package manually.

We need to install the following packages:
  • make
  • gcc
  • distcc
  • libtool
  • binutils
  • kernel-headers
  • automake
  • autoconf
  • patch
Each of these can be downloaded from the link listed above for packages using wget (wget ).  Then, they are installed using funpkg -i

Download proxychains, extract the contents and build:

cd /tmp
wget http://downloads.sourceforge.net/project/proxychains/proxychains/version%203.1/proxychains-3.1.tar.gz
tar xvzf proxychains-3.1.tar.gz
cd proxychains-2.1
mkdir ffp
./configure --enable-static=no --prefix=/tmp/proxychains-3.1/ffp
make
make install
tar cvzf proxychains-3.1.tgz ffp

Now we can test installing the package:

funpkg -i proxychains-3.1.tgz

Friday, December 30, 2011

USB mounting a blackberry playbook in linux

Blackberry has decided that the playbook will not be visible as a mass storage device.  Lovely.  And, they only provide drivers for windows and mac.  Nice.  So, for us linux users?  There is a solution.  This has been blogged about by several people, but I'll summarize it here for at least my own purposes.

Basically, what we'll be doing here is having the playbook appear as a USB network card on linux and using a SMB mount.

1.  Settings -> Storage & Sharing:
  • Change "USB Connections" to "Connect to Windows"

  • Change "Network Identification" to give your playbook a network name, workgroup and a username.

  • Set "File Sharing" to ON

  • You can optionally turn ON Wi-Fi sharing so that you can use SMB mounts over Wi-Fi, but that is much slower than the USB mount we're about to cover.
  • Set a password - again, this is optional.  I didn't bother because I intend to disable file sharing when I am done.
2.  Settings -> About -> Network
  • With your playbook connected to your computer via the USB cable, the playbook should have an IPv4 address assigned to the USB NIC.  Take note of the address.  


3.  On your linux PC (one that uses gnome/nautilus in this case)
  • Open Nautilus, and from the FILE menu, select "Connect to server..."  (sorry, no screenshot, but apparently one can't take screenshots when a menu is active)
  • In the "Connect to server..." dialog:
              - select "windows share" for service type
              - enter the IP address you noted above into the "Server" field
              - set the "Share" field to "/media"
              - enter the playbook file sharing username that you set



  •  Once you click "connect" the playbook should now be mounted and visible in nautilus.


IF you prefer to do things from the command line as I do, then replace step 4 with the following:

     smbmount //169.254.67.137/media /media -o leo 

Of course, replace the IP address, username and mount destination with your own.


One final point, if you would prefer to use Wi-Fi mounting, not much changes, just the IP address of the playbook, which is more likely on your local network rather than an 169.xxx.xxx.xxx (avahi?) network address that is used for the USB NIC.

Wednesday, December 7, 2011

Backyard Ice Rink - the tarp arrives!

The tarp has finally arrived!  20'x30' and white.  I've laid it out across the rink area, screwed in the four corners, and moved it so that it lays evenly across the area.  Here's what it looks like:


Along the boards, I simply used some extra drywall screws I had to fasten the tarp eyelets to the boards so that the wind doesn't blow it away while we wait for the deep freeze.  The screws had to be put in at an angle as shown below:


And finally, I added some extra illumination - the lighting might need to be adjusted, but here's what it looks like at night:



Monday, November 21, 2011

Backyard Ice Rink - attempt one.

Okay, so this year I've decided to attempt a backyard ice rink.  My boy has started hockey and hopefully a rink this close will spur some interest.  After a quick survey of the yard, I've determined that I can land a 20' x 30' pad that is "level enough".  (Actually, it's 28' x 18', the tarp is 30' x 20', need some extra to hold in the water). Beyond that, there's just too much slope.  So, up first is the bill of materials:


  • 20' x 30' white 6mil tarp: $51.99 ($39.99, $12 shipping)
  • boards - six  2"x10"x10': $53.34
  • boards - four  2"x10"x8': $26.68
  • stakes - four 2"x4"x8: $8.92
  • four corner brackets: $11.96
  • one box of 100x3" green deck screws: $11.49
  • subtotal: $164.38, tax: $21.37, grand total: $185.75


STEP 1: string up the box
As you can see in the image below, I have marked the four corners with stakes and run twine between the posts.  This indicates where the stakes will go.


STEP 2: insert the stakes
Here I have my box of stakes.  Rather than paying the $0.99 each for 2"x2"x4' stakes, I simply bought 2"x4"x8' and cut them down to 6 stakes per.



Next, I have lined up the boards and started pounding in some stakes - two per board.  Note: when you have misplaced you sledge hammer, the backend of an axe will suffice.



STEP 3: install the boards
Yes, that's my wife's garden I'm trampling.  She wasn't too happy, but a rink for my boy trumps the garden.   The boards are now screwed into the stakes using the 3" deck screws.  I used the green screws in hopes that they won't rust.  Two screws per stake should be enough.




STEP 4: fasten the boards to each other:
Here cut a few leftover stakes in half and screwed the adjacent boards to each other.


In the corners I used metal brackets.


STEP 5: time for coffee
 This is the finished product.  Now I'm frozen, going in to get a coffee.  And wait for my tarp to arrive.  I'll lay down the tarp once the ground is near frozen so as to not damage the grass.  Once we get some sub-zero temperatures, I'll start the flooding.


Tuesday, October 14, 2008

Building tomatoND with MLPPP for the Asus WL-520gu

Here is an attempt to recount from memory how I built tomatoND with MLPPP for the Asus WL-520gu. It may work for the Buffalo WHR-G125 as well. I may have missed a thing or two....I'll update as/if I find mistakes.

# download and untar WRT54GL source
wget ftp://ftp.linksys.com/opensourcecode/wrt54gl/4.30.11/WRT54GL_v4.30.11_11_US.tgz
tar xzf source/WRT54GL_v4.30.11_11_US.tgz

# download and unpackage the tomato source yielding tomato.tar and tomatoND.tar
wget http://fixppp.org/downloads/TomatoSource_1_19.tar.bz2
tar xjf TomatoSource_1_19.tar.bz2

# download and unrar the tomato MLPPP patch
wget http://fixppp.org/downloads/tomato-mlppp-1.19-mp2_src.rar
unrar e tomato-mlppp-1.19-mp2_src.rar

# rename WRT source folder to tomato
mv WRT54GL-US_v4.30.11_11/ tomato

# Create a symlink in /opt/brcm to tomato/tools/brcm/.
ln -s $PWD/tomato/tools/bcrm /opt/bcrm

# add the cross compiler folders to your path
PATH=$PATH:/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin
export PATH

# remove files specified in tomato build README file
cd tomato/release/src/
rm -rf et et.4702 wl rts tools .model
cd router/
rm -rf busybox cron dnsmasq httpd iproute2 iptables ipupdate lib libnet libpcap mipsel-uclibc misc nas netconf ntpclient nvram others rc ses shared traceroute udhcpd upnp utils www
cd ../../..

# untar tomato source over the WRT source
tar xf tomato.tar

# untar tomatoND source over the tomato modified WRT source
tar xf tomatoND.tar

# remove .c files that have been pre-built
cd tomato/release/src/shared
rm bcmsrom.c bcmutils.c hnddma.c linux_osl.c sbutils.c sflash.c
cd ../..

# apply the MLPPP patch
patch -p1 < ../tomato-mlppp-1.19-mp2.patch

# enable MLPPP in the kernel
# set CONFIG_PPP_MULTILINK=y in both files
cd release/src/
vim linux/linux/.config
vim linux/linux/.config.old

# on my ubuntu system, make didn't like the curly bracket loops
# as a quick fix I just duplicated the sections for each loop
# (see the loops for {*.asp,*.svg} and {*.js,*.jsx}
vim router/www/Makefile

# build the source
make

# at some point the build will fail - the tomato_profile.h file
# gets an extra "-e " prepended to the file, just remove it
vim ./router/shared/tomato_profile.h

# make again
make

# your image is now in the image folder

MLPPP Tomato on the Asus WL-520gu

I picked up the Asus WL-520gu for $20 (after MIR). My hope was to run Tomato/MLPPP as is described at here: dslreports-tomato-mlppp and at fixppp.org. However, that's only for the Linksys WRT54GL and similar devices. With help from Guspaz and dsl_ricer I was able to get it all to build, connect and run with MLPPP (though I haven't verified that it's actually working properly).

Since the dd-wrt and tomato firmware for the WL-520gu also work on the Buffalo WHR-G125, this MLPPP version *should* work on the Buffalo as well, though I don't own one and haven't tried.

DISCLAIMER: this is an account of how I got MLPPP/Tomato working on my Asus WL-520gu. I am not recommending anyone try this, and if you do, I will not be held responsible if you brick your router.

Basically, what we're going to do is flash with dd-wrt, then with basic tomato (ND version), get the router up and running, then flash with the MLPPP version. I'll describe how to build the firmware in another post. I am assuming you have a DSL modem configured to allow the router to perform pppoe negotiation.

1. Follow the steps to flash the router with dd-wrt outlined here: dd-wrt on WL-520gu. Reboot and configure to make sure it works and connects to your ISP.

2. Using a similar procedure as was done in step 1., using the asus recovery tool, flash the router with TomatoND firmware version v1.19. NOTE: you must use the ND version of Tomato. The current version is v1.21, but I used v1.19 because that is what the stable version of MLPPP is based upon. It can be found on the Tomato download page (specifically, here)

3. reboot the router and configure it appropriately to your settings. The WAN side probably won't connect via pppoe via your modem. I followed the advice in this thread to get it to connect:
I found that vlan1ports nvram variable on Tomato was set to "0 5u" I changed this as follows (from telnet login to the router):
nvram set vlan1ports="0 5"
nvram commit
reboot


4. Repeat step 2 using the MLPPP version of the tomatoND firmware that I built.

Now, step 2 may be unnecessary if you want to directly flash with the MLPPP version....I didn't try that though, so I don't know if there'd be any issue.

I use a 2write 2700HG-B modem/router. Had to configure it to bridge mode....this post was super useful (though VPI for Bell is 0, not 8).

Useful links:
http://fixppp.org/
http://www.redflagdeals.com/forums/showthread.php?t=594003

http://www.dslreports.com/forum/r20484600-TomatoMLPPP-released-evade-throttle-or-bond-two-DSL-lineshttp://www.linksysinfo.org/forums/showthread.php?t=57746
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=26194
http://www.dslreports.com/faq/15835
http://www.broadbandreports.com/forum/r21066151-2wire-2700HGB-bridge-mode-simple-tutorial

Saturday, January 19, 2008

video editing in linux

I had some old camcorder videos that I wanted to digitize/transfer to DVD and distribute to family. I borrowed an ATI USB 2.0 TV wonder gadget from a friend and unfortunately was stuck with windoze to capture the streams. After capturing all the videos, I switched back to linux to start chopping up the files as appropriate. This is where it got tough.

I captured to MPEG-2 and simply wanted to split videos at specific times. With AVI files it's easy, just use avisplit which I believe is part of the transcode package. MPEG2 isn't quite as simple. I was hoping to simply load a video into a program, scroll to the split point, mark it and tell the program to split at the nearest I-frame, without re-encoding the file.

So, I soon found Cinelerra, Kino, Avidemux and Kdenlive. A quick search showed that Cinelerra and Kino are both complex, so I started with Kdenlive which was said to be super simple - and it seemed overly complicated as well to me. And it quickly became apparent that it'd want to re-encode my files. So I switched to avidemux - it was great for scrolling through files and finding the split points. However, it wanted to re-encode my files as well :(

More googling pointed me to mpgtx - a command line MPEG toolbox. Perfect. I used avidemux to locate all the split points in all the files, put them into a script file that would call mpgsplit as appropriate. I thought I had this in the bag until I started playing back the files and noticed the split points were just wrong in some files. Ugh. No idea why.

Ok, more searching leads me to GOPchop, which installs but crashes - says my MPEG-2 files have incorrect headers and I-frames. Next is GOPdit. Ok, very simple, but effective. Had to make sure the pereferences were setup. This tool is good, but could use some more effective keyboard shortcuts and editing tools. But for the most part it seemed to work.

Notable mentions include ProjectX which is supposed to be good for fixing up the MPEG-2 files that capture devices often hack up. Didn't manage to get it installed, but may still be of use when I get to 8mm projector files. Also, Lives is supposed to be another good program, but it's not in the repositories either.

Lastly, another good site I am going to mention for searching for linux equivalents of windoze programs: http://www.linuxalt.com/