Archive for the ‘Inside’ Category

tmux for bubba2

September 17, 2011

There are various replacements for the traditional screen command in Linux, Byobu and tmux being two good ones. Byobu is good, but after trying tmux on various Linux machines I really wanted it also on the bubba2.

As tmux doesn’t seems to be in the bubba2 or etch repositories, the next option is to build it from source. Below follow some ideas for doing this.

Note: you may need to install/upgrade gcc and other tools to complete the steps below, if you have a standard, out-of-the-box bubba2 system.

  1. Switch to su and create a directory for source & resulting binaries
    su
    mkdir ~/project
    cd ~/project
  2. Compile proper libevent version
    tmux needs a more recent version of libevent than installed as part of bubba2 standard setup. First remove current libevent, then compile the new one:
    apt-get remove libevent1
    mkdir ~/project/libevent
    cd ~/project/libevent
    wget http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz
    gunzip libevent-1.4.14b-stable.tar.gz
    tar xvf libevent-1.4.14b-stable.tar
    cd libevent-1.4.14b-stable
    ./configure
    make
    make install
  3. Register the new libevent
    Edit /etc/ld.so.conf.d/powerpc-linux-gnu.conf, e.g. by “vim /etc/ld.so.conf.d/powerpc-linux-gnu.conf”, add the line “/usr/local/lib/” (no quotes) at the end.
  4. Reload the new libevent
    Simply run “ldconfig”.
  5. Compile and install tmux
    mkdir ~/project/tmux
    cd ~/project/tmux
    wget http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.5/tmux-1.5.tar.gz
    gunzip http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.5/tmux-1.5.tar.gz
    tar xvf http://downloads.sourceforge.net/project/tmux/tmux/tmux-1.5/tmux-1.5.tar
    cd tmux-1.5
    ./configure
    make
    make install
  6. Configure tmux and start using it
    First, exit from superuser mode by typing “exit”. Then, you probably want to customize tmux, try googling “tmux config file” or similar for samples. I currently use the following:# Make it use C-a, similar to screen..
    unbind C-b
    unbind l
    set -g prefix C-a
    bind-key C-a last-window
    # key bindings for splitting
    unbind %
    bind | split-window -h
    bind h split-window -h
    unbind ‘”‘
    bind – split-window -v
    bind v split-window -v# Reload key
    bind r source-file ~/.tmux.conf#set -g default-terminal “screen-256color”
    set -g default-terminal “xterm”
    set -g history-limit 4096
    # Terminal emulator window title
    set -g set-titles on
    set -g set-titles-string ‘#S:#I.#P #W’# THEME
    set -g status-bg black
    set -g status-fg white
    set -g status-interval 60
    set -g status-left-length 30
    set -g status-left ‘#[fg=green](#S) #(whoami)@#H#[default]’
    # set -g status-right ‘#[fg=yellow]#(cut -d ” ” -f 1-3 /proc/loadavg)#[default] #[fg=blue]%H:%M#[default]’
    set -g status-right-length 75
    set -g status-right ‘#[fg=red]Up #(uptime | cut -f 4-5 -d ” ” | cut -f 1 -d “,”) #[fg=black]#[fg=yellow]#(cut -d ” ” -f 1-4 /proc/loadavg) #[fg=cyan,bold]%Y-%m-%d %H:%M:%
    S#[default]’
  7. Start using tmux
    “tmux” starts tmux. Now you can create new windows/panes, and kill the sessions whenever you want. When you reconnect to the bubba2 over ssh, just type tmux attach and you can continue where you left off.
Advertisements

Dell’s WinXP installer messes up OSX partitions when using Boot Camp

October 7, 2010

A few days ago I decided to install WinXP on my Intel based iMac, using Boot Camp.

Boot Camp assistant worked great, it created a new Boot Camp partition on the hard drive just as planned with a 32 GB partition. Popping in a Dell WinXP SP2 CD (from a now long gone computer) as instructed, but when prompted to select where to install XP the Boot Camp partition was gone. In fact, so was the OSX partition…
The weird thing was that the XP installer suggested I should install it to a 131 GByte partition on the disk – where did it get that from?

Luckily I have a nightly Carbon Copy Cloner job scheduled for the iMac, so restoring the OSX disk was pretty straightforward (even though it took some 5-6 hours to restore 500 GB of data).

