Strikes Again

Byobu, Tmux & Vim

This is a little writeup on how to get a very useful terminal setup on any Debian based Linux. Example of my setup below:

Example screen setup
Example screen setup

My custom .bashrc file, give me a customized prompt (current directory and size as well as previous commands exit status). In addition to this it provides a whack of aliases to make commands simpler to type, as well as some pseudo functions. Download from pastebin HERE

Useful apt-get aliases:

install – “sudo apt-fast install”
addrepo – ‘sudo add-apt-repository’
searchIn – “apt-file search”

Useful shorthand aliases:

murder – ‘kill -9’
alert – Useful for things like “make; alert” and when complete will pop up an on screen notification.

hist – Grep through bash history, very useful.

Useful pseudo programs:

extract – Automatically appends the needed options to tar for you.

netinfo – shows network information for your system

downforme – Check to see if a site is down for everyone or just me
cp_pro – copy with progress bar
mkdir_go – make a directory and enter into it
bu – Back up a file by appending UNIXTIME.backup

Installing my custom bashrc:

  1. sudo add-apt-repository ppa:apt-fast/stable
  2. sudo apt-get update
  3. sudo apt-get install apt-fast apt-file nano lynx more less tmux byobu
  4. Open bashrc from pastebin above and save to ~/.bashrc
  5. Open a terminal and try it out!

To get the same color scheme (solarized dark256) as I use do the following:

  1. Get the color scheme for tmux HERE just copy 256 pallet to ~/.tmux.conf
  2. Vim plugins and highlighters HERE
  3. Edit ~./vimrc and add ‘set number’ and ‘set relativenumber’
  4. Solarizer ‘ls’ dircolors HERE
  5. Gnome-term solerized pallet HERE. I had to select the background to be slightly darker than the tmux status bar manually in gnome-term as I did not like the blue/green default.

RepStrap Alpha


Toshiba e-Studio 3511

So this post is quite a bit late… but im going to go ahead and pretend like it just happened.


So It was not a dark and stormy thursday afternoon when I decided to go onto Kijiji and check out whats free for the week. In case your wondering if you goto a catagorie then click on the “For Sale” subcatagorie you can then filter the entire site by a price of $0 to locate everything free. It just so happens that paid off for me as I saw an add for a Toshiba e-Studio 3511 color coppier that was NFG and free if you can pick it up. I seriously didn’t believe this at first as I figured why would a company give away a busted copier? Don’t they usually lease or have some sort of product upgrade plan? So I dropped them an email.

Enter Friday, I awoke to find an email from them saying they just want the copier gone as its in everybodies way and if I came that day they would even help me get it into my truck! So like any good citizen I came to the rescue and we managed to wrestle the 450lb beast into the box.


The only way I could get it to fit into the 1/4 tons box is jammed on an angle. Luckily it was NFG already as we dropped it a few times. I drove home and sat on the sidewalk for about an hour thinking about the best way to approach this beast as I had conviently left all of my tools as work and only had a $12 Home Depot discount screwdriver kit. Upon realizing that their was no good way to go start trearing apart a photocoper I grabbed a screwdriver and attacked the paper handler.


Before I realized it the sun started setting and my neck had a horrible sunburn but I was stoked on all the goddies I had pulled from just the paper handler! Im talking rack and pinion gears, solonoids, NEMA34 stepper motors WITH drivers! And that was just the begenning. I also found a crazy stapler that ran on a question mark shaped track so it would staple up the spine or on the edges of pages and it holds a 3000 staple cartridge that was half full. I took all of the rolly bits off and am going to put a simple ATTiny controller on it with a push button so I have a hardcore desk stapler. Then I discovered a power hole punch that does a fantastic job of making confetti. I decided it was less usefull than the stapler but as we do not have a 3-hole punch I tunred it into a manual one and put it in my stationary drawer. Their where also a few PCB’s with a bunch of little gull wing SOIC H-Bridge chips that looked handy so I took everything including the connectors and put them in my parts bin.


