Geeky watches

no comments

Douglas Adams had something against digital watches, always criticizing the ape descendants for thinking they were neat. Well, I have to admit I rather like them. As a 8-year old, I spent the better part of a year saving up for my first Casio. However, at some point in the 90s, they seem to have goon out of fashion. Which is a shame, because there are some really nice geeky looking watches around now.

Take these from Sparkfun, for example: The “Solder : Time Watch Kit” to the left is, as the name suggests, a solder kit you put together yourself, to create a fun looking digital watch. Complete with resistors and ICs on display, which is a PIC microcontroller. To the left is the Arudino (ATMega328) based Sparkfun version; “BigTime Watch Kit“. Again you have to solder yourselves, but it is intended as a beginner’s kit, so everything are nice big through-hole components, which there are only a few of.

However, if DIY watches isn’t your cup of tea, you can always go for ThinkGeek’s selection. Here there is a lot of good looking geekery to choose from, including a DIP-switch controlled watch, a binary watch, or if you want to go simple maybe a sundial ring (possibly for the next steam punk gathering).

Internet blackout

no comments

Today many sites across the Internet mark their opposition against the proposed US legislation Stop Online Piracy Act (SOPA) and the Protect-IP Act (PIPA). Jason Hooper has made a collection of screenshots of the black front pages.

Hopefully, this will never become a reality. However, for some sites it already is. In Holland, Pirate Bay is already on the blocking list, as is the case in Belgium. And a number of domains were already seized by the Department of Homeland Security last year.

The days of the free and uncontrolled Internet is long gone, and in some countries, it never even existed. The next questions are how much freedom there will be left on the WWW as we know it today, and how much will have to be taken under ground, using darknets or similar systems.

Android: Unpacking boot.img

no comments

After successfully building the Android OS, and flashing to the Galaxy Nexus, I’ve started investigating how it all hangs together. Starting with the boot.img, and unpacking the parts; header, kernel, and ramdisk. The structure is explained in detail on the Wiki android-dls.com, but also in the source for building the boot.img file.

As mentioned on the Wiki, and seen in the source, the page size can be 2048 or 4096 bytes, with the former the default. The header, which is rather boring, containing only a “magic string” (”ANDROID!”) and a checksum takes up the first page of 2048 bytes. It can be separated from a boot.img with the following command:

dd bs=2048 if=boot.img of=header count=1

Next up is the kernel. I’ve yet to find a way to determine its size, however you could go looking for white space padding and then round up to the nearest 2048 bytes. (Also, magic bytes (1F 8B) of the gzipped ramdisk will provide a clue.) In my case, I “cheated” and looked at the size of the kernel file under out/target/product/maguro. It turned out to take 1912 pages, so we can separate it by the following command (skipping the header part):

dd bs=2048 if=boot.img of=kernel skip=1 count=1912

Then it’s only the ramdisk filesystem left (there’s no “second stage” section in use). It will take the rest of the size of the file, which came down to 158 pages in my case:

dd bs=2048 if=boot.img of=ramdisk skip=1913 count=158

The ramdisk is a gziped, cpio packed archive, which can be extracted into its own directory by
mkdir ram
cd ram
gunzip -c ../ramdisk | cpio -i

That should give you the following files and directories

./init.rc
./ueventd.tuna.rc
./init.omap4pandaboard.rc
./res
./res/images
./res/images/charger
./res/images/charger/battery_4.png
./res/images/charger/battery_5.png
./res/images/charger/battery_1.png
./res/images/charger/battery_charge.png
./res/images/charger/battery_2.png
./res/images/charger/battery_fail.png
./res/images/charger/battery_0.png
./res/images/charger/battery_3.png
./init.tuna.usb.rc
./ueventd.goldfish.rc
./dev
./init.tuna.rc
./init.goldfish.rc
./init
./system
./data
./sys
./ueventd.rc
./sbin
./sbin/adbd
./sbin/ueventd
./proc
./charger
./default.prop

For more about the Android boot process, and kernel, look at the Embedded Linux Wiki.

As seen from the files above, the charger icons displayed when the phone is charging while off is plain PNG images. Might be fun to change. Furthermore, the initial splash screen logo can be changed by adding a file called initlogo.rle to the root directory of the ramdisk. Might try that next.

