0

thin core communicate with thin core

asked 2015-03-26 20:24:48 -0800

bling gravatar image

updated 2015-03-27 02:19:29 -0800

My environment is as follow:
1. All the devices are under the same WiFi SSID environment.
2. I have built a thin core platform(basic_client sample) and it can communicate with Windows Apps(basic_service sample) built by standard core.
3. There is another device,powerplug,built by thin core.
4. I can use Android phone to find the powerplug and control it.
5. I want to make my platform control the powerplug.

My idea is as follow:
1. All the devices are under the same WiFi SSID environment.
1. Use the Windows Apps(SampleDaemon sample) to create an AllJoyn Bus.(Create a router node)
2. Make my platform connected to the Windows Apps.(connect to the router)
3. It seems that the powerplug will connect to the AllJoyn Bus automatically when it power on. (connect to the router)
4. Then, I can make my platform find the About Announcement by the powerplug and control it.

I have some questions.

  1. Can My platform see the About Announcement by the powerplug?

  2. Is there any sample code that can give me a reference to get About Announcement and control the other ajtcl device in ajtcl FW package?

    Thank you!!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-27 09:19:52 -0800

jprestwo gravatar image

updated 2015-03-27 09:20:53 -0800

First off, it would be easier if you called your devices something like device A and B rather than my platform and firmware because platform is rather ambiguous. Also, it seems that you are calling the same device FW and platform but I still think I understand some of what your trying to do.

  1. An about announcement is exactly what it sounds like, an announcement. Any device, assuming it is connected to a routing node, will see an about announcement. It doesn't matter if its a thin device or standard device.

  2. You can use clientlite.c as an example. It uses an about announcement to connect to a service. It is under the test folder in the ajtcl SDK/repo. Look ANNOUNCE_BASED_DISCOVERY and that will show you how to do it.

Here is what I don't quite understand. I get that you want to control the power plug but are you trying to control it with your windows app or the other thin core device? It really doesn't matter because both is possible but obviously it will have to be done differently if using the thin vs standard device.

edit flag offensive delete publish link more

Comments

Thank you!
I can use the clientlite sample to get the announcement from the powerplug, which I will call it device A. My platform will be mentioned as device B.
After device B get the announcement from device A, the clientlite FW on device B goes to StartClient function,and then an error message,"006.312 aj_helper.c:585 AJ_StartClient(): AJ_METHOD_JOIN_SESSION reply (10)", occurs and the FW quits.It seems there is some problem about device B joining the session to device A. I see the error status return 10 in decimal . Could you give me some advice?
I have another question. I want to control the device A, the PowerPlug. Is there any general function(method) provided by AllJoyn in PowerPlug serivce class? Or I need to ask the PowerPlug company to ask for the document about the method call. The Product 's homepage is http://www.power-tech.com ...(more)

bling ( 2015-03-30 02:49:52 -0800 )edit

I am not familiar with the PowerPlug service class. If said class exists and the company that makes the power plug implemented it than you should be able to use it. I recommend contacting the manufacturer and getting the specifics. The product link you provided does not mention that it supports AllJoyn. Perhaps I am looking at the wrong thing but as far as I can tell they have their own App to control their power plugs.

jprestwo ( 2015-03-31 15:43:59 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-03-26 20:24:48 -0800

Seen: 58 times

Last updated: Mar 27 '15