0

Chat App Problem

asked 2014-10-31 20:41:48 -0800

nick2014 gravatar image

updated 2014-10-31 20:42:37 -0800

Hi,

I've downloaded the SDK file "alljoyn-14.06.00a-android-sdk-dbg.zip" and trying out the chat application that is inside core/alljoyn-14.06.00a-dbg/java/samples. I'm using 2 different Nexus 7 (2012) devices running CM 10 (Cynogenmod 10 - running Android 4.2.2) and the other Nexus 7 is running KitKat 4.4.4.

I create a sample channel from both the tablet and able to see it (I'm using WiFi), but when trying to connect to it getting the following error

10-29 07:09:08.625  1281  1294 I chat.AllJoynService: doJoinSession()
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.093 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6523 | SessionListener_create()
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.093 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:3071 | JSessionListener::JSessionListener()
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.093 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:3075 | JSessionListener::JSessionListener(): Taking weak global reference to SessionListener 0x41508f00
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.093 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6058 | BusAttachment_joinSession()
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.094 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6105 | BusAttachment_joinSession(): Refcount on busPtr is 3
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.094 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6113 | BusAttachment_joinSession(): Taking strong global reference to SessionListener 0x41508f00
10-29 07:09:08.625  1281  1294 D ALLJOYN_JAVA:  112.094 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6137 | BusAttachment_joinSession(): Call JoinSession(org.alljoyn.bus.samples.chat.rahul, 27, 0x65d15478, 0,  <0x01, 1, 0xff, 0xfe7f>)
10-29 07:09:08.635  1281  1382 E ALLJOYN_OBJ:  112.103 ****** ERROR ALLJOYN_OBJ JoinS-1       ...e/router/AllJoynObj.cc:875 | trans->Connect(tcp:r4addr=10.1.1.3,r4port=9955) failed: ER_BUS_ALREADY_LISTENING
10-29 07:09:08.635  1281  1294 D ALLJOYN_JAVA:  112.109 DEBUG    ALLJOYN_JAVA external         ...a/jni/alljoyn_java.cc:6143 | BusAttachment_joinSession(): Back from JoinSession(org.alljoyn.bus.samples.chat.rahul, 27, 0x65d15478, 0,  <0x01, 1, 0xff, 0xfe7f>)
10-29 07:09:08.635  1281  1294 E ALLJOYN_JAVA:  112.109 ****** ERROR ALLJOYN_JAVA external     ...a/jni/alljoyn_java.cc:6180 | BusAttachment_joinSession(): Error.  Forgetting jglobalref: ER_ALLJOYN_JOINSESSION_REPLY_UNREACHABLE
10-29 07:09:08.645  1281  1294 I chat.ChatApplication: notifyObservers(ALLJOYN_ERROR_EVENT)
10-29 07:09:08.645  1281  1294 I chat.ChatApplication: notify observer = org.alljoyn.bus.sample.chat.UseActivity@41317228
10-29 07:09:08.645  1281  1294 I chat.UseActivity: update(ALLJOYN_ERROR_EVENT)
10-29 07:09:08.645  1281  1294 I chat.ChatApplication: notify observer = org.alljoyn.bus.sample.chat.AllJoynService@4149d8b0
10-29 07:09:08.645  1281  1294 I chat.AllJoynService: update(ALLJOYN_ERROR_EVENT)
10-29 07:09:08.645  1281  1294 I chat.ChatApplication: notify observer = org.alljoyn.bus.sample.chat.HostActivity@414f1188
10-29 07:09:08.645  1281  1294 I chat.HostActivity: update(ALLJOYN_ERROR_EVENT)
10-29 07:09:08.665  1281  1281 I chat.UseActivity: mHandler.handleMessage(): HANDLE_ALLJOYN_ERROR_EVENT
10-29 07:09:08.665  1281  1281 I chat.UseActivity: onCreateDialog()
10-29 07:09:08.665  1281  1281 I ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-11-05 00:32:16 -0800

praveenb gravatar image

One thing to try is to run native C++ binaries between the Android devices to check you are experiencing any issues. One device1, using adb push and run 'bbservice -n test.chat-app-problem'. One device2, using adb push and run 'bbclient -d -n test.chat-app-problem'. Check pings from bbclient.

edit flag offensive delete publish link more
0

answered 2014-11-05 08:06:57 -0800

JavierT gravatar image

updated 2014-11-05 09:24:56 -0800

I am facing the same issue with the same devices. However, I had problems to run a normal android application due to the new Android 5.0. I always have to put target android 21 in order to compile.

May Alljoyn have any problems with it?

# Project target.
target=android-21

However I can tell you that my problem was that I was under a public network (university network). I tried at home with my own router and it worked, even if its running under another modem as well (part of a bigger network). Is weird because I thought that Alljoyn was independent of the wireless configuration, or am I wrong?

The solution that praveenb proposes sounds quite demanding and challenging. I will try to make it work under the university network, but maybe they have some security activated that prevents this communication :S

Let's see if we can figure this out together :D

edit flag offensive delete publish link more

Comments

Hi JavierT, I'm also trying to test the app in a separate network to see if that makes any difference. Will also see if I can try praveenb solution to test out with the bbservice app Will let you know how it goes.

nick2014 ( 2014-11-06 14:07:26 -0800 )edit

Did you ever find an answer to get the SDK to work around the University network? I'm currently experiencing the same problem.

defendrio ( 2015-01-28 12:01:19 -0800 )edit

Not really, even if the documentation says that is prepared to work under any network However there is a chapter under the documentation that talks about this. Is called Using ICE under Alljoyn framwork. Now I'm having problems with the .so lib. If I solve them I will check this again.

JavierT ( 2015-02-04 09:50:24 -0800 )edit

the issue is your university network does not allow multicast traffic.

ry.jones ( 2015-03-03 10:59:59 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-10-31 20:41:48 -0800

Seen: 235 times

Last updated: Nov 05 '14