Building Android on Fedora

1 comment

Here’s a brief command-by-command guide to building Android 4 (ICS -Ice Cream Sandwich (with extra sugar on top)) from scratch, and deploying the new images on the Samsung Galaxy Nexus, all from Fedora 16. This is heavily based on the Free your Android article, and of course the instructions at android.com.

First, install the supporting packages. (Instead of the OpenJDK version, you might have to download the Oracle one, if you get version conflict errors at the make step below.)

yum groupinstall "Development Tools"
yum install java-1.6.0-openjdk kernel-devel git gnupg flex bison gperf zip curl zlib-devel glibc-devel glibc-devel.i686 ncurses-devel.i686 glib-devel.i686 libstdc++.i686 zlib-devel.i686 ncurses-devel.i686 libX11-devel.i686 libXrender.i686 libXrandr.i686 mesa-libGL-devel.i686 readline-devel.i686 arm-gp2x-linux-gcc-c++ python-markdown xmlto libxslt

Download the source. The final sync command will take about an hour.

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

mkdir android
cd android

repo init -u https://android.googlesource.com/platform/manifest
repo sync

Download proprietary binaries and drivers. They are available here:

http://code.google.com/android/nexus/drivers.html

Assuming the Galaxy Nexus – GSM/HSPA+ (”maguro”), there’s two drivers. (Please check the link above for new versions).

wget https://dl.google.com/dl/android/aosp/imgtec-maguro-iml74k-a796ffae.tgz
wget https://dl.google.com/dl/android/aosp/samsung-maguro-iml74k-de1cc439.tgz
tar zvxf imgtec-maguro-iml74k-a796ffae.tgz
tar zvxf samsung-maguro-iml74k-de1cc439.tgz
extract-imgtec-maguro.sh
extract-samsung-maguro.sh

Build, still assuming the same phone as above. On my somewhat dated dual core 2.6 GHz CPU, it took almost four hours to compile.

source build/envsetup.sh
lunch full_maguro-eng
make -j4

Then, transfer the image files to the phone. Make sure the phone is connected over USB, is unlocked, and has USB debugging enabled. After the images are transferred, and the userdata and cache partitions are erased, the phone will reboot. It will show the Android logo, reboot one ore two times more, and then wait maybe a minute or two before the UI is available. And there it is, your home-built Android OS.

out/host/linux-x86/bin/adb reboot bootloader
sudo out/host/linux-x86/bin/fastboot -w -p maguro flashall

If something, or everything, failed and you are left with a useless phone, here are the factory images from Google. Download and unpack the archive corresponding to your phone, and run the script

flash-all.sh

For more details on “unbricking” your phone, see Derek Ross’ comment.

Skype on Fedora 16, 64 bits

2 comments

Skype on Linux was always a bit of a drag to install, and for some reason a 64 bits version is not available for Fedora. It is unlikely to change now that Microsoft bought the whole shop. Luckily, the old 32 bits version still works, with a few tricks.

After downloading the RPM, install with

yum install skype-2.2.0.35-fedora.i586.rpm

Get the 32 bits versions of these libraries:

yum install libv4l.i686 pulseaudio-libs.i686 alsa-plugins-pulseaudio.i686

And finally, make sure you have these binaries:

yum install ld-linux.so.2 libasound.so.2 libXv.so.1 libXss.so.1 libQtDBus.so.4 libQtGui.so.4

Thanks to drjolo and tuxor for these fixes.

Jarre and experimental instruments

no comments

Enjoying a concert by Jean Michel Jarre recently, I got musing over his many innovative and experimental ways of controlling the music. Including signature instruments like the laser harp, theremin, but also more conventional boxes, like the Minimoog and various Moog synthesisers, the ARP 2600, the Moog Liberation keytar synthesizer, Korg Mini Pops, and Roland HPD-15 Handsonic Percussion Controller, an iPad, and much more.

For even more experimental instruments, see the Elixir and Home Made Labor acts. They make they own instruments, sample it, tweak it, and create ambient sound-scapes. At a live performance a few years ago, they would mould and shape the sound as they went along, slowly adding complexity ad-hoc.  Here’s a video where they go into a bit of detail.

