0

ALLJOYN_JOINSESSION_REPLY_UNREACHABLE exception when connect to the bus on iOs device

asked 2014-11-18 20:32:27 -0800

thanhtanh gravatar image

updated 2014-11-19 01:05:47 -0800

I'm using Alljoyn version alljoyn-14.06.00a from SDK.

I face same problem when run two sample(pure source): chat and basic client/service. When I run sample on both Android or both iOs device, it works properly. If I host a chat (or run basic service) on Android device, and client from iOs device, it still work properly, too.

But when I host a service on iOs device, the Android client cannot attach to this bus, the exception ALLJOYN_JOINSESSION_REPLY_UNREACHABLE occurs.

I have read some information about TCP prevent package from old Alljoyn forum. Are these same problems? Or how can I configure to start a service on iOs device. Thanks.

Edited: More information

If I start a service on android device and then quit application (not stop service), then on iOs device, I start a service with same name, other device (android/ios) will able to connect to this service.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-21 10:28:32 -0800

bspencer gravatar image

In using these sample applications I imagine you are using this with more than 2 devices? What you are encountering with these samples is a WKN(Well Known Name) collision. IE the advertisement of the WKN is being discovered for the application that is no longer present in the network and the connect attempts are being tried to that route. Each WKN should be unique that is advertised, the sample code does not do this. There is a old blog post that I wrote that discusses creating a single shared session that has mentions of a unique WKN.

What is happening when you switch around the basic client/service is that the AllJoyn daemon routing information is responding to the WHO-HAS UDP packet with an IS-AT for the stale information. AllJoyn doesn't know what app is valid until you try and connect, which is why you get the UNREACHABLE error. As such you can quit the application on ALL of the devices you have and then start up the service side on the device you want to be the service.

The other option you can modify the sample application to add "._"+<BusAttachment>.GetGlobalGuidString() so that you have a unique WNK and then you will just have a problem of the sample trying to connect to each advertisement it finds. The samples are create at showing how to use the APIs at it's simplest form. They are not full applications that you could make UI changes to and release, their purpose is to show use.

For someone new to AllJoyn I would start with learning at a high level about the architecture and then use the Service Frameworks and run those samples. The core of AllJoyn is moving towards service level discovery which abstracts the need of looking for WKN's and has interoperable interfaces that can be discovered and interacted with. The AllSeen Alliance website has been updated with a new developer section that provides a great way for you to learn and develop.

edit flag offensive delete publish link more

Comments

Hi bspencer, I need confirm this: Can I advertise a bus service on an iOS device (and android can attach to this bus)? I figured out that android device can find the service host by iOS device, but it cannot join the session. Did I configure something wrong?

thanhtanh ( 2014-11-23 17:40:17 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2014-11-18 20:32:27 -0800

Seen: 598 times

Last updated: Nov 21 '14