BatPhone Install Instructions / Asterisk on Android

835 views
Skip to first unread message

Paul Gardner-Stephen

unread,
Jul 18, 2010, 5:00:23 PM7/18/10
to village-telco-dev
Hello all,

This post is really just to say that I have uploaded a PDF that
describes how to setup Serval's BatPhone software on an HTC Dream aka
G1 phone from scratch. See the file in the files section of the
village-telco-dev Google group page.

This includes a port of asterisk for android that can be used by
anyone.

It also includes a patched version of sipdroid that will talk to a
local instance of asterisk, even if you have no data connection.

Paul.

Paul Gardner-Stephen

unread,
Aug 12, 2010, 12:50:53 PM8/12/10
to village-telco-dev
Hello,

We compiled for Android 2.0, but it should be possible to build
against 1.6 if you grab the source from online. The .tgz files that
correspond (more or less) to the APK files are the source for them.
You will need eclipse and the Android SDK. I am not sure if there are
any hard 2.0 dependencies in the code. If there are, it is just for
the GUI elements; the DNA and BATMAN binaries should both run. The
main problem you are likely to encounter with the BATMAN binary is
that the kernel on your phone probably won't support policy based
routing by default, which will mean you need to recompile that or be
exceptionally lucky and find a pre-built module.

We have some Cunning Plans(tm) to side-step the policy-routing
requirement, but are not there just yet.

Paul.

On Aug 12, 2:26 pm, hlabishi kobo <hlabis...@gmail.com> wrote:
> Hi, I tried to install the serval software on Sonny Ericsson X10i which runs
> android 1.6 but i get this error *Failure [INSTALL_FAILED_OLDER_SDK]*. i
> looked at the google group's threads and i understantd it might have
> something to do with compatibility of android's versions. On which version
> of android did you compile the serval software applications?
> thanks
> Hlabishi
>
> On Sun, Jul 18, 2010 at 11:00 PM, Paul Gardner-Stephen <
> > --
> > You received this message because you are subscribed to the Google Groups
> > "village-telco-dev" group.
> > To post to this group, send email to village-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > village-telco-...@googlegroups.com<village-telco-dev%2Bunsubscr i...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/village-telco-dev?hl=en.

Paul Gardner-Stephen

unread,
Aug 18, 2010, 7:37:58 PM8/18/10
to village-telco-dev
Hello,

On Aug 18, 6:45 pm, hlabishi kobo <hlabis...@gmail.com> wrote:
> Hello
> I get the feeling that maybe i am doing something wrong becasue i changed
> the properties to build against android 1.6 but there are errors on the
> android.thether.system method.
> Hlabishi

Can you show me the errors?
It may be that there are some parts of the code that just cannot work
on 1.6.

Paul.

> On Thu, Aug 12, 2010 at 6:50 PM, Paul Gardner-Stephen <
> > > > village-telco-...@googlegroups.com<village-telco-dev%2Bunsubscr­i...@googlegroups.com><village-telco-dev%2Bunsubscr

hlabishi kobo

unread,
Aug 18, 2010, 7:47:28 PM8/18/10
to village-...@googlegroups.com
The errors are in the bluetooth methods, BluetoothService_eclair.java and BluetoothService.java. I was actually suprised to see a bluetooth code in the source.
BluetoothAdapter cannot be resolved   
BluetoothAdapter cannot be resolved
BluetoothAdapter cannot be resolved
BluetoothAdapter cannot be resolved
BluetoothAdapter cannot be resolved
BluetoothAdapter cannot be resolved
BluetoothAdapter cannot be resolved
ECLAIR cannot be resolved or is not a field

To unsubscribe from this group, send email to village-telco-...@googlegroups.com.

Paul Gardner-Stephen

unread,
Aug 19, 2010, 7:06:18 PM8/19/10
to village-telco-dev
Hello,

Okay. Just strip out all the bluetooth stuff, as we are not using it
anyway. Remove the classes, and then any references to them.
Not ideal, but it should get you in the air.

Paul.

hlabishi kobo

unread,
Oct 28, 2010, 9:51:30 AM10/28/10
to village-...@googlegroups.com
Dear Paul

I managed to install the serval batphone on HTC desire following your serval batphone how to document, however when i start BATMAN DNA server and Asterisk fails to start. i compiled DNA and asterisk as documented but i am stuck on the Batphone building part. Could you please take me through the build process of the batman apk from the binaries.