Finally, while digging up some of this, I came across to other Zurich based projects: domizil, and ICST. I don’t know much about either, but domizil has a few CDs out. Might be worth looking into.

Cool Linux games on Fedora

1 comment

Linux might not be famous for its games, however there are still plenty around. You will not find the latest Call of Duty, though. Rather, there is a long list of classics and small and fun games. From the Scumm based offerings from Revolution, to remakes of classics like Freeciv, LinCity, and Ultimates Stunts.

Fedora offers a dedicated “spin” installation for games, which offers more than hundred small and big games. Below is a random pick of a few favourites, along with their RPM package names.

As far as I understand, many of them are OpenGL based, or require a properly configured graphics card to run.

  • Beneath a Steel Sky – beneath-a-steel-sky-cd
  • Lure of the Temptress – lure
  • Flight of the Amazon Queen – flight-of-the-amazon-queen-cd
  • Freeciv – freeciv
  • Glaxium – glaxium
  • Mania Drive – maniadrive
  • Ultimates Stunts – ultimatestunts
  • Tremulous – tremulous
  • Abuse – abuse
  • LinCity – lincity-ng

And to install them all!

yum install beneath-a-steel-sky-cd lure flight-of-the-amazon-queen-cd freeciv glaxium maniadrive ultimatestunts tremulous abuse lincity-ng

Fedora 16 Released

no comments

Fedora 16 was released today. There are a number of changes, including “GRUB 2 replaces legacy GRUB, HAL is gone and replaced by udisks, upower, and libudev, migration from SysV init to native Systemd continues”. Furthermore, Java 7 is finally being previewed, while Java 6 is still the default.

Download your copy now, a special “spin“, or share over Bittorrent.

RF Communication on 433.92 MHz

no comments

I recently got a Sparkfun order on my door, so it’s time to play. In the box was a RF Link Transmitter, and Receiver. They are sold as 434 MHz radio wireless links. Others talk about 433 MHz. To be precise, it’s 433.92 MHz. That matters, because if you search for that number, you will find the so called home automation systems using that frequency, including X10, Everflourish, and many others. My plan then, is to build something similar to the TellStick from TellDus, which control these devices from my computer. Connect that up to an Android app, and I could control my lights and other appliances from any mobile phone.

First things first, though. Hooking up the bits was easy, following these two similar tutorials. Using the VirtualWire Arduino library v1.5 (1.6 released at the time of writing) by Mike McCauley (download version 1.5) transmitting data was a breeze. The library includes example code for transmitter and receiver, simply upload and go. Note that the transmitter data should be connected to pin 12 on the Arudino, and the receiver on pin 11 on the other. Data was received loud and clear, without errors. Mike’s library is well written, and covers several important aspects of RF communication, including a dedicated protocol, CRC handling, robust encoding over the air, baud rate, and to top it off, an easy to use API.

Now, of course when using my Everflourish nothing happened. Which was a good sign; it did not interfere with the Virtual Wire transmission. That remote is using a different protocol to talk to the light switches. Luckily, it has already been reversed engineered and the source code is available from TellDus. It will probably take some time to get this working. Meanwhile, some pictures.

Arduino, Fedora 15, and the gpsd incompatibility

no comments

Even though the Arduino is very popular amongst makers and other electronics hobbyist, it is still a fringe platform in most settings. And even though the arduino package is available through many repositories, more testing would be welcome.

In the latest packages in Fedora 15, things have broken down in several ways. Tom Trebisky does a good job of guiding you through the pitfalls here. He has further useful notes on Arduino here.

What had me going mad was this message: “avrdude: stk500_recv(): programmer is not responding”. Everything seemed to be fine, the lights were blinking when connecting, the logs looked normal, and what’s more, all my boards worked when programmed on another system, but not on my Fedora 15 at home! Furthermore, the error seemed to be half sporadic. Sometimes it would fail at once, while other times it got a bit further before it stopped.

Tom writes: “On a hunch (having watched the messages via dmesg when I plug in my arduino) I get rid of gpsd“. And that was my problem as well. The gpsd daemon was some how conflicting with the ttyUSB device. One option to remove it would be

service gpsd stop
killall gpsd
yum erase gpsd

