Wednesday, November 24, 2010

Linphone from Openmoko to Netbook working

Today I was able to get Linphone working on Openmoko and Ubuntu. I made a call from both the Netbook to the Openmoko and the reverse over the Fortress Radios. Currently I only have audio from Openmoko to the Netbook. If I talk into the Openmoko I can hear the audio out on the Netbook but not the reverse. I believe the netbook does not have an internal mic so I will try an external mike when I get home. To briefly recount the setup:

I needed to update the voip-handset.state file.

Run on Openmoko as root
#wget http://svn.openmoko.org/trunk//src/target/audio/om-gta02/voip-handset.state
# alsactl -f voip-handset.state restore

The GUI version of Linphone works fine on Ubuntu. To make a call simply type in the SIP window:

sip:root@10.0.0.4 (user@ip of phone)

To call from phone to Netbook I need to use the command line version "linphonec"

On the Openmoko from a terminal type:

#linphonec
//then update the sound card

linphonec>soundcard use 0

linphonec> call sip:ubuntu@10.0.0.1 (user @ ip of netbook)

Again, only have audio from phone to netbook.

Future Work:

1. Plug in an external mic and test audio from netbook to phone.
2. Work on TangoGPS

Monday, October 25, 2010

Week of 25 October 2010

I've finally figured out how to get the Freerunner to support an external USB device AND charge at the same time. Right now I'm using a clunky setup with a USB Y-cable (2 USB A male to 1 usb mini male) and a powered hub to supply power to the Freerunner and the USB-Ethernet adapter. Here is how it is conneted:

USB hub plugged into AC power

Freerunner Configuration
1) Toggle USB mode to USB host
echo host > /sys/devices/platform/s3c-ohci/usb_mode
2) Turn off power out from Freerunner:
echo 0 > /sys/devices/platform/s3c2440-i2c/i2c-adapter:i2c-0/i2c-dev:i2c-0/device/i2c-adapter:i2c-0/0-0073/neo1973-pm-host.0/hostmode

Y-Cable Connections
1) Black (data and power) USB A male connection into USB hub upstream port using USB A to USB mini adapter
2) Red (power only) connected to one of the downstream ports of the USB hub
3) USB to Ethernet adapter plugged into one of the downstream ports of the USB hub

Once everything is connected you can configure your interfaces. I have the following interface configuration:

On the Freerunner:
USB0: 192.168.1.202 (I'm currently using the 192.168.0.200 subnet for the second FR
which is connected to a USB port on my Netbook)
Eth0: 192.168.1.203

On netbook:
Eth0: 192.168.1.200


I've changed the IP address setup to avoid interference with the Freerunner's default subnet (192.168.0.202)

Now I'm using the 10.0.0.0 subnet as follows:

