Probably a simplistic question

asked 2015-04-16 11:29:48 -0700

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm new to AllJoyn, so please forgive me if this is a novice question.

I want to have two Thin Clients communicate with each other via a single (mobile) alljoyn router/standard app. Specifically, I want the sensor data from one thing client app to trigger the action on the other. How do I go about doing this? Do I need different buses? Or different interfaces (one interface that is known by the router and one thin client and another interface that is known by the router and the other thing client)? Or can each thin client just know the appropriate methods (both of which are known by the router within a single interface)?


Edit: (OP) Thank you for the answer. Maybe my giving a bit more details will help. I'm attempting to create an iPhone app that will govern communication between two Thin Core Apps. As a starting place I modified the Basic Server on iPhone and Basic Client on the Thin Core. When the Basic Client passes a certain string to the Basic Server running on the iPhone, I want that to in turn send a message to the other Thin Core App, to make it perform its function. The problem I'm having is calling my other method from within the "Concatentate" method of the iPhone App. I can't figure out how to get the appropriate member object to call my other function designed to interact with the second Thin Core. Are you saying I shouldn't bother with an iPhone App and should have the Thin Cores communicate directly with each other?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-16 21:52:59 -0700

TheHindenburg gravatar image

updated 2015-04-20 04:16:19 -0700

There is really no issue with having two Thin Clients talk to one another over WiFi or Ethernet through one Router.

The two Thin Core (which is what I call a Thin Client because it avoids confusing it for a Client App in the Client-Service paradigm) Apps which you'll be using would need to implement the same Interfaces(on the Client App as well as the Service App) and use the same Well Known Name (for eg. org.allseen.Light) to advertise and discover one another before they are able to establish a session.

The Router would not need to know the Interfaces implemented by either of the TC devices as the connection with the Router is made using a Generic Alljoyn Bus name(org.alljoyn.Bus) which any Router would recognize and allow a connection to be established using(though you should use apps from the same Alljoyn Version for Authentication to be allowed).

I would say that right now it is best for you to try this with sample applications given in the SDKs. The ideal setup for you now would be to have a SampleDaemon.exe running on a PC (which you can find in Core_SDK/cpp/bin/samples) and two TC apps that implement the same interfaces for eg. basic_client.exe and basic_service.exe (can be found in the AJTCL_SDKs) running on separate (or maybe even the same PC doesn't matter as long as they are on the same WiFi network).

Also, if you were to run an Alljoyn Application on a mobile phone eg. Android, as long as the the device that is running the Standard App is on the same WiFi network as the TC devices the App that you would be running on the Standard device does not affect the communication between the two TC devices. This is because they would only interact with the Alljoyn Daemon that the Standard app brings with it.

Furthermore, if you are interested in Alljoyn Apps then once you establish a level of comfort with Alljoyn you should look into the Alljoyn Code Generator to produce your own apllications.

Here are some links that might help:

Alljoyn Download Page

Data Exchange - Good to understand the Service App/Client App relationship

Alljoyn Thin Apps

Code Generator

EDIT: Yes, I would say that if the only thing you want is for the Two Thin Clients to talk to one another then there is no need for you to pass that through the IPhone App and as long as you have a router running on the same subnet the Two Thin Client apps.

Now if your Basic Service running on your mobile is governing communication between multiple Basic Client Apps running on Thin Client then that would be something I don't have much experience with.

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

Question Tools

1 follower


Asked: 2015-04-16 11:29:48 -0700

Seen: 175 times

Last updated: Apr 20 '15