Device name Change Implementation

asked 2015-01-13 02:04:05 -0700

iker gravatar image

updated 2015-01-13 02:04:27 -0700

Hi All,

I am trying to change the device name on my alljoyn application [1] but i have not seen eny reference code that shows how to do it. I am using AllJoynOn application to test my app and when I try to edit the device name service asks me for a password that i see on the example code that is set to "000000" but it does not work [2].

So the problems are:

  • I do not know or see what handlers gets triggered when name changing
  • In sample code I am basing on appears thar security passsword is set to "000000" but it does not work for me.

Has anybody developed name changing and password with success? Is it possible to share that code to help other to implement it correctly?


[1] https://drive.google.com/file/d/0B_IWtytfyepuUXA4UnBzQXdHVjg/view?usp=sharing

[2] https://drive.google.com/file/d/0B_IWtytfyepueUk4Mm1nbVlFOEU/view?usp=sharing

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-13 12:15:02 -0700

bspencer gravatar image

Hi Iker,

Few questions here, the application that you are using to set the name, is this a 14.06a application? Also can you confirm, via the About Announcement AppId that the application you are trying to change the name on is indeed the application that you wrote?

A good example of configuration that is working with the passphrase is here ConfigServiceSample.

In order to understand that the name has been changed you will find the AboutDataStore file under the sample_apps/cpp/samples_common that has a call under Update which will call the Core About method of SetDeviceName when the name changes this is called.

edit flag offensive delete publish link more


i am using 14.06a application. i created a class similar to a configservcielistener but the documentation there was not any Passcode field. if you see AboutDataStore::Update funciton in AboutDataStore there is not an "if" for passcode. If i add a field Passcode to About, would that be the password?

iker ( 2015-01-19 04:07:20 -0700 )edit

I believe you haven't registered an auth password callback. When AllJoyn ON asks for the password a function (that should have been registered prior), gets called which returns the password. In the context of thin client you need to register your callback with AJ_BusSetPasswordCallback(AJ_BusAttachment*, AJ_AuthPwdFunc). A good example is in the AllJoyn.js source code. The callback gets registered at line 90 of ajs_services.c and the actual callback is at line 536 in ajs_propstore.c. EDIT: Oops didn't realize you were using standard client, this probably wont help you then.

jprestwo ( 2015-03-03 09:05:42 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-01-13 02:04:05 -0700

Seen: 144 times

Last updated: Mar 02 '15