Netbook: Eth0: 10.0.0.1
Fortress1: Aux: 10.0.0.2
Fortress2: Aux:10.0.0.3
Freerunner: Eth0: 10.0.0.4 (I've taken to disabling USB0 when not in use)

I was able to ping across both ways. Tomorrow I will try to run TangoGPS on the laptop and obtain the IP data from the Openmoko as originally planned.

Future work:

Try a separate power source. The main issue with the current y-cable is that the downstream connecter is a USB-mini male. To connect the USB-ethernet adapter to the downstream side I would need a converter from USB-mini male to USB-A female. I'm not sure that one exists, may possibly require a custom made cable or two adapters.

Run TangoGPS on the laptop and obtain the IP data from the Openmoko as originally planned.


That's all for now.

Monday, October 4, 2010

Week of 4 October 2010, preparing for Demo1

OK, now I have some Fortress ES210 Mesh Networking Tactical Bridge radios and 2 Openmokos. I have them networked to my Netbook as follows:

Netbook Ethernet connection (eth0) IPaddress: 192.168.0.1/24
Fortress ES210 #1: Connected to netbook with Ethernet AUX port, IP address: 192.168.0.2
Fortress ES101 #2: Connected to ES210 #1 Over Fast Path Mesh Wireless G connection
Openmoko Connected to ES210#2 via USB/Ethernet Adapter (eth0: 192.168.0.5) and USB0 (192.168.0.6)

to set up the connection, bring down both interfaces on Openmoko:

ifconfig usb0 down
ifconfig eth0 down


then assign them new ip addresses:

ifconfig eth0 192.168.0.5
ifconfig usb0 192.168.0.6

then bring both interfaces up again:

ifconfig usb0 up
ifconfig eth0 up

assuming your Radios are up and have ip addresses (192.168.0.2 [FORTRESS1] and 192.168.0.3 [FORTRESS2]), and the Netbook interface eth0 has ipaddress: 192.168.0.1, you should now be able to ping across in both directions.

Next step: create a script to do this in "/home/hackable1" on the phone to run. Right now, every time the phone goes to sleep we have to re-run these commands.

Was able to install all previous apps on "Josh" and also added "iperf" for load testing. Also got "Josh" set up with Tango GPS and used it for GPS data using TangoGPS via USB netoworking.

Configuring TangoGPS:

First off, you must run TangoGPS as root. Next, you click on the "i" information Icon on the left side of the GPS GUI and scroll over using the right arrrow and there is a place to enter the IP address and port of your GPSD.

Next step is to do this over the Radios.

Friday, July 23, 2010

Second phone loaded with Hackable1

Today I received the shipment of 16GB SD cards so I proceeded to format one and load a clean install of Hackable1 on it. I have since wiped my OpenSUSE install from my netbook and loaded Windows7. So to do the card partition, format, and install I used an Ubuntu Netbook remix live USB installation. I tried to do the above in a VMWare install of Debian but I had some problems accessing the USB card reader. UBNR worked really well on an 8GB thumbstick, I used the persistent version with a 4GB partition for saving changes. I will keep this on my thumbstick since it was so handy.

Future Work

1. Test Tango GPS install on "Josh" (2nd Openmoko) and sync with laptop, download maps, etc.
2. Figure out position sharing and look into setting up alternate position sharing/map server

Thursday, July 22, 2010

Using the Neo Freerunner as a GPS receiver

This is fantastic, figured out how to use the Neo Freerunner as a GPS receiver for my Netbook. First off, I installed Debian 5.0 in VMWare Workstation onto my Acer Netbook running Windows 7. Then I booted the Freerunner which is running a version of Debian (Hackable1) , connected it to USB, and configured the USB0 port on the netbook using the following commands:

# iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24
# sysctl -w net.ipv4.ip_forward=1
# ifconfig usb0 192.168.0.200

Once we have networking up and running we can now run TangoGPS on the Netbook, and then go into configuration and set the GPSD to point to the Freerunner, default IP is: 192.168.0.202 and the Port is 2947. Allow a few minutes for the Freerunner to acquire satellites and download map tiles. There are 3 map souces to choose from:

1. OSM - Open Street Map
2. Topo
3. Open Cycle Map

There is a 4th Google one but it is for testing only.

I am using OSM for now. It allows you to save tracks and using some other tools to upload those tracks into the OSM database. There is a tutorial on this at: www.tangogps.org/gps/cat/Documentation.

Thursday, July 8, 2010

Connectivity Test with 117G successful

Today I met with Josh Dixon and had him set up an IP subnet on the 117G radio (10.1.10.2 IP for the radio, and 10.1.10.1 for the Openmoko). After connecting the USB to Ethernet adapter to the 117G's Ethernet cable, then connecting the USB cable with adapter to the Openmoko and switching on USB host mode, we were able to ping from phone to radio and vice versa. This is very good. Now to work on some applications to use for TNT which is starting on August 9th.

Saturday, July 3, 2010

We have contact!

EUREKA, EUREKA, EUREKA. FINALLY able to ping across Ethernet to Openmoko using USB to Ethernet adapter! Trying to get my thoughts down quickly before I forget what made it work.

First thing is I switched from the "cross-over cable" to a "straight-through" Ethernet cable. Then I tried to "arping" from the OpenMoko phone to the Netbook and it said "Eth0" is down. Well holy smokes, there is an Eth0 interface now, that is new. So I tried:
ifconfig eth0 up

And Eureka, I now have an Eth0 interface on Openmoko in addition to my USB0. Now for the subnetting:

On the OpenMoko, I ran: ifconfig eth0 192.168.0.203/24 (usb0 is 192.168.0.202/24 by default)

Then I ran: route add -host 192.168.0.200 dev eth0 (to tell OM to use eth0 interface to reach netbook) and "Voila", I can now ping in both directions. Seems like a very simple setup, however this has been many weeks of research and pain just to figure out. Now we are cooking with Gas! The only minor problem now is that when the phone or PC suspends I have to retype all the commands. I should be able to automate this or write a script to do it from both sides. Yay, Yay, Yay, I can't say enough how happy I am right now. THIS IS AWESOME. I should be able to connect to the 117G now for a test, since I can configure the interface from the phone. I am running the Hackable1 distribution, which is based on Debian with the Lenny distribution set of packages. It includes the aptitude (apt-get) package management system.

So all at once, here is the setup:

Straight through Ethernet cable connected to Netbook, connected to Cisco USB300M, connected to mini-USB to USB-A adapter, connected to OpenMoko.

On Netbook run: ifconfig eth0 192.168.0.200/24

On OpenMoko run: long press AUX button and select 'toggle USB mode'
ifconfig eth0 192.168.0.203/24
ifconfig eth0 up
route add -host 192.168.0.200 dev eth0

ping away!

I can also SSH into the device. I don't have internet working yet, I've tried using IP forward and Masquerade on the Netbook side but something in my configuration is messing things up. No matter, the battery is getting low now so I'm switching back to USB networking.

Future work:
  1. Figure out a power solution, maybe using a USB hub or dual USB cable that will allow me to power the USB-Ethernet adapter and phone while connected via Ethernet.
  2. Write and turn in Thesis proposal
  3. Connect to 117G.
  4. Look for Apps for Demonstration purposes.i

Friday, July 2, 2010

Received new USB-Ethernet adapter today (MAC: 00:10:13:48:DC:C1), trying it out. When I switch to USB host mode this adapter shows up when I run 'lsusb', however still can't ping across. Running updates now, will download 'arping' to see if I can talk to it from one side or the other.

apt-get update
apt-get install upgrade

Run dpkg-reconfigure tzdata (to change timezone)

apt-get install arping

Monday, June 28, 2010

Debian is a bust, moving to Hackable1 distro

As the title states, Debian on Freerunner was a bust. It ran really slow in NAND, in fact, NAND turns out to be too small to run a decent distro with a full load out of tools. I installed Hackable (a variant of Debian for developers) onto NAND but then ran out of space when I started to add packages. So then I installed it onto my 16GB SD card and have begun to install packages to add functionality. Here is a list of packages installed so far:

Packages installed for Hackable1
1. First, apt-get install update and apt-get install upgrade
2. apt-get install perl (for building other packages)
3. apt-get install gcc
4. apt-get install busybox (for ifconfig and others)
5. apt-get install quagga (routing)
6. apt-get install ethtool
7. apt-get install binutils
8. apt-get install jamvm (Java virtual machine)
9. apt-get install linphone (VOIP software for linux) (as of 28 July not working)
10. apt-get install twinkle (same as above)


I've tried hooking up the USB to Ethernet adapter to the phone and have had no luck so far. When I switch the OpenMoko to host mode I get the blue LED on the Ethernet adapter, however the Phone does not recognize the adapter. I can not ping from the phone to my Netbook through the adapter. I've begun investigating Quagga and Ethtool to see if some additional configuration is needed to get the adapter to route traffic. When I plug the adapter into my Netbook running OpenSUSE 11.2 it recognized it immediately and assigns it an interface name (Eth3). No such luck upon plugging it into the phone.

Monday, June 21, 2010

Open Moko NeoFR configuration and development

Quick Recap
OK, so I've had the NeoFR's for a few months now and have learned some really tough lessons. Most recently, concerning Android: It works great out of the box for the FR as a usable phone, however it is worthless to me since you can't access the USB port. This may be helpful down the line in my thesis when I touch on the subject of security, but for now establishing a connection with the Radio is of paramount importance.

Things I've learned: You need 2 main files for the FreeRunner: a root file system and kernel. These can either be installed on the SD card or into NAND memory (AKA: Flash). The rfs files can be downloaded directly or as a tarball and unzipped onto either the SD card or into NAND. If you put a rootfs and kernel on the SD card, you can boot into NOR (hold AUX, then press power) and boot into whatever distribution you have on the SD. THIS WILL NOT INSTALL THE DISTRO. Some distros come with an installation script, which can wipe out your SD card so it is important to backup the SD card before using an installation script. To backup the SD card use:


dd if=/dev/mmcblk0 | ssh user@backup.server "gzip -9 > sdcard.gz"

This will create a compressed backup of your card performing the compression on the backup server (assuming that it's more powerful than 400MHz). To restore, run the following from your backup server:

zcat sdcard.gz | ssh root@freerunner.address dd of=/dev/mmcblk0

This is from the DebianOnFreerunner wiki. I have decided to load Debian using their install script (install.sh). So now I am backing up the SD card which contains a vanilla OM2009 image that I copied over after removing Android.