From Openmoko

Jump to: navigation, search


FR as host on active hub

This is my latest artwork:

Mobile workplace.jpg

Mobile work-place ;) Freerunner beeing charged from a modified USB hub using 5 AA batteries.

Full keyboard, mouse and external HDD connected!

Internet access wia UMTS dongle.

A special holder places the FR into a reflection-free angle.

Note the TUX penguin, that I have manually glued on the 'Windows-Keys'!

I have bridged the output power supply of the USB slots in the USB hub back to the 'input' line (where the FR plugs in). With a manual switch I can turn on/off this power feed. This might be some good luck that the good piece didn't blow off - it's a 20EUR DLINK hub.

The USB gender changer (female/female) can be bought for example at the big 'C':

The power supply are 5 AA NiMH accus, which deliver around 6.5V when fully charged. This is about the same voltage the comes from the external AC/DC power plug.

SolderedHub1.jpg SolderedHub2.jpg

Note the single blue wire on the bottom right of the right image. This is all it needs. The rest is just fun like an additional switch with a LED to turn power-feed on and off and another Type-A USB slot, so that I don't need the genderchanger and the Type A/B converter any longer as one can see it in the topmost image.

For soldering hints, please look at or


After I have soldered the second USB connector (the black thick cable on the left image), the hub did not work any more on a regular PC, although it still worked on the FR. So my assumption is, that it is not broken, but maybe the USB signal reflects on the open-ended cable. I will invastigate further.

Try this at your own risk! Be prepared to inflame your USB hub, power supply or even your phone!

(You have been warned...)
More images:

USBPipelineLong.jpg USBPipelineShort.jpg USBHubWithDisplay.jpg

From left to right:
Usual way to use the FR as a USB hub (you need 3 different adaptors)
'Short' way with self-soldered USB connector into the hub, which makes it unusable for PC's, though!
Integrated voltage meter in the USB hub, displaying either the HUB's own power supply voltage, or the voltage delivered from the FR to the hub, depending on the small switch that I have built in. LED indicating current direction.

1000mA power supply

To set the FR into the 1000mA charge mode, a special USB cable is required which bridges the 'Id' pin of the mini-USB plug to ground with a resistor of 47KOhm (See USB_charger). Unfortunately, all usual USB cables that connect a PC with a device dont lead out that Id pin. I bought a mini USB plug, but that also had no connector for the Id pin, so I had to make some micro-mechanics:


I cut the Data+ pin (3rd pin from top) and shortened the Id Pin (2nd form above) with the Data+ line, which is the white wire on the image. Note the small soldering poing, which bridges the cut Pin Data+ (wire only) with the 'Id' contact (to phone).


Then I put the 47KOhm resistor between ground (black) and the 'stolen' Id pin (white).

So far this works pretty good. But the mini USB connector is not the best. It has only flat contacts and fits very loosely in the FR USB slot, so very often there is a bad contact. I got this part from Conrad but would suggest buying something of better quality. There are some mini usb extensions which provide a 5-pin wiring (can even be found at eBay).

Charging crank

After various attempts to charge the phone with a bicycle dynamo (there are also some hints on the Wiki, I will add links later), I thought about charging the phone by manual power. So I stole the small lamp of my daughter which charges a 3.6V NiCd battery by turning a crank.

I replaced the battery by a 1000uF elko because I didn't want to charge another useless battery. The elko should buffer and smooth the output voltage:


So far this works pretty well, at least in theory - It is surprising how much strength one must spend to get about 300mA current. This is about what the good piece can deliver. Of course, the charging time stays the same: about 2 hours for a complete exhausted battery. So please imagine to turn the crank at full speed for 2 hours! This was a nice try, and maybe usable for emergency situations but not for daily live!

Other not recommendable charging options

There are many emergency chargers around that use only one AA battery (1.5V) and produce 5V output. They claim to charge handy, digicams etc.:


Don't feel tempted to buy/use such a thing! I did it for you and first thing happened was, that it broke the USB slot on my Freerunner! Because they delivered such a cheap mini USB plug that one pin bent off and cracked my FR USB slot:

BrokenkUSBPlug.jpg BrokenUSBSlot.jpg

(high-res images, click to enlarge)

Second, it does not deliver enough power to recover from an empty battery. It brings around 100mA which can only help to lengthen the runtime of your phone.

Even more unrecommended charging options

I thought it should be easy to charge a set of batteries by simply attaching a solar panel to them. These are 3x 1.6V NiZn accus; In comparison to NiMh they have a higher voltage which is an advantage in many cases, but I guess the charging strategy is still under development.

The solar panel has 5V, delivering 80mA current when short circuited and exposed to full sunlight. It has about the max size that can be attached on the back of the phone. The batteries have about the size so that they should fit into the battery case with some modifications of the 3D model.

After a half day charging on my window-board in the spring sun, the (completely discharged) accus showed around 4V, but were only able to start the FreeRunner for some seconds.


But the most weird thing - I never was aware of: the solar panel can also discharge the batteries. See the picture which is taken inside a room under a 100W standard lamp and still discharging at about 0.5mA. So, I'm not an electronics engineer and there's a good reason for that! But this solution is completely unusable without any further charging electronics. Some guy suggested to use a MPPT (maximum power point tracker). Maybe I'll give it a try, but my experience with (semi-professional) solar chargers over some years were always quite disappointing.

So simply adding a solar panel would not be enough, more electronics will be necessary, small enough to hide them in remaining space. The next picture is one attempt to use a DC/DC converter to get a stabilized 5V output. Unfortunately it didn't work, but this was because of my lack of eletronic skills. What I wanted to show is the amount of space that is needed for the IC and the two condensators. This would not fit into the FR case without major design modifications. Christoph Mair suggested to use a LTC3105 or LTC3108, which are suited for solar charging with maximum power point tracking (MPPT). But I guess they need the same additional discrete parts.

Dcdc converter.jpg

Another attempt was to disassemble an existing solar charger with working electronics. It costs about 30 EUR and has a solar panel that even fits better to the FR cover. Again, the problem are the big condensators. Several SMD parts mounted on the backside. USB and switch etc. could be removed. But again the problem: This device also discharges the battery if there's not enough light. But: if the battery is empty, it can charge it with incredible 0.5mA. So if you are lying half-dead on the ground in a sunny place and wait for about an hour, you probably can send an emergency-call...

Dcdc disassembled.jpg

Using alternate browsers

