Problem encountered using the Code Generator

asked 2014-03-26 05:42:42 -0700

kongjialin gravatar image

updated 2014-03-27 13:11:50 -0700

Nikhil Dabhade gravatar image

I am learning to use the code generator(version 0.99) for the thin client taught in the wiki training. I just follow the recording, use the same .xml file and I think I have generated exactly the same source codes as those in the training recording. Then I use the command scons WS=off OS=win7 CPU=x86_64 MSVC_VERSION=11.0 (already edited the top SConstruct file) and get the .exe files: ServiceMain.exe and ClientMain.exe. I tried to run the ServiceMain.exe, but the output I get is different from the one in the recording. The output I get is as follows:
Error: LoadNVFromFile() failed //this is the same as the one in the recording
000.000 aj_helper.c:285 AJ_StartService2(): connect failed: sleeping for 10 seconds
070.008 aj_helper.c:285 AJ_StartService2(): connect failed: sleeping for 10 seconds
......//similar to the ones above
991.145 aj_helper.c:129 AJ_RunAlljoynService(): status=AJ_ERR_TIMEOUT.
1051.168 aj_helper.c:285 AJ_StartService2(): connect failed: sleeping for 10 seconds

And when I run ClientMain.exe, there is no output.
I tried to trace the failure, and I find that in the function AJ_Discover(...) of the file ajtcl/scr/aj_disco.c , the value of status is NOT the AJ_OK after this line
status = sock.rx.recv(&sock.rx, AJ_IO_BUF_SPACE(&sock.rx), AJ_WHO_HAS_TIMEOUT); being executed. But I'm not sure if this is the reason.
Is there anyone successfully running the ServiceMain.exe? And can you help me find the reason I fail? Thanks a lot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-03-26 10:11:28 -0700

bspencer gravatar image

Hi Kongjialin,
The issue is due to not having an AllJoyn Router running in the network or on the local machine. The design of the AllJoyn Thin Library is that it needs to connect to an AllJoyn Router to offload work due to the nature of Thin Library being used on embedded devices that are memory/process constrained.

What you will need to do is run the AllJoyn Router which can be either stand alone or part of an application. You can either download the AllJoyn core software and build the AllJoyn Standard Library or you can download the SDK from here: https://www.alljoyn.org/docs-and-downloads

In the Thin Library Windows zip (AllJoyn Thin Library SDK 14.02.00 - Windows) you will find a bin folder that contains SampleDaemon.exe and ledctrl.exe. If you run one of these then the application you built will be able to connect to the AllJoyn Router instance and will then be able to discover each other.

edit flag offensive delete publish link more


Thank you for your answer. But following your advise, I have another problem as below...

kongjialin ( 2014-03-26 19:44:46 -0700 )edit

Could you please help me? Thanks a lot!

kongjialin ( 2014-03-27 19:42:08 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-03-26 05:42:42 -0700

Seen: 395 times

Last updated: Mar 27 '14