However, in my case I could not remove the gpsd package because it was a dependency of another application I wanted. In the end, I simply renamed the binary (/usr/sbin/gpsd), so it would not be automatically activated when I plug in the Arduino. Maybe not so elegant, but I could finally get to work with more fun stuff.

Mobile OS

no comments

In the world of OSes for mobile phones, there have been a lot of changes lately, with some going away and others joining the race. A while back, Intel announced that they would drop MeeGo, which means that it is dead since there is nobody else to support it if the community can’t keep it going. But at the same time, they said the code would be merged with another mobile OS. Intel and the Linux Foundation will be steering the OS with the very unfortunate name Tizen (it can easily be mistaken for meaning penis in some of the Scandinavian languages).

Meanwhile, over at Nokia they are betting on Windows Mobile (and making many of their employees disgruntled), while at the same time releasing the already defunct MeeGo OS in their N9 phone. However, since these are all OSes for high end smart phones, they also need something for their so called “feature phones” which are not power full enough (or have different user groups) to drive all the complex functionality. Enter Meltemi, ironically enough a Linux based OS to replace Symbian S40 series.

The story does not end there, though. Amongst the free mobile OSes, KDE is entering the race. Not with a complete separate OS, but rather a UX platform, Plasma Active, with an API for phones, tables, set-top boxes, home automation, and so on. Plasma Active has to run on top of some OS, and currently they are using MeeGo and openSUSE based Balsam Professional.

It is refreshing to see a lot of movement in this area, and hopefully it will lead to a free alternative. However, the at moment it is still looking somewhat bleak for truly free mobile phone OSes. The firmware and driver issue seems to be never ending, and not even the OpenMoko can escape it.

Fluctuating Storage Prices

no comments

Due to fluctuating exchange rates, and a flood in Thailand, prices on hard drives have changed a lot lately. Western Digital, which is tracked extensively on this list, has been especially hard hit, with factories shutting down. It is most likely a temporary issue, however with some prices going up as much as 80%, it might take at least half a year or more for things to smooth out.

