loading
I am currently looking for someone to help out with this blog. I didn't realize the scope that this blog would effect. Hits from countries in political strife and the like, people looking for a way to communicate outside of government control. If you would like to help please send me an email George dot Endrulat at Gmail dot Com.

Monday, April 11, 2011

How to get OLSR running on the Galaxy Samsung Android phone | www.olsr.org

How to get OLSR running on the Galaxy Samsung Android phone | www.olsr.org

How to get OLSR running on the Galaxy Samsung Android phone

Getting ad-hoc mode on Android

The german page android-hilfe.de describes quite nicely how to get ad-hoc mode running on the Samsung Galaxy.
For the non-german speakers here is a summary:

The trick is to use the wpa-supplication settings file to force the driver to go to ad-hoc mode. By the default the tiwlan cmd line utility does not understand ad-hoc mode.

  1. turn on Wi-Fi and start the adb shell
  2. go to wpa_cli command shell:
    su -c "/system/bin/wpa_cli -p /data/misc/wifi/"

  3. scan_resultsshows you the existing networks.
  4. add_networkadd a new network. Shows a number. Here the number is "2"
  5. set_network 2 mode 1
    set_network 2 ssid "olsr.freifunk.net"
    set_network 2 bssid 02:ca:ff:ee:ba:be
    set_network 2 frequency 2457
    set_network 2 key_mgmt NONE
    enable_network 2

  6. ap_scan 2
  7. select_network 2
  8. if this did not work, then try again:ap_scan 2
  9. This is now what you get:

    su -c "/system/bin/wpa_cli -p /data/misc/wifi/"
    wpa_cli v0.5.10
    Copyright (c) 2004-2008, Jouni Malinen and contributors

    This program is free software. You can distribute it and/or modify it
    under the terms of the GNU General Public License version 2.

    Alternatively, this software may be distributed under the terms of the
    BSD license. See README and COPYING for more details.

    Selected interface 'eth0'

    Interactive mode

    >
    <2>CTRL-EVENT-SCAN-RESULTS Ready
    scan_results
    bssid / frequency / signal level / flags / ssid
    00:16:38:e6:38:31 2412 -49 [WPA2-PSK-TKIP+CCMP] Sven-Ola
    00:16:38:e6:38:31 2412 -50 [WPA2-PSK-TKIP+CCMP] Sven-Ola
    02:ca:ff:ee:ba:be 2457 -40 [IBSS] olsr.freifunk.net
    >
    <2>CTRL-EVENT-SCAN-RESULTS Ready
    add_network
    2
    >
    <2>CTRL-EVENT-SCAN-RESULTS Ready
    set_network 2 mode 1
    OK
    > set_network 2 ssid "olsr.freifunk.net"
    OK
    > set_network 2 bssid 02:ca:ff:ee:ba:be
    OK
    > set_network 2 frequency 2457
    OK
    > set_network 2 key_mgmt NONE
    OK
    > enable_network 2
    OK
    > ap_scan 2
    <2>CTRL-EVENT-SCAN-RESULTS Ready
    OK
    > select_network 2
    OK
    <2>CTRL-EVENT-STATE-CHANGE id=1 state=0
    >
    <2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
    <2>CTRL-EVENT-STATE-CHANGE id=-1 state=0
    <2>CTRL-EVENT-STATE-CHANGE id=-1 state=2
    <2>Trying to associate with SSID 'olsr.freifunk.net'
    <2>CTRL-EVENT-STATE-CHANGE id=-1 state=3
    <2>CTRL-EVENT-STATE-CHANGE id=2 state=4
    <2>Associated with 02:ca:ff:ee:ba:be
    <2>CTRL-EVENT-STATE-CHANGE id=2 state=7
    <2>CTRL-EVENT-CONNECTED - Connection to 02:ca:ff:ee:ba:be completed (reauth) [id=2 id_str=]

    <2>CTRL-EVENT-SCAN-RESULTS Ready

    <2>CTRL-EVENT-STATE-CHANGE id=2 state=8
    <2>CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
    <2>CTRL-EVENT-STATE-CHANGE id=-1 state=8

    <2>CTRL-EVENT-STATE-CHANGE id=-1 state=2

    <2>CTRL-EVENT-SCAN-RESULTS Ready

    <2>CTRL-EVENT-SCAN-RESULTS Ready


Installing Olsr

For the Samsung Galaxy you can use the following file: pre compiled samsung android version of olsrd.
You might have to edit thedata/local/etc/olsrd.conffile to suite your needs.

Starting olsr

From the Terminal or adb shell:olsrd -f /data/local/etc/olsrd.conf -d 1. You should see some routes in your kernel routing table if you are connected to an ad-hoc network which has other olsr nodes.

Credits: thanks to Sven-Ola Tücke for finding all this out!

No comments:

Post a Comment