Install Gargyole on a fonera (fon2100)

fon 2100
The La Fonera is a wireless router that runs a light version of Openwrt, and to make the most of it i am going to install Gargoyle firmware.

First off, do NOT connect the device to internet, since it will try to update its firmware and you can only hack version up to 0.7.1 r1.

Give it some juice by hooking up it to the 5v power adapter, and connect to the “MyPlace” network, the key is the serial on the bottom sticker of the device.

If you dont find a MyPlace or it wont accept your key, you need to reset it to the original firmware by holding the reset button on the bottom 15-20 secs (not longer)

Open http://192.168.10.1/ and check your version, it needs to be 0.7.1 r1 or below, if not; you would need to downgrade it.

Click the advanced link and login with admin / admin.

Download (right click and save as) sshenable.html to your computer, open it and press submit.

open a terminal (spotlight: terminal) and ssh to the device.

ssh -l root 192.168.10.1

password is admin.

rename sshd so it starts at boot.
mv /etc/init.d/dropbear /etc/init.d/S50dropbear

Download out.hex and openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma to a folder (fonera).
Start another terminal and change directory to the folder
cd fonera

transfer out.hex and openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma files to the /tmp on the device.

scp openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma root@192.168.10.1:/tmp
scp out.hex root@192.168.10.1:/tmp

Now we patch the kernel


mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7

…and reboot

reboot

Once available, reconnect to MyPlace.

ssh in again:

ssh -l root 192.168.10.1

…and patch redboot conf.

mtd -e "RedBoot config" write out.hex "RedBoot config"

…and reboot!

reboot

Download fonflash from http://www.gargoyle-router.com/download.php and the gargoyle version you would like to use, i have 1.3 and uptime of (may 12 2011) 37 days without a issue.
Unplug the power and make sure you have the ethernet cable hooked up.
Set firmware type to gargyole, and select both your downloaded Gargyole .squashfs and .lzma files.

Hit start in fonflash and wait a few seconds and then power up your fon router by plugging it in.
It will now flash your fon to gargyole and can take up to 30 mins, fonflash will tell you when it’s done.

Please leave a comment if you don’t get it to work!

The sagan series

This is the original video made by damewse
Part 1

Part 2

Installing rtorrent with xmlrpc-c

To run rtorrent with wtorrent you need xmlrpc support, this is a quick guide to installing this in ubuntu (10.10)

First install dependencies.
sudo apt-get install libncurses5-dev libsigc++-2.0-dev libcurl4-openssl-dev build-essential libxmlrpc-c3-dev

Next up: rtorrent libs.
wget http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz
sudo tar xvf libtorrent-0.12.6.tar.gz
cd libtorrent-0.12.6

sudo ./configure
sudo make
sudo make install

..and rtorrent itself.

wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz
sudo tar xvf rtorrent-0.8.6.tar.gz
cd rtorrent-0.8.6

sudo ./configure --with-xmlrpc-c
sudo make
sudo make install

To be continued…

How to install asrock 330HT remote

Quick howto on installing 330HT remote in Ubuntu 10.10

Open an terminal

First we’ll need lirc:

sudo apt-get install lirc

Select “None” for both “remote control configuration” and “IR transmitter”

And then install lirc-modules-source:

sudo apt-get install lirc-modules-source

Now for Nuvoton 677 .deb’s

wget "http://europe.asrock.com/downloadsite/drivers/Nettop/Ubuntu/IR(10.10)2.6.35-22.zip"

Unzip this:

unzip IR\(10.10\)2.6.35-22.zip

Install the deb inside the unzipped catalog:

sudo dpkg -i lirc-nct677x-1.1.0-ubuntu10.10-kernel2.6.35.deb

Choose “Nuvoton Transceivers/Remotes” and “None” in the IR transmitter dialog.

To try if this installed correctly, you can run irw and press buttons:

irw

You should see something like this


user@compy:~$ irw
000000037ff07bdd 00 OK mceusb
000000037ff07bdd 01 OK mceusb
000000037ff07bdd 02 OK mceusb
000000037ff07bf3 00 Power mceusb
000000037ff07bf3 01 Power mceusb
000000037ff07bf3 02 Power mceusb

The remote should now be ready to be used with e.g. XBMC

Shout off in the comments if something is unclear!

EDIT: Does this work with Ubuntu 11.04? Please comment or email me!

Showaddr – tool to add shows to rssdler

Howdy!
Made a set of php scripts to ease the use of adding of shows from an rss feed to get downloaded with rtorrent.

What now?
Let me explain.

Lets say we have an rss feed, for example, with different podcasts.
We want to download all new episods of a selected few of shows in said feed, and of course we want to do this in the background, automatic and with minimal tinkering ;)

My set up
An htpc with XBMC, rtorrent and rssdler:

Rssdler downloads torrent files from the rss feed and stores them in a watch folder.
Rtorrent monitor the watch folder for new torrent files.
Rtorrent downloads the torrent to a download dir, seeds it to ratio 1.1 and then removes the torrent.

XBMC scrapes the download dir for new files, adds it to its database and scrape info/pictues/etc making it ready to be watched.