Midori is nice...but not a fully usable browser. And loading pages over cellphone network is pretty slow. Therefore I use a ssh tunnel to a X-server at home and look at it via vnc. (I don't explain how to set-up an ssh account through dyndns here...)

at home type:

vncserver :30 -depth 24 -geometry 1280x1024
DISPLAY=:30 firefox &

on the FR in a first shell:

 ssh -L5930:localhost:5930

and in a second shell:

vncviewer localhost:30

Tweaking midori to mobile browser

Some web sites support mobile browsers by reading the HTTP Flags sent by the browser. My experience is, that iPhone and Android are somehow supported by major sites (e.g. GMX, ebay etc). Also, some users reported that modifying the Identity flag might help sometimes.

First problem although is, that midori itself requires too much screen space, so that the necessary options cannot be reached inside the UI. This can be solved by rotating the screen, using for example 'omnewrotate':

 opkg install omnewrotate

Then inside midori, go to: Edit> Preferences> Network> Identify as > iPhone

This solves many problems on pages that recognize iPhone as browser (still not perfect, but usable).

Others mentioned to set a custom browser Id, by setting 'Identify as' to 'Custom', using

Mozilla/5.0 (Linux; U; Android 1.0; en-us; generic) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2


Mozilla/5.0 (Linux; U; Android 1.5; en-us; generic) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1

Other places, like heise (german computer online magazine) offer an external link for mobile devices:

Which works without browser identification.

Adding swap space on mmc card

In SwapSpace is descriped how you add a swap file on filesystem. This seems somehow complicated to me. I wanted to use my microSD card for swapping (it doesn't matter if it gets broken after 2 million read/write accesses). Also, I don't want the mmc card formatted with VFAT anyway, so I made a new partitioning:

/dev/mmcblk0p1               1        5129      500075   82  Linux swap / Solaris
/dev/mmcblk0p2            5130       81820     7477372+  83  Linux

and added in /etc/fstab:

/dev/mmcblk0p1          swap                    swap    defaults        0 0

doing a

 mkswap /dev/mmcblk0p1

once and a reboot and we're done.

See what 'top' says: the internal 128MB memory is almost always completely exhausted, with just one or two applications running. With 512MB swap space I can use Midori, tangoGPS, several terminals, the settings pages and so on all at the same time.

Mem:    120856k total,   116364k used,     4492k free,      172k buffers
Swap:   500064k total,    67696k used,   432368k free,    71764k cached

Import Contacts (SHR version)

(dated 2010-10-01, things change so fast....)
I've written a small python script which takes a simple text file (e.g. output of mysql) and imports it into the phone's contacts database.
I'm now using Pisi to convert .vcf files into the PIM database. This seems to me the best aproach and is independent of the target database. So you can store the contacts on the SIM card or on the PIM database easily. My extraction of my SQL database creates a temporary textfile (tab-separated), which then will be converted into a .vcf file that finally is readable by pisi. Pisi does not read all vcf formats, I've made some comments on places where pisi was too picky to read the data.

You can download the scripts here: (exctract sql database, call the below script, 'ssh' it to the FR and 'pisi' it there) (convert the tab-separated textfile into a vcf file, called from above script)

HikeBikeMap for tangogps or foxtrotgps

(keywords: Openstreetmap)

The hikebikemap ( uses different layers (the cyclemap, a layer for routes of cycleways and the hillshading). The composition the these layers cannot be handled by tango/foxtrot, so I set up my own webserver, which does the composing of the layers and returns a single png file. You can try it out by adding a new map provider with following URI:

Note that the lonvia card is currently (08/2012) somehow switching to with a different layout and separates hiking and cycling. If interested in the composition script and how to put this into apache, contact me.

Beagle Board


I was curious about the BeagleBoard and ordered one, together with the Freerunner-BeagleBoard-Hybrid unit. Here are my first attempts and impressions.

I ordered both at I've got a 'xM' board, which has more memory, and also the layout and connectors seems slightly different to some images shown in tutorials. On the topside of the board is a white label with a black 'B', I assume this is the board revision to which some articles refer on.

Inside the board was a micro SD card attached; after inspecting it under my linux machine it seemed to have the required partitioning, so I simply tried to power it on. This can by done by plugging in a mini USB connector to the BeagleBoard's slot.

Some LED's turned on and after a second also the Display unit turned its backlight on, but nothing more happened. If I removed the micro SD card and booted the device, the LCD backlight remained black, so I assumed that this has to do something which is on the card and already worked.

Connecting the serial port

For further diagnostics I had to digger out some old serial RS232 cables, trying with different '0-modem' (crossover) and 'usual' cables. The BeagleBoard has a 9-pin female SUB-D connector. What finally turned out to work is a usual (non-crossover) serial cable. Using 'minicom' with 152000/N/8/1 worked after a while.

Flashing the microSD card

As I wrote previously, the uSD card seemed to have already some image stored, but I was wrong with that. It had only the uImage, MLO etc. on the first FAT partition, but the second (ext3) partition was complete crapped. I used fdisk and mkfs to create a proper partition and extracted the (230MB!) tarbarll (Angstroem*.tar.bz2)[1] there.

As I found out later, I also had to update the uImage (kernel, from the same URL) to match the root filesystem on the ext3 partition.

After doing that, the device booted as I could then see it in the minicom terminal, and I also was able to login as root. I was using the Angstrom-Beagleboard-demo-image-glibc-ipk-2010.3-beagleboard.rootfs.tar.bz2 image. I did not get any ethernet connection, even tough I had the ethernet connector plugged in (dhcp etc available).

Also, the OpenMoko display remained silent, only white.

Best guess

As of today (2010-11-03) I had the best success using the files and instructions found here: Freshly reformatting the FAT partition is really recommended, and then go step-by-step through the instructions. I got the splash penguin screen, a graphical login prompt which reacts to a connected USB keyboard (but interestingly did not allow root access). And - as described in the tutorial - the USB interface, which was connected after booting the kernel, recognized the USB ethernet gadget; but I was not able to make a real IP connection up to now.

Then I looked what 'dmesg' says:

[ 2303.711395] usb0: register 'smsc95xx' at usb-ehci-omap.0-2.1, smsc95x USB 2.0 Ethernet, 9a:23:96:d4:4a:6e
[ 2306.305572] twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
[ 2323.870605] EXT3-fs (mmcblk0p2): using internal journal
[ 2332.259826] g_ether gadget: using random self ethernet address
[ 2332.268676] g_ether gadget: using random host ethernet address
[ 2332.276580] usb1: MAC 8a:8e:48:05:c8:1a
[ 2332.288330] usb1: HOST MAC 72:9c:1f:4d:23:5e

This last line is the mac of my linux host (the USB device).

So I changed in /etc/network/interfaces all usb0 into usb1 and now it works. On The linux host I use this script:

# IFACE=usb0
if [ ! -z "$1" ]; then
ifconfig $IFACE netmask
/sbin/route add -host dev $IFACE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s -j MASQUERADE

echo 'IP forwarding for net 192.168.0.* enabled!'

Use './script usb0' or './script eth1', depending on which device the BB appears (depends on Linux kernel). Then you should be able to ssh into the BB.

I had to modify /etc/resolv.conf, there is a public nameserver, but I liked to have my intranet's DNS there.

Making/hearing noise

Even though I only had a serial terminal connection, I was successfully playing some sound on the BB. 'mplayer' comes already pre-installed and by putting some mp3's on my SD-card I was able to hear sweet music out of the stereo-out jack of the BB.

By the way it is a good idea to plugin a really very cheap set of loudspeakers into the stereo-out jack of the BB. If the speaker has no or a weak filter, you can 'hear' if your board is still doing something or not.


Stupid enough, there were some things I did wrong myself:

I put the microSD card into a allround 50-Cent card reader and plugged that one into the USB slot of my keyboard. It was recognized correctly, but when it came to formatting the ext3 partition, I only got some few 100MB out of the actual 4GB card. Plugging the stick directly into my PC (under the desk - oh what an effort!) finally worked perfectly.

As described above in 'Best guess' and the tutorial mentioned there, it is necessary to provide an external power supply other than an PC-USB slot. This is really weird because you have to connect to the cinch 5V plug (round hole with a pin inside) to power up the device and then later connect the USB to the PC for ethernet and so on. I was really struggling to get such a 5V power supply with the matching connector and the matching volage (there are so many). If you power up the BB with the USB slot it will start to boot, but then later crash with a kernel exception (this is also described in the tutorial).

The minicom terminal sometimes delivered me some crap output while/after booting. The login prompt, and what I type into it as login were only special characters and I couldn't successfully login. This seems to be some interaction with the terminal interface. Sometimes it helped to do a 'stty -F /dev/ttyS0 sane' or 'stty -F /dev/ttyS0 raw', sometimes only a reboot helped. I still don't know what the reason is.

Battery cover printed with shapeways

This is the backpart of the case, printed at shapeways in the material 'frosted ultra detail'. The material has the same flexibility as the original cover and the details, especially the small noses are really fine. Just the color of 'frosted' could be some more stylish... ;)

Case together.jpg Case overview.jpg Case detail.jpg

printed front covers

Those are two front covers printed in 'black strong and flexible' and 'white strong and flexible, polished'.

Lukas, who designed those parts, said that the polished version would not exactly fit. But at least for the front cover this seems not to be relevant. I had some problems with the 'frosted ultra detailed' material of the battery cover, though (some 0.1% misfit in size).

The black material is rather rough like concrete or asphalt, but it feels pretty cool. The white polished is something for girls. It feels smooth and almost shiny.

FrontCover black.jpg FrontCover white.jpg FrontCover black and white.jpg

Contact me



Personal tools