ProjectSPAN / android-manet-manager

SPAN - Android Manet Manager
72 stars 37 forks source link

How do I modify OLSR? #8

Open sookoor opened 11 years ago

sookoor commented 11 years ago

I am trying to modify the OLSR protocol in MANET Manager to be used for resource discovery similar to the approach described in the paper titled "Service Discovery using OLSR and Bloom Filters".

The OLSR implementation in MANET Manager is a binary, /res/raw/olsrd, so I downloaded olsrd-0.6.6 from here:

http://www.olsr.org/?q=download

compiled it and replaced the binary on MANET Manager to see if it was replaceable. On an Android device the MANET Manager starts up, but when the startAdhocBtn is pressed and ad-hoc mode is started two buttons are displayed on the main screen, one showing it started and the other showing it stopped as shown in the first screenshot. When I click the Route Info menu option, MANET Manager crashes as shown in the second screenshot.

Am I using an incorrect version of olsrd? If so, what version should I use? Or, have you modified the default olsrd for MANET Manager? If so, how can I get access to the modified source code?

Thanks,

Tamim

mainwhenad_hocmodestarted manetmanagercrasheswhenroutinginfoselectedfrommenu

jrobble commented 11 years ago

Hi Tamim,

Cool. Service discovery is on our top ten list of desired features. Once you've implemented it, I hope you push your work open source or share it with us in some way.

You're right. You just need to replace the olsrd binary in /res/raw. According to your screen shot, you were able to successfully put your device's Wi-Fi into ad-hoc mode, but there was a problem running the olsrd binary.

The version of olsrd included in the Manet Manager is compiled from this source: https://github.com/ProjectSPAN/android-manet-olsrd

Note that olsrd has gone through a few updates since I grabbed their source, so you might want to start with what they have posted on their site (which it looks like you're doing).

You might want to try running "adb shell" to get a shell session to your device, running "su", and then executing the olsrd binary directly from the command line. You should be able to do something like:

/data/data/org.span/bin/olsrd

Refer to this file: https://github.com/ProjectSPAN/android-manet-manager/blob/master/AndroidManetManager/src/org/span/service/routing/OlsrProtocol.java

Here's how it's executed in the code:

String command = CoreTask.DATA_FILE_PATH + "/bin/olsrd" + " -f " + CoreTask.DATA_FILE_PATH + "/conf/olsrd.conf" + " -d 6" + " -ignore " + CoreTask.DATA_FILE_PATH + "/conf/routing_ignore_list.conf";

Note the "-ignore" option is a customization I made for blacklisting peers. It helps with testing multi-hop.

On Thu, Aug 29, 2013 at 10:03 AM, Tamim Sookoor notifications@github.comwrote:

I am trying to modify the OLSR protocol in MANET Manager to be used for resource discovery similar to the approach described in the paper titled "Service Discovery using OLSR and Bloom Filters".

The OLSR implementation in MANET Manager is a binary, /res/raw/olsrd, so I downloaded olsrd-0.6.6 from here:

http://www.olsr.org/?q=download

compiled it and replaced the binary on MANET Manager to see if it was replaceable. On an Android device the MANET Manager starts up, but when the startAdhocBtn is pressed and ad-hoc mode is started two buttons are displayed on the main screen, one showing it started and the other showing it stopped as shown in the first screenshot. When I click the Route Info menu option, MANET Manager crashes as shown in the second screenshot.

Am I using an incorrect version of olsrd? If so, what version should I use? Or, have you modified the default olsrd for MANET Manager? If so, how can I get access to the modified source code?

Thanks,

Tamim

[image: mainwhenad_hocmodestarted]https://f.cloud.github.com/assets/2413557/1050060/bc164332-10b3-11e3-94ee-182c7186741e.png [image: manetmanagercrasheswhenroutinginfoselectedfrommenu]https://f.cloud.github.com/assets/2413557/1050061/bc2cffc8-10b3-11e3-8dfa-654b6feb8e7e.png

— Reply to this email directly or view it on GitHubhttps://github.com/ProjectSPAN/android-manet-manager/issues/8 .

sookoor commented 11 years ago

Thank you very much for your prompt response. I downloaded the source from android-manet-olsrd and am trying to compile it, but keep getting errors. I run the make command as follows:

"make OS=android" with the latest android-ndk and I get the following errors:

/home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_load_dl:src/plugin_loader.c:102: error: undefined reference to 'dlopen' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_load_dl:src/plugin_loader.c:106: error: undefined reference to 'dlerror' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_load_dl:src/plugin_loader.c:115: error: undefined reference to 'dlclose' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_add_dl:src/plugin_loader.c:168: error: undefined reference to 'dlsym' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_add_dl:src/plugin_loader.c:175: error: undefined reference to 'dlerror' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_add_dl:src/plugin_loader.c:206: error: undefined reference to 'dlsym' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_add_dl:src/plugin_loader.c:208: error: undefined reference to 'dlerror' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_add_dl:src/plugin_loader.c:215: error: undefined reference to 'dlsym' /home/tsookoor/android-ndk-r9_64/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: src/plugin_loader.o: in function olsr_close_plugins:src/plugin_loader.c:317: error: undefined reference to 'dlclose' collect2: ld returned 1 exit status make: *\ [olsrd] Error 1

Any help with resolving this issue would be greatly appreciated.

Thanks,

Tamim