Thanks & Regards
Hlabishi


To unsubscribe from this group, send email to village-telco-...@googlegroups.com.

Paul Gardner-Stephen

unread,
Oct 28, 2010, 8:19:49 PM10/28/10
to village-telco-dev
Great news that you have it on the desire.
Regarding the build problems, the existing batphone helper APK should
just work on the desire, as should the serval-data.data-*.tgz archive.
What happens when you run from the phone's shell as root:

/data/data/org.servalproject/sbin/asterisk
ps | grep linux
/data/data/org.servalproject/bin/dna
ps | grep dna

The Desire has an ARM based processor I presume?

Also, we have an updated data.data archive that I will upload once I
get a chance. The new version allows DNA brokered calls to connect in
less than 1 second in most cases, and adds a nice DNA debugging
features into asterisk: serval dna lookup <phone number> from the
asterisk CLI.

Paul.

hlabishi kobo

unread,
Oct 29, 2010, 6:12:50 PM10/29/10
to village-...@googlegroups.com
Dear Paul

when i run grep from (adb shell), it returns grep not found. The batphone helper and data.data-*.tgz installed fine. I got stuck on the last part where you have to build batman apk from binaries. however when i start the serval batphone app, everything starts successfully except BATMAN, DNA server and Asterisk. I did cross compile asterisk and dna through scratchbox and have put the astdroid.tar in the phone but the instruction are not clear as to what to do with the compiled dna. Hope you understand my problem.

Thanks and kind regards

To unsubscribe from this group, send email to village-telco-...@googlegroups.com.

Paul Gardner-Stephen

unread,
Oct 29, 2010, 10:37:24 PM10/29/10
to village-telco-dev
Hi,

On Oct 30, 8:12 am, hlabishi kobo <hlabis...@gmail.com> wrote:
> Dear Paul
>
> when i run grep from (adb shell), it returns grep not found. The batphone
> helper and data.data-*.tgz installed fine. I got stuck on the last part
> where you have to build batman apk from binaries. however when i start the
> serval batphone app, everything starts successfully except BATMAN, DNA
> server and Asterisk. I did cross compile asterisk and dna through scratchbox
> and have put the astdroid.tar in the phone but the instruction are not clear
> as to what to do with the compiled dna. Hope you understand my problem.

First, what ROM are you using? We use cyanogenmod because it has
decent tools like grep installed by default.
It also has policy based routing support which bastman needs.

Second, perhaps you are doing too much work, as the APK files should
work fine on the Desire without having to rebuild them.
This is easy to test by installing the serval-data.data-*.tgz archive,
and then try running /data/data/org.servalproject/bin/dna
If it runs (and displays some usage info), then it is compatible with
the binaries included in the pre-built APK and TGZ files.
My understanding is that the Desire should be binary compatible with
the G1 and N1.

However, if you are recompiling everything, then install the serval-
data.data-*.tgz archive on the phone, and put the new DNA binary in /
data/data/org.servalproject/bin in place of the old binary.
Similarly, the asterisk binary will need to go into /data/data/
org.servalproject/sbin, but do not replace the wrapper which is still
needed at this stage, so I think it is asterisk.bin that you will need
to copy the asterisk binary over (I don't have a phone on me to check
right now).

Hope that helps,

Paul.

Paul Gardner-Stephen

unread,
Nov 1, 2010, 10:29:39 PM11/1/10
to village-telco-dev
Hmm... Can you send me some screen captures / digital photos of what
you are trying to do and where it is going wrong so that I can help
debug it?

Send them direct to pa...@servalproject.org

Paul.

On Nov 2, 2:11 am, hlabishi kobo <hlabis...@gmail.com> wrote:
> HI Paul
>
> I installed cyanogenmod 6.0.2 for htc desire but still there is no much
> change with the serval batphone i.e the BATMAN, Asterisk and DNA server
> still fails to start. i tried running the
> /data/data/org.servalproject/bin/dna using ./dna (i am not sure if  i am
> running it correctly) and got permission denied then i put 'su' before the
> command but did not get any user information.
>
> Regards
>
> On Sat, Oct 30, 2010 at 4:37 AM, Paul Gardner-Stephen <
> ...
>
> read more »
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages