| Task | Subtask | Desc | Start | End | Remark |
|---|---|---|---|---|---|
| Adhoc network | unknown | unknown | |||
| start adhoc | run modprobe/ip from app(fishmesh) | ||||
| fine tune adhoc app | |||||
| DTN | setup dtn network | unknown | unknown | ||
| Study DTN2 code | |||||
| Study Bytewalla code | |||||
| Test dtn android/laptop/alix | notes | ||||
| get ibr-dtn to work with dtn2 | notes | ||||
| port ibrdtn for android | 15 jan 2012 | 18 feb 2012 | notes . Android-ndk-r7 can't compile ibrdtn source. Continue with bytewalla 5 | ||
| Setup DTN network with bytewalla, dtn2. | setup scenario with bytewalla and dtn2 i) topology ii) write test app for dtn2 & bytewalla iii) study bytewalla 5 middleware | 20 feb 2012 | 27 feb 2012 | ||
| — compile and run dtn2 | 21 feb 2012 | 23 feb 2012 | Notes: Compile and run dtn2 | ||
| Sample dtn app | — | 24 feb 2012 | 28 feb 2012 | -=High=- | |
| — Android dtn app dtnchat | 24 feb 2012 | 26 Mar 2012 | see implementation note on this page. | ||
| — c++ dtn app dtnchat | 24 feb 2012 | 1 Mar 2012 | NA | ||
| — Android dtn demo app wiht Foto functionalities | – | – | NA | ||
| Broadcast dtn discovery info with olsr | — | – | – | -= pri. objective =- | |
| Olsrd plugin to get dtn discovery info | 07 Apr 2012 | 30 May 2012 | NA | ||
| dtn plugin to send discovery info to olsrd | 07 Apr 2012 | 15 Apr 2012 | NA | ||
| bytewalla OlsrDiscovery to exchange discovery info with olsrd | 07 Jun 2012 | – | NA | ||
| Control & status app/widgets | — | – | – | -= pri. objective =- | |
| — tentative: integrate with bytewall or write own app with wlan, olsr, dtn control | – | – | NA | ||
| dtn routing with olsrd | sec. objective |
Daemon directly for matters conerning routing decision.
route add default wlan0
or
route add 0.0.0.0 wlan0
"conv_layers": [
{"cl_type": "tcp", "inteval": 30, "inet_addr": "0.0.0.0", "inet_port": 52241, "name_len": 15},
{"cl_type": "tcp", "inteval": 30, "inet_addr": "0.0.0.0", "inet_port": 52241, "name_len": 15}],
"geo": {"lat": 999, "long": 999}}]
} </code>
</code>
System.make will be overwritten when rerun ./configure. It's better to make these configuration with autotools: TODO.
research : Linux netlink routing.
Olsrd has a plugin parser. A plugin registers its socket with olsrd together with an action-function. The sockets are checked for read/write/error events with select() in the scheduler. If en event exist for a registered socket, the action-function is called.
If a plugin plays server socket role and wants to keep the connection with client, it should register the client socket with olsrd. When a server socket is registerd with olsrd, it is only put in fd_set when a client call connect(). Checking read/write on server socket will return '0'.
Compile oasys:
1) edit $oasys/aclocal/xerces-c.ac to check for correct path of xercesc-27.
2) run ./build-configure to generate new configure file.
3) run ./configure –with–xerces-c=xercesc-2.7.0. NOTE: currently the path is hardcoded in aclocal/xerces-c.ac.
On Sat, Dec 3, 2011 at 10:16 PM, Elwyn Davies <davieseb at scss.tcd.ie> wrote:
Hi.
It appears that the Oasys configure system does not barf if given an
installation of Xerces-C++ Verion 3.x. Since Oasys requires
Version 2.x.y of Xerces-C++ where x >= 6, but will not compile/link with
version 3.x, aclocal/xerces-c.ac
should detect versions equal to or
higher than 3.0.0 and throw an error.
A suitable patch is attached. If you apply this to
oasys/aclocal/xerces-c.ac
, it is necessary to run
oasys/build-configure.sh to remake oasys/aclocal.m4 and the configure
script. This in turn assumes that you have the autoconf tools package
installed.
The Sourceforge repository normally contains updated versions of
aclocal.m4, the configure script, etc.
Commiserations to Gokul Nath who has been struggling with this problem
today.
Compile dtn2:
***Note: Using xerces-270. Dirnames for include and lib are not consistent. Correct configure files accordingly:
/usr/include/xercesc-2.7.0/ /usr/lib/xerces-c-2.7.0/ <-- xerces(-)c-2.7.0
There is problem with libdb 5.2: can not init berkeley database. Set libdb's version in System.make to use ver 4.8
24 SYS_EXTLIB_CFLAGS = -I/usr/include/xercesc-2.7.0 25 SYS_EXTLIB_LDFLAGS = -ldl -lm -ltcl8.5 -L/usr/lib/xerces-c-2.7.0 -lxerces-c -lreadline -lz -ldb-4.8 -lpthrea d -ljson 26
... DB_ENV->memp_stat interface... can't initialize berkeleydb: -1000
Configure make/Makefile.android to crosscompile olsrd:
30 PREFIX ?= /data/local 31 SBINDIR = $(PREFIX)/bin 32 ETCDIR = $(PREFIX)/etc 33 LIBDIR = $(PREFIX)/lib 34 DOCDIR = 35 MANDIR = 36 37 SRCS += $(wildcard src/linux/*.c src/unix/*.c) 38 HDRS += $(wildcard src/linux/*.h src/unix/*.h) 39 40 CPPFLAGS += -Dlinux -DLINUX_NETLINK_ROUTING 41 CPPFLAGS += -Dandroid -DANDROID 42 43 # bionic libc: missing declaration 44 CPPFLAGS += -DINET_ADDRSTRLEN=16 45 # bionic libc: missing declarations 46 CPPFLAGS += -D'IPTOS_PREC(tos)=((tos)&0xe0)' 47 CPPFLAGS += -D'IPTOS_TOS(tos)=((tos)&0x1e)' 48 CPPFLAGS += -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\" 49 50 # Compilation flags from build/toolchains/arm-eabi-4.2.1/setup.mk 51 CPPFLAGS += \ 52 -march=armv5te -mtune=xscale \ 53 -msoft-float -fpic \ 54 -mthumb-interwork \ 55 -ffunction-sections \ 56 -funwind-tables \ 57 -fstack-protector \ 58 -fno-short-enums \ 59 -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ \ 60 -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ 61 ifeq ($(DEBUG),0) 62 CPPFLAGS += \ 63 -fomit-frame-pointer \ 64 -fstrict-aliasing \ 65 -funswitch-loops \ 30 PREFIX ?= /data/local 31 SBINDIR = $(PREFIX)/bin 32 ETCDIR = $(PREFIX)/etc 33 LIBDIR = $(PREFIX)/lib 34 DOCDIR = 35 MANDIR = 36 37 SRCS += $(wildcard src/linux/*.c src/unix/*.c) 38 HDRS += $(wildcard src/linux/*.h src/unix/*.h) 39 40 CPPFLAGS += -Dlinux -DLINUX_NETLINK_ROUTING 41 CPPFLAGS += -Dandroid -DANDROID 42 43 # bionic libc: missing declaration 44 CPPFLAGS += -DINET_ADDRSTRLEN=16 45 # bionic libc: missing declarations 46 CPPFLAGS += -D'IPTOS_PREC(tos)=((tos)&0xe0)' 47 CPPFLAGS += -D'IPTOS_TOS(tos)=((tos)&0x1e)' 48 CPPFLAGS += -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\" 49 50 # Compilation flags from build/toolchains/arm-eabi-4.2.1/setup.mk 51 CPPFLAGS += \ 52 -march=armv5te -mtune=xscale \ 53 -msoft-float -fpic \ 54 -mthumb-interwork \ 55 -ffunction-sections \ 56 -funwind-tables \ 57 -fstack-protector \ 58 -fno-short-enums \ 59 -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ \ 60 -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ 61 ifeq ($(DEBUG),0) 62 CPPFLAGS += \ 63 -fomit-frame-pointer \ 64 -fstrict-aliasing \ 65 -funswitch-loops \ 30 PREFIX ?= /data/local 31 SBINDIR = $(PREFIX)/bin 32 ETCDIR = $(PREFIX)/etc 33 LIBDIR = $(PREFIX)/lib 34 DOCDIR = 35 MANDIR = 36 37 SRCS += $(wildcard src/linux/*.c src/unix/*.c) 38 HDRS += $(wildcard src/linux/*.h src/unix/*.h) 39 40 CPPFLAGS += -Dlinux -DLINUX_NETLINK_ROUTING 41 CPPFLAGS += -Dandroid -DANDROID 42 43 # bionic libc: missing declaration 44 CPPFLAGS += -DINET_ADDRSTRLEN=16 45 # bionic libc: missing declarations 46 CPPFLAGS += -D'IPTOS_PREC(tos)=((tos)&0xe0)' 47 CPPFLAGS += -D'IPTOS_TOS(tos)=((tos)&0x1e)' 48 CPPFLAGS += -DOLSRD_GLOBAL_CONF_FILE=\"$(CFGFILE)\" 49 50 # Compilation flags from build/toolchains/arm-eabi-4.2.1/setup.mk 51 CPPFLAGS += \ 52 -march=armv5te -mtune=xscale \ 53 -msoft-float -fpic \ 54 -mthumb-interwork \ 55 -ffunction-sections \ 56 -funwind-tables \ 57 -fstack-protector \ 58 -fno-short-enums \ 59 -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ \ 60 -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ 61 ifeq ($(DEBUG),0) 62 CPPFLAGS += \ 63 -fomit-frame-pointer \ 64 -fstrict-aliasing \ 65 -funswitch-loops \ 66 -finline-limit=300 67 else 68 CPPFLAGS += \ 69 -fno-omit-frame-pointer \ 70 -fno-strict-aliasing 71 endif 72 73 PLUGIN_SONAME ?= $(PLUGIN_NAME) 74 PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER) 75 INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \ 76 /sbin/ldconfig -n $(LIBDIR) 77 UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \ 78 /sbin/ldconfig -n $(LIBDIR) 79 80 ifdef OLSRD_PLUGIN 81 GENERATE_PIC = true 82 endif 83 84 ifdef GENERATE_PIC 85 CFLAGS += -fPIC 86 LDFLAGS += -fPIC 87 endif 88 89 #NDK = /opt/android-ndk-r4b 90 NDK = /home/td/devfs/opt/android-ndk-r7-crystax-4 91 NDK_ARCH = $(NDK)/platforms/android-8/arch-arm 92 93 ifneq ($(shell uname -m),armv6l) 94 # You are not compiling with Debian direct on the phone 95 CURRENT_SYSTEM = $(shell uname -s | tr A-Z a-z) 96 #CROSS_COMPILE = $(NDK)/build/prebuilt/$(CURRENT_SYSTEM)-x86/arm-eabi-4.2.1/bin/arm-eabi- 97 CROSS_COMPILE = $(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/$(CURRENT_SYSTEM)-x86/ bin/arm-linux-androideabi- 98 CC = $(CROSS_COMPILE)gcc 99 ifeq ($(DEBUG),0) 100 STRIP = $(CROSS_COMPILE)strip 101 endif 102 endif 103 104 CFLAGS += -I$(NDK_ARCH)/usr/include 105 CFLAGS += -I$(TOPDIR)/android 106 CFLAGS += -I$(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linu x-androideabi/4.4.3/include 107 108 LDFLAGS += -nostartfiles -nodefaultlibs -nostdlib -Bdynamic 109 LDFLAGS += -Wl,--dynamic-linker -Wl,/system/bin/linker 110 LDFLAGS += -L$(NDK_ARCH)/usr/lib 111 LDFLAGS += -L$(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-lin ux-androideabi/4.4.3/ 112 LDFLAGS += -Wl,-rpath-link -Wl,$(NDK_ARCH)/usr/lib 113 LDFLAGS += -llog 114 115 # __mb_sb_limit localeconv 116 ifdef OLSRD_PLUGIN 117 #LDFLAGS += -L$(NDK)/sources/crystax/libs/armeabi-v7a/4.4.3 118 #LDFLAGS += -lcrystax_shared 119 endif 120 121 ifndef OLSRD_PLUGIN 122 LDFLAGS += $(NDK_ARCH)/usr/lib/crtbegin_dynamic.o 123 endif 124 125 LIBS += $(NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/lib/gcc/arm-linux-an droideabi/4.4.3/libgcc_eh.a 126 LIBS += -Wl,-lc -Wl,-lm -Wl,-lgcc 127 ifndef OLSRD_PLUGIN 128 LIBS += $(NDK_ARCH)/usr/lib/crtend_android.o 129 endif 130 OS_LIB_DYNLOAD = -ldl 131 132 # Local Variables: 133 # mode: makefile 134 # End:
compile olsrd:
make OS="android"
Directly compile jansson src together with olsrd src does not work. Compile a jansson .so using android maker and use it as ext lib when compile olsrd for android.
Download jansson-android src:
https://github.com/julienr/jansson-android.git
Compile it. If there is problem with NDK's awk file, rename it to something else. Host's awk will be used instead.
Configure lib/dtndisc/Makefile:
39 OLSRD_PLUGIN = true 40 PLUGIN_NAME = olsrd_dtndisc 41 PLUGIN_VER = 0.1 42 43 TOPDIR = ../.. 44 include $(TOPDIR)/Makefile.inc 45 46 #LIBS += -ljson 47 ifeq ($(OS),android) 48 #JSONSRC = $(wildcard src/jansson/src/*.c *.c) 49 #CFLAGS += -I./src/jansson/src 50 #JSONSRC = $(wildcard src/jansson-android/jni/*.c *.c) 51 CFLAGS += -I./src/jansson-android/jni 52 LDFLAGS += -L./libs/armeabi 53 LIBS += -ljansson 54 else 55 JSONSRC = $(wildcard src/json-c/*.c *.c) 56 CFLAGS += -I./src/json-c 57 endif 58 59 OBJS += $(JSONSRC:%.c=%.o) 60 default_target: $(PLUGIN_FULLNAME) 61 62 $(PLUGIN_FULLNAME): $(OBJS) version-script.txt 63 @echo "[LD] $@" 64 @$(CC) $(LDFLAGS) -o $(PLUGIN_FULLNAME) $(OBJS) $(LIBS) 65 66 install: $(PLUGIN_FULLNAME) 67 $(STRIP) $(PLUGIN_FULLNAME) 68 $(INSTALL_LIB) 69 70 uninstall: 71 $(UNINSTALL_LIB) 72 73 clean: 74 rm -f $(OBJS) $(SRCS:%.c=%.d) $(PLUGIN_FULLNAME)
Bytewalla use local Binding mechanism to allow applications access to DTN functionalities. Upon binding with DTNService, a DTNAPIBinder is returned to client app. With this Binder, client app can register with DTNDaemon and send, receive DTN messages. The drawback of this is that application must be local to Bytewalla app. It's not possible for an independent app to communicate with Bytewalla this way.
Other ways of IPC within Android Platform is to use Messenger or AIDL. For this simple application Messenger is prefered over a full AIDL implementation. On Bytewalla side, a Service called DTNAPIService is implemented. On one hand, DTNAPIService is locally bound with DTNService so it is able to act as a client to DTNService. On the other hand, DTNAPIService communicate with an independent application wishing to send messages over DTN network. Messenger is the Mechanism that realize the communication with client app. Message semantic and protocol are defined in an external package called BytewallaApplib.
Message: dst, src, content, bundlespec info.