At the end of the day all that was left was a box of parts and an interestingly shapped rack on wheels. A rack that just so happens to be 19.5in across which is what the standard data rack is. I am quite undecided what to do with this but I have an idea of putting my benchtop power supplies, osciliscope, function generator and an old laptop on it as a handy moveable test center.


* End Of Day One *


Saturday.. Day two of the tear down and I awoke with determination to score some goddies from the behemoth. The outside plasic bits provided no challange at all and the odd one that did got the pry bar and before I knew it I had found an interesting selection of printed circuit boards. Now their was quite a few of them and that looks alot like a DIMM memory module there… Turns out that this machine runs a version of winCE and runs on a VERY propritary thin client. It has 128mb RAM and 32mb of more RAM in a second slot?? Their appears to be two identical cpu’s under a custom Toshiba unmarked package so I’m not sure whats going on there. On top of the motherboard is an ethernet card on what I assume is a PCI bus as the realtek controller is PCI interface. Above the mobo is a fun dual fax modem complete with neon light current limiter on the phone line lol. The east board is a collection of motor drivers and what I later found out to be the controller logic for the laser unit. 


We took a break for some watermellons and my wife came out to help as I had been at it for several hours and had bearly scratched the surface of the thing. I had succesfully removed the majority of guts from the back of the unit and had scored a massive NEMA34 motor that turned the laser drum and a flywheel made out of 6 layers of laminated steel. I also scored some hinges that will be in a latter post if they work for what I have in mind. I decided to remove the scanner unit next, this tunred out to be interesting as it was obviously assembled piece by piece on top of the copier and not as a seperate unit as I had imagined. I had to bend a few bits to remove the jelly feet it was on but I managed to get the entire scanner out in one piece. It uses an old but probably better method of scanning as it has a “reverse projector” setup with a cold cathode tube to light the document. Most desktop scanners use an led and a long strip of photo diodes that the scanner pulls past the document to read it in. This guy uses optics to reflect the document to a stationary photo diode array. I may write a post in just the scanner as its quite interesting.


After the scanner was removed I took off the LCD panel as its quite large and would make a good interface for something im sure. I will do a writeup on it as I learn exactly what the heck is inside it. After all of this it was getting quite late again so I stopped taking pictures and focused on just getting the thing takken appart before the city bylaw officer drove by again and decided to ask question. Not much of interest came out of the main body of the copier. The entire paper drawers had nothing unefull in them beside a gear train to remove paper and it was all plastic so I tossed it away. The main guts of the machine was a metric ton of rods with things attached to them. I got thin rods, thick rods, a giant green rod, ones that are squishy, ones that are magnetic and ones that where sharp and made me bleed. The main laser unit was kind of a letdown actually. It took almost two hours to get to it and it consisted of a square mirror and three lenses to spread the laser beam onto the toner rolls and a 90deg laser collimator. While the lenses are useless the 90deg collimator may come in really handy down the road so I will look into that later.



About a week later and I had finished stripping down the multitude of components and sorted them into relevent bins. This was a fantastic score I must say, I got so much stuff I will not need to buy or make mechanical parts or gears for the forseable future! In total I got:

05 – Brushless DC motors with controllers

06 – NEMA12 Stepper Motors (I assume NEMA12, they are quite small)

10 – NEMA17 Stepper Motors

03 – NEMA23 Stepper Motors (Two with seperate controllers)

03 – NEMA34 Stepper Motors (Two with seperate controllers and one HUGE motor)

18 – Solinoids of random sizes

32 – Rods of random sizes, some with removable bits on them. (One is a huge green roller and ones even magnetic)

03 – Power supplies that provide a wacky range of voltages 

13 – PCB that handle the IO and motor functions. Many gull wing H-Bridge packages

02 – HEAVY duty hinges

01 – Massive flywheel

01 – Power stapler

01 – Power hole punch

01 – Funky 90deg gear train

