Table of Contents
Android Adhoc
DTN
Test dtn network
dtn2 bugs
- dtn2 only broadcasts on eth0 when available but not on wlan0 (in adhoc mode??).
- From alix no discovery packet is seen but dtn2 still find each others probably through lan.
error: dtn2 can't send discovery on adhoc netowrk
Dtn2 console says:
[1330295109.707816 /S10 notice] grep "S10 info" <dtnd-log-files> | grep -v grep | awk '{print $4,$5}' | sort -n
[1330295109.708351 /dtn/bundle/daemon notice] loading bundles from data store
localhost dtn% [1330295112.690826 /dtn/discovery/ip error] sendto failed: Network is unreachable (101)
Same problem described here: http://web.archiveorange.com/archive/v/YlDeyllZKnyNUlc6ZtWr
error: dtnd crashes on alix
[946687563.318758 /dtn/bundle/daemon info] BUNDLE_RECEIVED (from data store) bundle id 1434 [dtn://geith-thinkpad-t420.dtn/test -> dtn://geith-netbook.dtn/test 5 byte payload] prevhop dtn:none (0 bytes recvd) [946687563.319265 /dtn/bundle/daemon warning] bundle id 1434 arrived with creation time in the future (377011541 > 2763) [946687563.319477 /dtn/bundle/expiration info] adding bundle to pending list [946687563.320202 /dtn/bundle/protocol info] BundleDaemon::handle_bundle_received: end [946687563.321277 /dtn/bundle/protocol info] handle_bundle_received: begin [946687563.321896 /dtn/storage warning] DurableStoreImpl::beginTransaction not implemented. [946687563.322501 /dtn/storage warning] error in beginTransaction; releasing lock and DS_ERR [946687563.323225 /S10 info] 2000-01-01 00:46:03,946687563.323162,dtn://alarm-dtn-thuy.dtn,FROMDB,5,dtn://geith-thinkpad-t420.dtn/test,377011556.214,dtn://geith-netbook.dtn/test,3600,,,,,0.000000,,0, [946687563.323675 /dtn/bundle/daemon info] BUNDLE_RECEIVED (from data store) bundle id 1443 [dtn://geith-thinkpad-t420.dtn/test -> dtn://geith-netbook.dtn/test 5 byte payload] prevhop dtn:none (0 bytes recvd) [946687563.324180 /dtn/bundle/daemon warning] bundle id 1443 arrived with creation time in the future (377011556 > 2763) [946687563.324398 /dtn/bundle/expiration info] adding bundle to pending list [946687563.325115 /dtn/bundle/protocol info] BundleDaemon::handle_bundle_received: end [946687563.755254 /dtn/link/link-0 info] new link link-0 [192.168.1.100:4556 dtn:none OPPORTUNISTIC tcp state=UNAVAILABLE] [946687563.756242 /dtn/bundle/daemon info] LINK_CREATED link-0 [192.168.1.100:4556 dtn://tdfed.dtn OPPORTUNISTIC tcp state=UNAVAILABLE] ASSERTION FAILED (iter->remote_eid() == EndpointID::NULL_EID() || iter->remote_eid() == link->remote_eid()) at bundling/ForwardingLog.cc:54 STACK TRACE: 0x82e6d55 0x80afdbd 0x813154f 0x813bfad 0x813d8fe 0x813e1f7 0x813a988 0x813a90f 0x8132719 0x809f548 0x813a9be 0x8092fbb 0x8092f58 0x8093e0f 0x831144c 0x8311338 0xb71dd7b0
Solution
Problem due to timestamp of bundles after shutdown node. Clear bundle directory to void this error.
ibr-dtn
ibrdtn bugs
- ibrdtn only broadcast discovery on port 4551 and on eth0 (lan).
ibrdtn setup
Compiled daemon is in ibrdtnd-###/src/dtnd.
Configuration file is in ~/ibrdtnroot/ibrdtn.conf
Dtn apps are in ibrdtn-tools-###/src.
test ibrdtn with dtn2
- Configure discovery:
- Set config file ibrdtn.conf to use dnt2-compat discovery.
- ibrdtn use port 4551 to broadcast discovery message while dtn2 use 9556. This is hard coded so recompile ibrdtn to use port
* ibrdtn on laptop and android bytewalla4. static route to android is added to ibrdntd. sent/receive work fine. - EID is hard set for android in 'DTNService.getDefaultEID()'.
- =⇒ works well with dnt2.
Port ibrdtn for android
* Thomas wrote:
Ich habe an der Toolchain-Sache noch etwas weitergearbeitet. Die Android-Toolchain funktioniert nicht, da die verwendete libc nicht alle notwendigen Funktionen unterstützt. Deshalb habe ich mir jetzt eine andere Toolchain gesucht [1]. Die Build-Umgebung [2] habe ich im SVN abgelegt. Dort ist auch eine kurze README.txt. Momentan fehlt noch sqlite und openssl (habe ich erst einmal deaktiviert, sollten wir aber noch machen), daher läuft der Build von IBR-DTN noch nicht vollständig durch. Am Ende müssten wir IBR-DTN dann noch statisch linken. Du kannst ja, wenn es Dir wieder besser geht, an dieser Stelle weitermachen. Für sqlite kannst Du als Vorlage einfach die Datei libnl.sh nehmen. [1] http://code.google.com/p/android-group-korea/downloads/list?can=2&q=toolchain&colspec=Filename+Summary+Uploaded+ReleaseDate+Size+DownloadCount [2] https://cvs.dai-labor.de/svn/geith/dtn/ibrdtn-crossbuild
- TODO: static link zlib and netlink.
- try to compile with zlib enabled: uncomment 'compression' in ibrdtn-xx.sh.
- find out if static/dynamic linking affect the generated binary dtnd. It's doesn't run on android.
- crosscompiled dtnd doesn't run: “dtnd: not found” ???
- try static/dynamic link and analyse binary with objdump. apply to i686 and arm arche.
Doing
static dtnd linux
* create statically linked dtnd binary on linux. autotools.
0.0.0.1 methods inside nested static lib (.a) are not found.
Use common Makefile.am (like with dynamic libs) and call 'configure' with params:
./configure --enable-static --disable-dynamic
0.0.0.2 circularly dependent static libs with autotools. when not command line.
fyi: http://lists.gnu.org/archive/html/libtool/2005-08/msg00081.html
libtools solves it automatically.
0.0.0.3 statically link system library with autotools. when not libtools then use command line.
- with command line, user -static flag. With Automake.am, add binaryLDFLAGS= -static (-all-static). refs: http://sourceware.org/autobook/autobook/autobook_89.html * If the libs (libpthread, libc, libm…) are not found then yum install libc-static, libstdc++-static… * glibc (.so) still required. try disabling functions that need glibc according to this warning: <code> /home/td/ibrdtnarm/ibrdtnd-0.6.5/src/Main.cpp:151: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /home/td/ibrdtnarm/ibrcommon-0.6.5/ibrcommon/.libs/libibrcommon.a(tcpclient.o): In function `ibrcommon::tcpclient::open(std::basicstring<char, std::chartraits<char>, std::allocator<char> > const&, int, unsigned int)': /home/td/ibrdtnarm/ibrcommon-0.6.5/ibrcommon/net/tcpclient.cpp:89: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
</code>
Android stl support
More stl support (string, vector..) is packaged in '$NDK/sources/cxx-ctl/gnu-libstdc++/libs/armeabi/libgnustl_static.a