asked 2014-11-21 03:32:22 -0700

minhun.lee gravatar image

updated 2014-11-21 03:35:55 -0700

Hello all,

I received below ALLJOYN_JOINSESSION_REPLY_FAILED error. I appreciate if anyone can provide comments on my problems.

Below are the sequences to generate this issue. 1. Connect two devices (A & B) through WiFi - each device includes server & client role (i.e. a server advertises services and functions to other devices; a client finds other devices and joins) - A session is generated for each connected device.

  1. Check two devices (A&B) make a session successfully.
  2. Turn WiFi of one device (B) off
  3. The other device(A) is blocked for a while if I invoke any RMI methods
  4. After, the other device(A) displays BusTimeOUtException log for calling a RMI method
  5. Terminate the sample application from the device(B) whose WiFi is disabled.
  6. Turn on the WiFi module of the device (B).
  7. The device (A) receives sessionLost() callback and considers devices (b) as terminated.
  8. Launch a sample application on device (B)
  9. The device (A) receives findAdvertise() callback and try to join with device (B)
  10. The device (A) displays below error messages

-----------------------<error message="">---------------------------------- 11-21 20:08:14.433: E/ALLJOYN(14102): 159.812 * ERROR ALLJOYN iodisp .../src/Message_Parse.cc:1053 | 0x0004 11-21 20:08:14.443: I/Server(14102): sessionLost() w/ sessionId =1898452493 11-21 20:08:14.463: E/NETWORK(14102): 159.840 ERROR NETWORK iodisp common/os/posix/Socket.cc:462 | 0x0004 11-21 20:08:14.483: E/ALLJOYN_OBJ(14102): 159.867 ERROR ALLJOYN_OBJ JoinS-6 ...e/router/AllJoynObj.cc:943 | 0x9029 11-21 20:08:14.493: E/ALLJOYN_JAVA(14102): 159.876 * ERROR ALLJOYN_JAVA external ...a/jni/alljoyn_java.cc:6180 | 0x9088</error>

11-21 20:08:14.493: E/Client(14102): BusAttachment.joinSession(): ALLJOYN_JOINSESSION_REPLY_FAILED

  1. The device (B) successfully makes a connection with device (A).

Q. Is anyone happened to know what problems I have? how I should avoid this issue?

Any comments will be appreciated.

edit retag flag offensive close merge delete


In step #9, is the sessionHost parameter in A's JoinSession the name parameter from FoundAdvertisedName?

tmalsbar ( 2014-11-21 14:01:11 -0700 )edit

Thank you for your comments. I checked the name parameter of JoinSession and it is identical to the FoundAdvertisename.

minhun.lee ( 2014-11-21 17:56:12 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-11-21 14:32:41 -0700

bspencer gravatar image

Fairly certain this is the exact same situation as what was occurring in ALLJOYN_JOINSESSION_REPLY_UNREACHABLE exception when connect to the bus on iOs device. The issue is that the WKN you are using is identical to the one you previously advertised. The recommendation, and what tmalsbar was getting to, is that the WKN you choose in your application be unique when the application starts. As I mentioned in the previous answer, adding a random value (GetGlobalGuidString()) is enough to resolve your issue.

edit flag offensive delete publish link more


Thank you for fast response. The device A is Android device and The device B is iOS device. I generate the unique WKN (e.g. "CommonWellKnown" + "unique value for a device" ) for each device when the application starts. As the device A receives the sessionLost callback of the device B, the disconnection of the device B is handled correctly. Is it not allowed to advertise the same name WKN from the device when the device terminates and launches in order?

minhun.lee ( 2014-11-21 17:54:36 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-11-21 03:32:22 -0700

Seen: 425 times

Last updated: Nov 21 '14