Tried the same procedure twice more. Once with the same result, and once I the OSX partition was actually intact. But XP still suggested I’d install it to the non-existing 131 GB partition.

Fourth time I tried another XP disc, and this time also slipstreamed it with SP3 using nLite (awesome product!). And now it worked flawlessly.

After doing some research it seems that some people are having trouble using Dell XP CDs with Boot Camp. Not sure why, but using that other, generic XP CD made the problem disappear. Or if it was the SP3 slipstreaming – either way it now works. I guess you could argue that the Dell CD was intended to be used with Dell machines only, and in this case that  turns out to be true.. Anyway, with the problems sorted out, dual booting works great!

Dell XPS M1330 – end of story

April 14, 2010

Long overdue, here is the final chapter in the warranty story going on with Dell.

They indeed repaired the laptop – at least in part. The graphics now works as it should, but the computer is still unstable and hangs way too often to be useful, even with fresh installations of Vista. Loosing work because the computer hangs at random times (several times per hour) just isn’t an option… No idea what’s causing it – feels like it may be poor thermal design/overheating. But that’s just a guess.

Nice of Dell to repair the broken GPU, but too bad they didn’t make the laptop usable again.

Dell XPS M1330 NVIDIA troubles… progress!

February 24, 2010

Turns out Dell’s tech support wasn’t the way to go.
After being told the laptop was 2 months out of warranty I had a chat with the sales guy who sold us the laptop two years ago. Friday last week he promised to look into the case and get back by Tuesday this week latest. That he did, with the good news that Dell would repair the laptop without cost to me.

Now that’s good support! Let’s just hope that is the end of the story.

Dell XPS M1330 – Nvidia GPU failing

February 16, 2010

Been using a Dell XPS M1330 at work from December 2007 until last fall (October 2009). It  worked well until it in September 2009 started to act suspiciously, crashing from time to time. Problems escalating and in October it died. The symptoms were thin verticals colored lines that successively grew more intensive until the screen was all white.

Called Dell support who said “sorry – you had a one-year warranty – it expired in December 2008”. Frustrated with a month of crashing Vista I upgraded to a MacBook Pro (great machine btw).  The Dell laptop found a resting place in a drawer.

I’ve kept the laptop in good order, not banged it around too much, always upgraded with latest BIOS and Vista updates etc.

You would think that’s the end of the story… Not so.

A few days ago I stumbled upon a forum post where people were upset about Dell’s poor attitude towards users having problems with their GPUs in certain Dell laptop models. Turns out their problems were the same as I experienced on my M1330 (which has a 128 MB NVIDIA GeForce 8400M GS). Also seems Dell has been aware of the problems for quite some time, but not issued a recall or even a warning to customers who had bought the affected models.

A quick google search reveals the problem seems to be quite well known, there are also videos online showing what the problem looks like.

Btw, a way of testing whether it’s the GPU or display that’s causing the problem is to hold down the “D” key while pressing the power button. The display should now cycle between various solid colors (red, green, blue etc) before continuing to boot in graphical mode (which will fail if the GPU is broken). But if you see the solid colors ok, your display is fine.

So is this an isolated problem for Dell only? Of course not:

Dell has acknowledged there are issues with the Nvidia GPU and offer a 12 month extended warranty to cover for those affected.

HP is also affected, a very long thread in their forum shows HP users are also upset. It seems they have informed their customers though, at least according to CNet and Engadget.

Same thing for Sony, their take is to offer a good and relevant extended warranty: “Sony is offering to repair yours for free within four years of the purchase date, irrespective of warranty status. 

Apple finally is not immune either, but they also offer a good extended warranty: “If the NVIDIA graphics processor in your MacBook Pro has failed, or fails within three years of the original date of purchase, a repair will be done free of charge, even if your MacBook Pro is out of warranty.”

Here is where I am starting to get really upset.

I was told by Dell support in October that the laptop was out of warranty and they wouldn’t repair it. They told me nothing of extended warranty to cover for defective GPUs.

Six months later (=now) I find out that I was in fact eligible for the extended warranty back in Octobert, but now Dell tells me it’s too late – “You are two months past the warranty period”.

Let’s see where this goes – I’ll be pushing to get the GPU fixed. Will be interesting to see what Dell’s position on this is, I’ll post updates here – whether it’s good news or bad.

Wiring the house, part 3: Planning the 1-wire sensor network

September 2, 2009

When ordering the needed hardware new possibilities came to mind, as they so often do when you are browsing catalogs of companies selling cool gadgets…

The first version of the 1-wire network will look something like this, possibly with some of the sensors furthest away from the server installed at a later time. Some of these sensors are after all pretty expensive (just the humidity sensor, HIH-4000-001, got it from Digikey, that is attached to the DS2438 AD converter cost around €20). Getting the all the cables in place have also turned out to be a bit tricky, the tubing in the walls back in –65 just weren’t made with cat-6 networks, phone lines and 1-wire networks in mind…

SP53 1-wire network

The Linux server will run either temploggerd and owfs (if I can get it to work on the small Bubba Linux server that I am using, so far it compiles ok but doesn’t seem to respond properly to the sensors), or thermd.

I verified thermd runs (it does work as expected but it takes 15-20 seconds or so to update the graphs) on the Bubba server as long as you install the perl runtimes and quite a few Perl packages, but as owfs offers a better client-server approach it would be the preferred solution.

Wiring the house, part 2: Buying 1-wire sensors and accessories

August 25, 2009

So, having moved from a flat to a house a couple of months back it was time to do some actual work on a home monitoring system.

First task: to find a good source for the needed 1-wire sensors and other electronics and hardware.
Some digging around, comparing a lot of prices resulted in the matrix below.
I then ended up buying my 1-wire products and components from Homechip and Hobby-boards, with some additional components from Electrokit.

Please note that prices and other aspects of the stores are expected to change, the data below represent a snapshot as of August 2009. They should in any case provide some starting points for your own 1-wire online shopping adventures.

Vendor Country Comment
Homechip UK Good prices and fast, affordable delivery across Europe, they don’t have quite the selection of 1-wire products as for example Hobby-Boards or DigiKey (who are outstanding when it comes to components).
But with Homechip offering the core component I needed while also being European the first batch of 1-wire sensors were bought from them. Might try other providers later.A good thing about Homechip is that they carry the
T-sense (made by IButtonLink) at an affordable price. VERY convenient temperature sensor! Ok, a bit more expensive than buying the components, but oh so convenient..
Low shipping costs also to rest of Europe outside of UK.
Hobby-Boards US Nice store with some assembled and ready-to-go 1-wire sensor modules, such as the 8 channel relay board or the nice little DS2423-based dual counter(Note: Homechip carries a similar counter).A GREAT thing about Hobby-Boards is that they offer both schematics and PCB layout for free on their web! This gives some very good inspiration for those of us who like to build things from scratch but have spent the last fifteen years doing other things than designing electronic circuits.Reasonable prices but longer/more expensive shipping if you are in Europe. 
Embedded Data Systems US This company among other things makes the HA7Net, which is an Ethernet equipped 1-wire master controller with some real intelligence in it. It contains a web server, upgradable firmware, various tools for reading/writing/maintaining a 1-wire network. The HA7Net also has three 1-wire ports, making it dead simple to create a star-formed 1-wire network.The HA7Net acts as the 1-wire centre point in my network, it is then read by various other software on the internal TCP/IP network.
Temperatur.nu Sweden temperatur.nu contains both temperatures across Sweden updated by people’s personal computer connected weather stations, as well as an online shop and a good forum for Swedes interested in home and weather monitoring systems. Quite a few good 1-wire related threads in the forums.The store has a fair number of components as well as pre-assembled sensor modules. Prices are a bit high compared to for example Homechip but if you are in Sweden and need fast delivery it may be worth it.
The store also has various home automation products, such as radio controlled 220V switches.
IbuttonLink US Makers of some good 1-wire products, such as the LinkUSB 1-wire interface, which can be used instead of the standard DS9490R from Maxim. They also make the very convenient T-Sense temperature sensor, but as this is available from HomeChip at the same or even better price (given the current USD to EUR exchange rate), I’ve got my T-Sensors from Homechip.
1.wire shop Germany Expensive German online store
Fuchs Shop Germany Expensive German online store
SparkFun US GREAT company with a fantastic amount of cool gadgets and electronics kits in the store, usually with very affordable prices. If you like fiddling around with electronics and microcontrollers you’ll love SparkFun. SparkFun offer free schematics for many of their kits, they also have good tutorials and forums. Great site!
Digikey US
Intl
Giant retailer of electronics components. More than 1900 employees, more than 450.000 products in stock. If you need an electronics component, Digikey is likely to have it, and at a good price. Based in US means longer delivery and higher shipping costs though.
Edit: Turns out Digikey has a great international service as well! For their Swedish customers they even offer free shipping on orders of more than €65, which is pretty easy to reach when looking through their catalog…
Electrokit Sweden Probably Sweden’s best online store for electronics components and Arduino microcontrollers. Good prices, very affordable shipping costs.
Lawicel-shop Sweden Sells various embedded systems products, including Arduino boards. Seem to be more expensive than Electrokit.
Maplin UK Sells all sorts of electronics and components. Might be worth considering for UK people.
Energibutiken Sweden Online store with a small but fairly good selection of products relating to energy monitoring. They among other things have an interesting data logger for those who don’t want to be bothered by running a server for their 1-wire projects.

Syncing Firefox sessions across computer and platforms

August 21, 2009

I regularly use 3-4 different computers, from time to time also guest operating systems running in virtual machines. For years I have been thinking it would be great if you could bring your current Firefox status with you to a different computer, for example between a Mac and PC.

After recently actually looking into this topic I found the new Mozilla Weave Firefox extension. It is in beta and have some bugs, but is very promising even in its current state. However, it doesn’t sync sessions.

I recently also started using the nice Dropbox service for file syncing. Dropbox has both Windows and Mac clients and works fully transparently: any file you put in the dedicated Dropbox folder on your local computer is automatically synced to the Dropbox service and from there propagated out to your other computers where you have Dropbox installed and running. As you get 2 GB of free storage that is more than plenty for storing session information.

Only thing missing now is to find where Firefox’ sessions files are stored. As I am using the excellent Session Manager Firefox extension, a quick look in the Advanced tab of its options dialog revealed that you can indeed specify where Session Manager’s session files should be stored. Change this to your local Dropbox folder and you are set! As soon as you save a session in Session Manager it will be almost instantly available on your other computers. To use them on these other computers you use the “Load session…” command in Session Manager’s menu, which in turn is found in Firefox’ Tools menu.

Have been using this setup for some weeks now, works flawlessly.

Wiring the house

August 18, 2009

Moving to a house from an apartment made me realize you have new things to consider.

– How much money is spent on heating?

– We have a 45-year old, huge waterboiler in the basement, how much does it cost to keep it running? Would we save money by replacing it with a modern one?

– It is said that return-on-investment on air-air heatpumps is quite short, around 18 months is often mentioned. But before installing such a pump to reduce the need for electrical heating it would be great to have a system in place measuring how much electricity is used for electrical heating before and after the pump is installed, and how much energy the pump itself uses.

– How do you measure the above, collect the data and present it in a good way?

– After installing radio controlled switches across the house, how do you control them in a good way? The included remote works ok, but a computer interface is really what is needed to create more advanced lightning setups.

In the coming posts I’ll sum up the experiences made in planning, building, configuring and running the above services. Having searched the net for information and experiences from others I have found some, but not a whole lot. Hopefully my findings will help others with similar plans and ideas.

iPhone/iPod Touch 1.1.2 hacked – before it is released. Or is it..?

November 9, 2007

The title says it all. Before Apple has even started shipping the updated 1.1.2 firmware, it seems some people have been able to unlock (=Jailbreak) it. Kudos to these people, but I just can’t help wondering how long Apple will be able to keep this game running. Eventually they must (??) understand that keeping the platform too locked down is generating significant badwill. And with something like 25% of all iPhones being unlocked, why not just accept the fact that people want to install their own apps?

True, there is an SDK coming that will allow for third party, native apps.
The answer probably lies in the fact that Apple gets a piece of the revenue generated by AT&T and other carriers offering the iPhone. Recent numbers indicate that Apple gets USD 18/month from AT&T for each iPhone user in the US!! With 1+ million iPhones sold in US alone (probably 1.25 by now?), and 200k estimated before end of year in UK, this is big money for Apple. Even if they wanted to open up the platform for third party apps, the operators wouldn’t like that and Apple would loose some significant, low-risk revenue.

Finally: The image showing an unlocked 1.1.2 also shows 14 GB memory – but the iPhone comes in a maximum of 8 GB, to my knowledge. So this may very well be a Photoshop job. Still, it is probably just a matter of days before the real 1.1.2 firmware is hacked.

[Edit: Now that was a very late night post done by a brain which had already called it a day…. as some people correctly pointed out, the image clearly says it is an iPod Touch. Which comes in 16GB version. My mistake – me bad]