Neo freerunner
Once I received my Neo Freerunner, I logged into the openmoko wiki and setup
USB Networking on Ubuntu
Edit the file /etc/network/interfaces on your Ubuntu machine to look like this: (replacing 192.168.1.25 with your IP)
auto usb0 iface usb0 inet static address 192.168.0.200 netmask 255.255.255.0 network 192.168.0.0 up iptables -A POSTROUTING -t nat -j SNAT --to-source 192.168.1.25 & up echo 1 > /proc/sys/net/ipv4/ip_forward & up iptables -P FORWARD ACCEPT & down iptables -D POSTROUTING -t nat -j SNAT --to-source 192.168.1.25 &
# ifdown usb0 && ifup usb0
If that worked, you should now see something similar to:
$ ifconfig usb0 usb0 Link encap:Ethernet inet addr:192.168.0.200 Bcast:192.168.0.255 Mask:255.255.255.0
$ netstat -rn | grep usb0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0
$ ssh root@192.168.0.202 root@192.168.0.202's password:
hit enter and you should see:
root@om-gta02:~#
Once connected, you will want to test your internet connectivity.
# nslookup buildhost.automated.it
If it resolves, you're off to the races. If not, you'll want to edit /etc/network/interfaces on your phone and change the line "echo 192.168.0.200" to "echo 192.168.1.1" (your favourite DNS server). Mine looks like this:
auto usb0 iface usb0 inet static address 192.168.0.202 netmask 255.255.255.0 network 192.168.0.0 gateway 192.168.1.1 up echo nameserver 192.168.1.1 >/etc/resolv.conf
Initial SSH Connection
Once connected via ssh, these are the commands I ran, your mileage may vary:
# opkg update
As of July 23,2008 they don't seem to digitally sign their packages, so you will see errors for files that end with .sig If the files end with something other than .sig, you have other issues such as you can't connect to the internet.
# opkg upgrade
There were a couple of times I was prompted to merge files, I chose "I" to install maintainer's version, as the phone is new I've not yet edited anything myself so there is no risk of clobbering my changes.
Adding repositories
I chose to add the ScaredyCat and the Celtune-Rabenfrost repositories.
# cd /etc/opkg/ # wget http://buildhost.automated.it/scaredycat.conf # wget http://rabenfrost.net/celtune/celtune-rabenfrost.conf # vi celtune-rabenfrost.conf
and remove these two lines:
src/gz celtune-fic-gta01 http://rabenfrost.net/celtune/ipk/fic-gta01 src/gz celtune-om-gta01 http://rabenfrost.net/celtune/ipk/om-gta01
save the file. Finally:
# opkg update
Adjusting the time
# opkg install tzdata tzdata-americas
You can replace americas with antarctica, arctic, asia, atlantic, australia, europe, pacific, posix, right.
# ln -sf /usr/share/zoneinfo/America/Vancouver /etc/localtime # opkg install ntpdate # ntpdate pool.ntp.org # /etc/init.d/xserver-nodm restart
If the time looks correct now:
# hwclock --systohc
Adding helper applications
Add a filemanager, timesheet and todo list from ScaredyCat:
# opkg install gpe-filemanager gpe-timesheet gpe-todo # /etc/init.d/xserver-nodm restart
Replace the default keyboard with missing characters, with a full keyboard that will require the stylus:
# opkg remove -force-depends multitap-pad # opkg install matchbox-keyboard-inputmethod matchbox-keyboard-im matchbox-keyboard-applet
Get a list of available packages:
# opkg list
Adding internet applications
Install the openmoko web browser:
# opkg install openmoko-browser2
Install pigin for chat
# opkg install pidgin
Install nmap for port scanning
# opkg install nmap
Get GPS working
# opkg install gpsd openmoko-agpsui http://www.tangogps.org/downloads/tangogps_0.9.3-r1_armv4t.ipk # echo "GPS_DEV=\"/dev/ttySAC1\"" > /etc/default/gpsd # /etc/init.d/gpsd restart
Start the GPS program, and go stand in an open field for 10 minutes :)
Add wifi with WPA on Ubuntu
Edit your /etc/wpa_supplicant/wpa_supplicant.conf to look like this:
network={ ssid="your_ssid" proto=WPA key_mgmt=WPA-PSK pairwise=TKIP group=TKIP scan_ssid=1 psk="secret key" priority=10 } # vi /etc/network/interfaces
When you see the line:
iface eth0 inet dhcp
add a line right underneath it:
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
and save the file.
Now to try wifi:
# ifdown eth0 && ifup eth0 sed: unrecognized option `--quiet' BusyBox v1.11.1 (2008-07-18 00:49:01 CEST) multi-call binary Usage: sed [-efinr] pattern [files...] WPA: Configuring Interface ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported udhcpc (v1.11.1) started run-parts: /etc/udhcpc.d/00avahi-autoipd exited with code 1 Sending discover...
at this point my DHCP server responded with an IP. I now have wifi access! If you had issues, on the phone you can run
# ifdown eth0 && ifup usb0
Adjust the microphone
# vi /usr/share/openmoko/scenarios/gsmhandset.state
Scroll down to control.48, and under 'Mic2 Capture Volume' change the value to 2 or 3
Adjustable display settings
To see a list of variables you can adjust:
# dbus-launch gconftool-2 -a /desktop/poky/interface
scp an image to /media/card called P123.jpg
# dbus-launch gconftool-2 --type string --set /desktop/poky/interface/wallpaper ./media/card/P123.jpg # /etc/init.d/xserver-nodm restart
To see a large clock instead of a small:
# dbus-launch gconftool-2 --type bool --set /desktop/poky/interface/small_clock false # /etc/init.d/xserver-nodm restart
Flashing
This assumes you have downloaded the images you wish to install, and have connected the USB cable to your computer. With the phone off, hold down the AUX button and then press the power button. You should see a screen that says something like:
U-Boot 1.3.2 (May 9 2008) === BOOT MENU (NOR) === Boot Boot from microSD (FAT+ext2) Set console to USB Set console to serial Reboot Power off Press [AUX] to select, [POWER] to execute.
Once you see this screen you're ready to upgrade the kernel:
$ sudo ../dfu-util -a kernel -R -D ./uImage-om-gta02-latest.bin dfu-util - (C) 2007 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY Opening USB Device 0x0000:0x0000... Found Runtime: [0x1d50:0x5119] devnum=52, cfg=0, intf=0, alt=3, name="kernel" Claiming USB DFU Interface... Setting Alternate Setting ... Determining device status: state = dfuERROR, status = 14 dfuERROR, clearing status Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x1000 bytes_per_hash=35342 Starting download: [##################################################] finished! state(2) = dfuIDLE, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode
Then the filesystem:
$ sudo ../dfu-util -a rootfs -R -D ./Openmoko-Freerunner-20080424-om-gta02.rootfs.jffs2 dfu-util - (C) 2007 by OpenMoko Inc. This program is Free Software and has ABSOLUTELY NO WARRANTY Opening USB Device 0x0000:0x0000... Claiming USB DFU Runtime Interface... Determining device status: state = appIDLE, status = 0 Device really in Runtime Mode, send DFU detach request... Resetting USB... Opening USB Device... Found Runtime: [0x1d50:0x5119] devnum=55, cfg=0, intf=0, alt=6, name="rootfs" Claiming USB DFU Interface... Setting Alternate Setting ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing Transfer Size = 0x1000 bytes_per_hash=807403 Starting download: [##################################################] finished! state(2) = dfuIDLE, status(0) = No error condition is present Done! Resetting USB to switch back to runtime mode
It looks like everything went as anticipated, reboot the phone!