About Bundled Daemon On Windows

asked 2014-05-07 03:59:55 -0700

sarah gravatar image

updated 2014-05-07 09:06:29 -0700

Hi, I have some question about Bundled Daemon on windows.

When I start an AJSC app(e.g. ledctl.exe) on windows pc, when execute the status = g_msgBus->Connect("null:");, it will start the local bundled daemon.

So what if I start another AJSC app(e.g modified ledctl.exe ) on the same pc at the same time.When execute status = g_msgBus->Connect("null:");, will it start up another local bundled daemon. If yes, can this two daemon communicate with each other?

And is there any way to let the second app use the daemon created by the first daemon? If I execute the following code in the second app, will it work?

const char* connectArgs = "tcp:addr=,port=9956"

status g_msgBus->Connect(connectArgs);

And There is another question. ledctl.exe start up a bundled daemon which silently advertise its name. When I connect the first arduino thin client into the network and use this name to connect to the bundled daemon, it works well. But when I try to add another arduino thin client and use the same name to connect to the same bundled damon, ledctl.exe show an error

...\src\Message_Parse.cc:1008 | Failed to read message on Qvzriuq4.2: ER_OS_ERROR

...\src\RemoteEndpoint.cc:645 | Endpoint Rx Failed: ER_OS_ERROR

Do you know the cause of this error?

Pls kindly help me. Thanks a lot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-07 09:13:16 -0700

stevek gravatar image

The preferred term for routing node functionality that gets linked into an application is "bundled router". When an application is linked with BundledRouter.obj and libajrouter.lib, it will have routing node functionality. When your application connects to the routing node with the "null" transport, it is connecting to the routing node functionality that is linked in to your application. A separate process is not started. Two applications the link in the bundled router can communicate with each if both of those applications are running on the same machine. In fact, in this case there will be no difference in the behavior of those applications regardless of whether they are running on the same machine or different machines (assuming firewalls are not blocking traffic).

That said, it is also possible for the bundled router that is linked into one application to provide the routing node functionality for another program, but unfortunately, somewhat involved to do. To achieve this, first you will need to modify the hard coded configuration of the bundled router in alljoyn_core/router/bundled/BundledRouter.cc to accept connections from external clients and set a well-known port. The code snippet you posted for the second application to connect to an external routing node is correct presuming you modified BundledRouter.cc appropriately.

Since for the Windows platform, everything is built with the bundled router included, I suggest just letting the bundled router code do its thing and not mess with modifying BundledRouter.cc.

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

Question Tools

1 follower


Asked: 2014-05-07 03:59:55 -0700

Seen: 172 times

Last updated: May 07 '14