Media Type Product Capacity Price CHF Price Euros Euros / GB GBs / Euro
Harddisk Western Digital Caviar Green 1.5TB 1500 GB 76.00 61.96 0.04 24.21
Harddisk Western Digital Caviar Green 3TB 3000 GB 162.00 132.08 0.04 22.71
Harddisk Western Digital Caviar Green 2TB 2000 GB 109.00 88.87 0.04 22.51
Harddisk Western Digital Caviar Green 1TB 1000 GB 70.00 57.07 0.06 17.52
Harddisk Western Digital Caviar Green 2.5TB 2500 GB 193.00 157.35 0.06 15.89
External 3.5 Western Digital Elements Desktop 2TB 2000 GB 162.00 132.08 0.07 15.14
External 3.5 Western Digital Elements Desktop 3TB 3000 GB 249.00 203.01 0.07 14.78
External 3.5 Western Digital Elements Desktop 1TB 1000 GB 129.00 105.17 0.11 9.51
Harddisk Western Digital Caviar Green 500GB 500 GB 75.00 61.15 0.12 8.18
External 2.5 Western Digital Elements SE 1TB 1000 GB 151.00 123.11 0.12 8.12
Blu-ray Verbatim BD-R SL 25 @ 50GB 1250 GB 238.00 194.04 0.16 6.44
DVD-R Verbatim 16x DVD-R 100 @ 4,7GB 470 GB 95.00 77.45 0.16 6.07
DVD+R DL Verbatim 8x DVD+R DL 25 @ 8,5GB 213 GB 56.00 45.66 0.21 4.65
CD-R Verbatim CD-R 100 @ 700MB 70 GB 39.00 31.80 0.45 2.20
USB Flash Sandisk Cruzer Flash Drive 32GB 32 GB 38.00 30.98 0.97 1.03
SSD OCZ Agility 3 120GB 120 GB 165.00 134.52 1.12 0.89
SSD Corsair Force3 120GB 120 GB 165.00 134.52 1.12 0.89
SSD Corsair Force3 240GB 240 GB 333.00 271.50 1.13 0.88
SSD Kingston SSDnow V 100 Series 128GB (kit) 128 GB 178.00 145.12 1.13 0.88
SSD OCZ Vertex 2 Extended Cap. 120GB 120 GB 169.00 137.79 1.15 0.87
SSD OCZ Agility 3 240GB 240 GB 369.00 300.85 1.25 0.80
USB Flash Sandisk Cruzer Flash Drive 16GB 16 GB 25.00 20.38 1.27 0.78
SSD Kingston SSDnow V 100 Series 256GB 256 GB 405.00 330.20 1.29 0.78
SSD OCZ Vertex 3 120GB 120 GB 209.00 170.40 1.42 0.70
SSD Corsair Force GT 120GB 120 GB 209.00 170.40 1.42 0.70
SSD OCZ Agility 3 60GB 60 GB 109.00 88.87 1.48 0.68
SSD Corsair Force GT 240GB 240 GB 444.00 361.99 1.51 0.66
USB Flash Sandisk Cruzer Flash Drive 8GB 8 GB 15.00 12.23 1.53 0.65
SSD OCZ Vertex 3 240GB 240 GB 459.00 374.22 1.56 0.64
SSD Corsair Force3 60GB 60 GB 117.00 95.39 1.59 0.63
SSD Intel 320 Series 80GB 80 GB 159.00 129.63 1.62 0.62
SSD Corsair Force GT 60GB 60 GB 122.00 99.47 1.66 0.60
SSD OCZ Vertex 3 Max IOPS 240GB 240 GB 489.00 398.68 1.66 0.60
SSD OCZ Vertex 3 Max IOPS 120GB 120 GB 249.00 203.01 1.69 0.59
SSD OCZ Vertex 3 60GB 60 GB 125.00 101.91 1.70 0.59
SSD Kingston SSDnow V+100 Series 64GB 64 GB 139.00 113.33 1.77 0.56
SSD OCZ Vertex 3 480GB 480 GB 1083.00 882.97 1.84 0.54
SSD Intel 510 Series 120GB 120 GB 285.00 232.36 1.94 0.52
Compact Flash Sandisk CF Card 64GB Extreme Pro 64 GB 467.00 380.75 5.95 0.17
Compact Flash Sandisk CF Card 32GB Extreme Pro 32 GB 239.00 194.86 6.09 0.16
Compact Flash Sandisk CF Card 16GB Extreme Pro 16 GB 140.00 114.14 7.13 0.14

Exchange rate: 1 Euro = 1.226539 CHF.

Fedora on Raspberry Pi

no comments

Chris Tyler has published a video demonstrating Fedora running on the ARM based Raspberry Pi. This looks very promising, and the Fedora project is working actively to support several ARM based systems.

Here’s general instructions on how to install Fedora from a USB stick, and here’s minimal Xfce based spins. (I am not sure if these instructions apply to Raspberry Pi).

Switch to Tab no more

no comments

The list of annoying, unnecessary or inferior features  the new Firefox versions is getting longer. To get back to where it was about a year ago, you already have to tune it by putting back the status bar, disabling animations, opening tabs at the end. Add to that the disabling of the “switch to tab” feature, which does no longer let you pick a second tab from history if you already have it open elsewhere. Usually, you can disable these things from the about:config page, however for this one you need a third-party plugin to get back to normal. It’s called “Switch to Tab no more“.

Low end hosting

no comments

I recently found this great overview of cheap and simple hosting and Virtual Hosting solutions: lowendbox.com. It includes many providers of cheap hosting solutions for private and small business use.

If you are able to manage your own server, e-mail and web site, there are many reasons you should take matters in your own hands. For the most basic use case, family e-mail and a small web site, it does not have to be expensive or take much time. Including your own domain, you should end up under 200 Euros / year.

For only e-mail, or only web hosting, you might get by on the smallest of boxes offered, which is usually 128 MB of RAM. However, if you need both on the same machine, 256 MB is rather tight. For disk, somewhere between 10 and 20 GB should be sufficient. And the traffic / month limits are usually more than enough, often as high as 100 GB / month or more. CPU is usually never a limiting factor for a basic setup.

So register a domain, rent some space, and become an Internet householder and landowner.

Bad Behavior has blocked 35 access attempts in the last 7 days.