So what we need is one place to store the watch dirs, and one place where the download is eventually stored.
This is a pain in the ass to add manually, you need to mkdir twince, add set of rules to rssdler config, and then add what folders to watch in the rtorrent config.

So you made a script eh?
Let me start off by saying that i can’t really code, so this script is REALLY crude, but it works unexpectedly good!
You need a working rtorrent and rssdler install, there are plenty of install howtos around, so i wont go into that here.

But sir! Can’t i have your configs?
Sure, here is my basic rssdler config

[global]
# download files to this directory. Defaults to the working directory.
downloadDir = /home/user/.rssdler/torrentfiles
workingDir = /home/user/.rssdler
minSize = 0
# maxSize = None

# write messages to a log file. 0 is off, 1 is just error messages,
# 3 tells you when yo download something, 5 is very, very wordy. (default = 0)
log = 5
logFile = downloads.log
# like log, only prints to the screen (errors to stderr, other to stdout)
# default 3
verbose = 3
# how long to wait between checking feeds (in minutes). Default 15.
scanMins = 8
# how long to wait between http requests (in seconds). Default 0
sleepTime = 0
# to exit after scanning all the feeds, or to keep looping. Default False.
runOnce = False
urllib = False
The script will add the filters to this file at the bottom.

Here is my .rtorrent.rc

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 10
max_peers = 40
# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 50
# Maximum number of simultanious uploads per torrent.
max_uploads = 5
# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 8000
upload_rate = 800
# Default directory to save the downloaded torrents.
directory = /home/user/torrents/downloads
# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = /home/user/torrents/sessions

# Watch dirs!
# Enter watch dirs here, you need to change the id
#NOTE, remove linebreaks, each show must on the same line
schedule = watch_directory_1,10,10,"load_start=/home/user/watch/show1/*.torrent,d.set_custom1=/home/user/data/show1/"
schedule = watch_directory_2,10,10,"load_start=/home/user/watch/show2/*.torrent,d.set_custom1=/home/user/data/show2/"
# ^ this is the id
#
# Add lines below

# On completion, move the torrent to the directory from custom1.
# This aswell, one line.
system.method.set_key =event.download.finished,move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="

# Enable the default ratio group.
ratio.enable=

# Change the limits, the defaults should be sufficient.
ratio.min.set=50
ratio.max.set=110
ratio.upload.set=20M

# Changing the command triggered when the ratio is reached.
system.method.set = group.seeding.ratio.command, d.close=, d.erase=

# Close torrents when diskspace is low.
schedule = low_diskspace,5,60,close_low_diskspace=500M

# Stop torrents when reaching upload ratio in percent,
# when also reaching total upload in bytes, or when
# reaching final upload ratio in percent.
schedule = ratio,60,60,"stop_on_ratio=110,200M,120"

#bind = 127.0.0.1

# Port range to use for listening.
port_range = 6890-6999

# Start opening ports at a random position within the port range.
port_random = yes

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
#check_hash = no

# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
#encryption = require_RC4
encryption = allow_incoming,try_outgoing,enable_retry

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = disable

# UDP port to use for DHT.
#
#dht_port = 6881

# Enable peer exchange (for torrents not marked private)
#
# peer_exchange = yes

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10

You will need to change some paths and settings in those two files

Alright! Wheres the script!
The archive should be unpacked on an httpd server with php, preferably protected with an .htaccess file to prevent outside use.
The files you need to edit are done.php, editrssdler.php and editrtorrentrc.php

Since you are going to get the rssfile one time for each filter, i recommend that you add a crontab (wget the rss every 10 min or so) for the rss, and store it on your own httpd!

Showaddr-0.1.tar.gz

Don’t hesitate to leave an reply if you need help or if something is unclear!

EDIT: You also need to restart rtorrent to make the changes to rtorrent work, sorry about this.
I will release a new version when i solved it properly

Alkoholscreening

Alkoholscreening

Reverse dir listing

Tried to make a log of the latest 20 dirs in a folder, and had some trouble with reversing the output, i wanted the newest dir at the top, the answer made me laugh.

Tac is like cat, but reversed.

For those interested: ls -tr /home/user | tail -n 20 | tac > latestdirs.log

Sprawlanta

Interesting video about suburban sprawl in USA.


DIY Nike+ sensor pouch


pouch

Made a pouch to hold my girlfriend’s Nike+ sensor and took upon me to make a video about how to make one.



TL;DW Two strips of velcro, one folded to make a pouch for the sensor, and then attached to the shoelaces.
This is my first shot at editing, sorry for the quality.

Canon competition

Canon usa launched an video competition earlier this year, where the contestants  are instructed to follow a Vincent Laforet’s short called “The Cabbie”.

Each winning entry serves as the starting point of the next chapter, and right now there are 7 chapters ready.

The Cabbie from Vincent Laforet on Vimeo.

Chapter 2: Job Security from Runner Runner on Vimeo.

Chapter 3: The Beach from M. Keegan Uhl on Vimeo.

Chapter 4: Allison from Jeff Turick on Vimeo.

Chapter 5: Miracle from Ryan Booth on Vimeo.

Chapter Six: Fool Circle from Marc Jonathan de Jesus on Vimeo.

Chapter 7: Exit Interview from Tony Leech on Vimeo.