Connect BusAttachment to arbitrary router

asked 2015-09-09 08:05:24 -0700

hashok gravatar image

Hi, there is a Connect method in BusAttachment which takes connection spec and tries to establish a connection to a remote server. However, BusAttachment on a client side has only local transports registered and no tcp or udp, so if I request to connect to something like "tcp:addr=,port=9955" the connection fails with ER_BUS_TRANSPORT_NOT_AVAILABLE (even if I have bundled router). Based on source code, the list of transports for this case is built by ClientTransportFactoryContainer class which indeed does not register neither tcp nor udp.

The question is - why such a limitation? Why can't app connect to some predefined AllJoyn router? This would be very useful if app is behind NAT, but router is located somewhere in Internet and its address is known in advance.

edit retag flag offensive close merge delete


you might ask on the core mailing list. https://lists.allseenalliance.org/mailman/listinfo/allseen-core

ry.jones ( 2015-09-09 13:59:11 -0700 )edit

Thanks, I will. For the future, should the mailing list be preferred for technical questions?

hashok ( 2015-09-09 23:05:31 -0700 )edit

yes, I think you'll find you get answers faster there.

ry.jones ( 2015-09-09 23:34:16 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-09-09 23:35:59 -0700

praveenb gravatar image

The limitation that you point out is primarily present for historical reasons.

AllJoyn originally began as a peer-to-peer message-based communication framework based on DBus. AllJoyn has two implementations of Core Client Library, namely Standard and Thin, that are run on Leaf nodes. The crucial piece that allows the formation of the conceptual 'Bus', is AllJoyn Routing node. Without a routing node, 'Bus' formation cannot take place no matter the number of leaf nodes.

AllJoyn Routing node, along with AllJoyn Standard Core library, has been ported to many high-level operating systems. For leaf nodes using Standard Core library, the default option is to bundle its own routing node. Leaf nodes running AllJoyn Thin Core library (which is intended for embedded devices) can discover and connect to a routing node present else where on the subnet.

Discovery in AllJoyn is based on mDNS that operates only within one subnet. That is, nodes (whether leaf or routing) cannot currently discover nodes that are present on different subnets. It then also follows that leaf nodes behind a NAT cannot discover and connect to routing nodes located on the Internet.

A project along the similar lines of what you suggest, is currently being worked on. The code for the current project will be developed here.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-09-09 08:05:24 -0700

Seen: 80 times

Last updated: Sep 09 '15