01 – Linear motion stage, quite thin but could be handy in a light project

01 – 90deg laser collimation assembly (To be written about at a later date)

And more that I have forgotten about…


Hacking A Linksys WMCE54AG

So I was parusing kijiji looking for free printers to steal parts from when I happened upon an add for a Linksys Media Center Extender (WMCE54AG). This device was originally created to route audio and video from your XP Media Center to your TV so that you did not need a computer in your living room. I remember when these first came out I saw them at from a chunk of change. Well I scored this one in working condition minus the remote for $10 !!!


As with most project I was to into it and forgot pictures of the unit before it was stripped. Here are some I stole from the internets:


(The picture with the chips circled is a handy reference from here  )

Main processor under the heatsink is a ATI Xilleon 225

ATI Xilleon 225

1- Ethernet Controler, PCI interface
AT93C46 Serial EEPROM from MAC storage

2- Mini-PCI A/G WiFi card

3- 128Mb SDRAM for the BlackFin DSP

4- 600MHz BlackFin DSP ($28 for one of these babbies in TQFP)
559595.1 0.3

5- 128Mb (8M x 16) GDDR SDRAM 

6- 16M x 8 bit NAND flash memory

7- 2ch 1% regulation LDO
LT 0433

8- 4Mb Flash

9- 8-bit AVR, maybe IR controler?


Another fun chip is on the back of the front controls. Its a 16bit I2C port expander from NXP It runs the front controls and the tri color LED ring on the navigational pad. I had some fun with blinking lights before continuing.



So I set out looking at the board and discovered some things. Their is a MFG/WDT jumper on the board, no idea what the WDT jumper does but I presume its something to do with the watchdog timer. Maybe during chip flashing they need to halt the Xillions WDT so it wont interfear. In the one corner I found a “Debug Port” with an IC not in place. Their where only two wires so I immediatly thought serial port and was right. I soldered in a header after carefully drilling the via’s out to accept a standard sized headder. The copper jumpers across the pins there is because I do not need to use the level shifting IC that they would have put on. My BusPirate runs at 3V3/5V0 so I just bridged the pins and hooked her up.



115200bps, 8N1 seemed like a good place to start and out poped the boot sequence! Initialy it loads the “bios” or “IPL” that inits the hardware and discovers boot devices which are the Flash and NAND Flash then asks for a command. Without interfearence it will boot the WindowsCE kernel and start up a bunch of tasks like re-mapping the address space to a virtual one then unloads the debug shell. I somewhat remember from my WinCE v5 licence days that the IDE had some shell debugging apps that would hook the kernel to keep the debug ports open but I will need to dig up my CD’s before I can be sure. For now I will just poke around.


So far I have leared this; The MFG jumper puts the unit into infinate self check and typing “y” at the ++CMD prompt will dump you to a PROM console those who have ran SGI/SUN machines may remember. Below are some test files with the output of a few boots.


Keil’s ARM-MDK (Realview) compiler on linux

This little book with help familiarize anyone who cares to know how to use Keil’s Realview compiler tools on linux.

At first though this may seem very pointless as CodeSourcery Lite is capable of everything Realview is, however if you have very large projects or a lot of time invested in an project then it only makes since to stick with what the project started with. I am currently reviewing all the available integrated development environments that linux has to offer (theirs a LOT) and will tack on a chapter five on how to use the Realview tools with a new IDE. So far CodeLite is showing quite a bit of promise however their are some linking issues I must deal with either via pushing a change to the projects svn or a makefile hack. I have not decided which method to use just yet.

For anyone that is interested I will be migrating my toolchain over to GNU for all my newer projects. Windows stabbed me in the back one to many times so I rolled it in a carpet and tossed it in the Neva river.

So around full circle if I wish to use CodeSourcery then why not take a look at Rowley CrossWorks again as they use CodeSorcery as the underlying toolchain.



Download the project files here:



Create a free website or blog at

Up ↑